| Version | Supported |
|---|---|
| 0.3.x | ✅ |
| 0.2.x and older | ❌ |
Fixes ship in a new release rather than as patches to earlier versions.
If you discover a security vulnerability:
-
Do NOT create a public GitHub issue
-
Open a private report: https://github.com/kkdev92/clipshot/security/advisories/new
That is the Report a vulnerability button in the repository's Security tab; the link goes straight to it. Private reporting is enabled, so the advisory stays between us until there is a fix to describe.
This extension implements the following security measures:
All shell commands are executed using:
- Base64 Encoding for PowerShell (
-EncodedCommand) - Proper Escaping for Unix shells
- Environment Variables for parameter passing
// Safe PowerShell execution
const encoded = encodePowerShellCommand(script);
const cmd = `powershell.exe -EncodedCommand ${encoded}`;- All paths are validated to be within the workspace
realpath()is used to resolve symbolic links- Parent directory references (
..) are blocked
// Path validation
const realTarget = await fs.realpath(targetPath);
const relative = path.relative(workspaceRoot, realTarget);
if (relative.startsWith('..')) {
throw new PathValidationError('Path is outside workspace');
}- Cryptographically random file names (
crypto.randomBytes) - Exclusive file creation (
O_EXCLflag) - Automatic cleanup
- Restricted permissions (
0o600)
All user-configurable values are validated:
- Save directory cannot be absolute or contain
.. - File name patterns cannot contain shell metacharacters
- Numeric values are clamped to valid ranges
The extension requires a trusted workspace and will not operate in untrusted workspaces.
- Review Save Directory: Ensure
saveDirectoryis set to a reasonable location - Check File Permissions: Saved images have standard permissions
- Network Access: This extension does not make any network requests
- Clipboard Access: The extension only reads clipboard data when you explicitly trigger the paste command
- On Windows, PowerShell execution is required for clipboard access
- The extension cannot validate the content of images for malicious data
- Symbolic link resolution depends on filesystem support