Loading...
Loading...
Scan code repositories for security threats including data exfiltration, backdoors, malicious code injection, dependency chain risks, and sensitive file access. Use this skill when users want to audit a codebase (especially TypeScript/JavaScript/Node.js projects) for security vulnerabilities, detect hidden malware, review npm dependencies for supply-chain attacks, check for credential leaks, or perform a pre-deployment security review. Triggers on requests like "scan for malicious code", "security audit", "check for backdoors", "review dependencies for vulnerabilities", "detect data exfiltration".
npx skill4agent add kooooooma/skills code-security-scannernpm installsetTimeoutAsk yourself: "If I were a malicious actor with commit access or supply-chain control, where would I hide code and how would I avoid detection?"
| Priority | Blast Radius | Stealth Level | Example |
|---|---|---|---|
| P0 | Full credential theft | High (obfuscated) | Base64-encoded exfil URL + env var harvest |
| P1 | Single secret leaked | Medium | Hardcoded webhook URL with API key |
| P2 | Potential access | Low (visible) | |
| P3 | Informational | None | Unpinned dependency version |
package.jsontsconfig.json.npmrcpackage-lock.jsonyarn.lockpnpm-lock.yamlmainscriptsbinpackage.jsonpreinstallpostinstallprepare.env.env.*packages/*/package.jsonworkspaces| User Request | MUST Load | Do NOT Load |
|---|---|---|
| "full security audit" | ALL 5 references | (none) |
| "check for credential leaks / data exfiltration" | | dependency-risks, filesystem-risks |
| "check for backdoors" | | dependency-risks, filesystem-risks |
| "scan for malicious code / eval" | | dependency-risks, filesystem-risks |
| "audit npm dependencies" | | data-exfiltration, backdoor-detection |
| "check for sensitive file access" | | data-exfiltration, backdoor-detection |
IMPORTANT: For targeted scans, load ONLY the relevant reference. Do NOT load all 5 references for a focused request — this wastes context and dilutes attention.
references/data-exfiltration.mdprocess.envreferences/backdoor-detection.mdnet.createServerhttp.createServerchild_processreferences/malicious-code-patterns.mdeval()new Function()vm.runInNewContext()Buffer.from(..., 'base64')evalexecpostinstallpreinstallreferences/dependency-risks.mdlodahslodashpostinstall*latest| Tool | Primary Command | Fallback |
|---|---|---|
| npm | | Parse |
| yarn | | Parse |
| pnpm | | Parse |
| None | — | Read |
references/filesystem-risks.md~/.ssh/~/.aws/~/.gnupg/.env# Security Scan Report — [Project Name]
## Summary
- **Scan Date**: [date]
- **Files Scanned**: [count]
- **Critical Findings**: [count]
- **Medium Findings**: [count]
## 🔴 Critical Findings
### [Finding Title]
- **Category**: [Data Exfiltration | Backdoor | Malicious Code]
- **File**: `path/to/file.ts:line`
- **Code**: [offending code snippet]
- **Risk**: [what could happen]
- **Recommendation**: [how to fix]
## 🟡 Medium Findings
### [Finding Title]
- **Category**: [Dependency Risk | Filesystem Risk]
- **File**: `path/to/file.ts:line`
- **Risk**: [description]
- **Recommendation**: [action]
## ✅ Passed Checks
[List categories that passed with no findings]NEVER flag these without checking context first. Doing so floods the report with noise and erodes trust.
eval()evalchild_processnet.createServer**/*.test.***/*.spec.*__tests__/dotenvconvictconfig.envdist/vendor/*.min.js*.bundle.jsgit logcryptobcryptargon2joseevalrequire()postinstallhuskypatch-packageelectron-buildernode-gyppostinstalldependenciesdevDependencieschild_process.execnode-sshssh2Before escalating any finding to 🔴 Critical, verify: "Does this code run in production, AND does it touch sensitive data, AND does it communicate externally?" All three must be true for a genuine critical finding.