T05 · Unauthorized Access and Privilege Escalation
- Location
index.ts:31- Finding
Unrestricted Local File Disclosure Through AI Review
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This security-review skill is purpose-aligned overall, but it can read any local file path and send the full contents to an LLM without containment or redaction.
Review before installing. Use this only on files and directories you intentionally want an LLM to see, and do not point the review action at secrets, credentials, private agent state, or broad filesystem paths. Treat scan results as advisory, not authoritative, because several advertised security layers are not enforced and the scanner coverage is incomplete.
index.ts:31Unrestricted Local File Disclosure Through AI Review
llm/ai_review.ts:3Prompt Injection Can Manipulate AI Security Review Results
scanner/skill_scanner.ts:9Non-Recursive and Incomplete File Enumeration Produces False Safe Verdicts
scanner/ast_scanner.ts:17AST and Keyword Rules Are Trivially Bypassable
README.md:59Advertised Runtime, Signature, and Permission Protections Are Not Enforced
The declared description emphasizes security analysis capabilities: static scanning via AST/keywords and AI-powered semantic review for malicious behavior detection. The supplied code does not implement scanning, analysis, AST inspection, keyword matching, or AI review. Instead, it creates an isolated VM context and executes arbitrary code with a timeout. That is a materially different primary purpose and an undeclared capability. While a sandbox runner could be a supporting component of a larger security suite, this chunk by itself is code execution infrastructure, not security scanning behavior as described.
The declared description says this skill is a comprehensive security analysis suite focused on static scanning and semantic review of code for malicious behavior. The supplied code does not implement scanning or behavior analysis. Instead, it performs a narrow cryptographic task: reading a file and verifying a provided signature against a public key. This is a materially different primary purpose from the declared one, so the description does not accurately represent the actual behavior of the code chunk.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
- **Dangerous Functions**: e.g., `exec()`, `spawn()`
- **Known Bad Keywords**: e.g., `eval(`, `__proto__`, `rm -rf`
- **Sensitive File Access**: e.g., `/etc/passwd`, `/.env`
- **Suspicious Regex Patterns**: e.g., `curl ... | bash`
### 2. AI Code Review (`action: "review"`)
Uses the active LLM context (`ctx.llm`) to semantically analyze a specific file for hidden threats:
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
"\"nc ",
"\"netcat ",
"\"ssh ",
"chmod 777"
],
"sensitive_files": [
"/etc/passwd",
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"chmod 777"
],
"sensitive_files": [
"/etc/passwd",
"/etc/shadow",
"/.ssh",
"/.env"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"chmod 777"
],
"sensitive_files": [
"/etc/passwd",
"/etc/shadow",
"/.ssh",
"/.env"
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
],
"sensitive_files": [
"/etc/passwd",
"/etc/shadow",
"/.ssh",
"/.env"
],
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"/etc/passwd",
"/etc/shadow",
"/.ssh",
"/.env"
],
"suspicious_urls": [
"metadata.google.internal",
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
"/.env"
],
"suspicious_urls": [
"metadata.google.internal",
"169.254.169.254"
],
"suspicious_patterns": [
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
],
"suspicious_urls": [
"metadata.google.internal",
"169.254.169.254"
],
"suspicious_patterns": [
"curl .+\\|.+bash",
Code accesses a cloud instance metadata endpoint (e.g. 169.254.169.254). A single request can return temporary IAM credentials, making this a high-value SSRF target for credential theft.
],
"suspicious_urls": [
"metadata.google.internal",
"169.254.169.254"
],
"suspicious_patterns": [
"curl .+\\|.+bash",
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"\"nc ",
"\"netcat ",
"\"ssh ",
"chmod 777"
],
"sensitive_files": [
"/etc/passwd",
The review action reads whatever file path is supplied, loads the full file contents into memory, and forwards that content to aiReview(code, ctx.llm). If an attacker or untrusted caller can influence targetPath, this can exfiltrate sensitive local files, source code, secrets, or proprietary data to an external LLM service without any path restrictions, consent checks, or redaction.
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"publish:skill": "./scripts/publish.sh"
},
"dependencies": {
"@babel/parser": "^7.26.0",
"@babel/traverse": "^7.26.0"
},
"devDependencies": {
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
},
"dependencies": {
"@babel/parser": "^7.26.0",
"@babel/traverse": "^7.26.0"
},
"devDependencies": {
"@types/babel__traverse": "^7.28.0",
The manifest references @babel/traverse with a non-exact version while that package has a known advisory history, making it impossible from this file alone to verify whether installs resolve to a safe release. In a security-scanning skill that parses and semantically reviews potentially adversarial code, using a parser/traversal library with uncertain patch status increases supply-chain and code-processing risk.
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"@babel/traverse": "^7.26.0"
},
"devDependencies": {
"@types/babel__traverse": "^7.28.0",
"@types/node": "^22.0.0",
"typescript": "^5.6.0"
}
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
},
"devDependencies": {
"@types/babel__traverse": "^7.28.0",
"@types/node": "^22.0.0",
"typescript": "^5.6.0"
}
}
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"devDependencies": {
"@types/babel__traverse": "^7.28.0",
"@types/node": "^22.0.0",
"typescript": "^5.6.0"
}
}