T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/generate.mjs:10- Finding
Output Root Resolves Outside the Project Boundary
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The QR code skill mostly matches its stated purpose, but its file-output controls are incorrectly scoped and can write outside the intended workspace.
Review this skill before installing. It should be fixed to write only to a real user-approved workspace or dedicated output directory, create temporary files safely, cap image sizes more conservatively, pin dependencies with a lockfile, and warn users not to put WiFi passwords, contact details, or other sensitive data into QR codes unless they intend to share it.
scripts/generate.mjs:10Output Root Resolves Outside the Project Boundary
scripts/generate.mjs:173Predictable Temporary File Is Written Before Symlink Validation
scripts/generate.mjs:13Permitted Image Dimensions Enable Resource Exhaustion
The examples include QR payloads containing WiFi credentials and personal contact data, but the skill does not warn users that generated QR codes may expose secrets or personally identifiable information to anyone who scans or views them. In this context, the risk is realistic because the skill explicitly encourages rendering and sharing the generated files, which increases the chance of accidental disclosure.
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
## Troubleshooting
| Issue | Solution |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `npm install` fails | Install build tools:`xcode-select --install` (macOS) or see [sharp install guide](https://sharp.pixelplumbing.com/install) |
| QR code won't scan | Increase `--size`, use higher error correction (`--ec H`), or simplify styling |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| QR code won't scan | Increase `--size`, use higher error correction (`--ec H`), or simplify styling |
| Colors not working | Use hex format `#RRGGBB` (e.g., `#FF5733`), not RGB or color names |
| File too large | Reduce `--size`, `--scale`, or increase `--quality` for JPG |
| Permission denied | Check workspace directory write permissions |
## Error Correction Levels Explained
The dependency version for qrcode uses a caret range (^1.5.1), which allows automatic installation of newer minor and patch releases. This weakens build reproducibility and can unintentionally pull in a compromised or breaking upstream release through the software supply chain.
"generate": "node scripts/generate.mjs"
},
"dependencies": {
"qrcode": "^1.5.1",
"sharp": "^0.32.4"
},
"author": "",
The sharp dependency is specified with a caret range (^0.32.4), so installs may resolve to different releases over time. For a package with native components and prior security advisories, this increases supply-chain risk and makes it harder to verify whether deployed builds are affected by known issues.
},
"dependencies": {
"qrcode": "^1.5.1",
"sharp": "^0.32.4"
},
"author": "",
"license": "MIT"
The manifest includes sharp without pinning an exact version, while the package has multiple known advisories in some releases. Because the resolved installed version is not fixed here, consumers may unknowingly install an affected version, which is more concerning given sharp's native tooling and historical post-install/build-related security issues.
This code performs a direct file write and atomic rename to the target output path, which can overwrite an existing file in the workspace root. While the script logs the destination path and success, it does not warn the user that an existing file may be replaced or prompt for confirmation before doing so.
No suspicious patterns detected.