T09 · Insecure Skill Coding Practices
- Location
index.js:61- Finding
Attacker-Controlled Filename Allows Path Traversal and Arbitrary Local File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it claims, but it can write a downloaded Feishu file outside the chosen output folder if the remote filename contains path traversal characters.
Review before installing. Only run this with least-privilege Feishu credentials and a non-sensitive output directory. The publisher should validate remote filenames, force saves to remain under the selected output folder, avoid overwriting existing files by default, and pin dependencies with a lockfile before broad use.
index.js:61Attacker-Controlled Filename Allows Path Traversal and Arbitrary Local File Overwrite
The skill declares no explicit tool scope or permissions while it clearly depends on environment-based secrets (FEISHU_APP_ID and FEISHU_APP_SECRET) and performs file retrieval. That mismatch reduces transparency and policy enforceability, making it easier for an agent or user to invoke a credentialed file-download capability without clear disclosure or restriction.
The skill documentation does not warn users that it will download files from chat history and requires sensitive Feishu credentials in environment variables. This can lead to uninformed use, accidental exposure of secrets, or retrieval of sensitive files from chat history without adequate operator awareness or consent.
The dependency uses a caret range (^12.0.0), which permits automatic installation of newer minor and patch releases. This weakens build reproducibility and increases supply-chain risk because future upstream changes or a compromised release could be pulled without explicit review.
"description": "Find and download files from Feishu chat history by filename.",
"main": "index.js",
"dependencies": {
"commander": "^12.0.0",
"@larksuiteoapi/node-sdk": "^1.26.0"
},
"bin": {
The SDK dependency is specified with a caret range (^1.26.0), allowing npm to resolve to newer compatible releases over time. For a tool that accesses Feishu chat history and downloads files, this expands supply-chain exposure because dependency updates could change behavior or introduce malicious code without direct source modification.
"main": "index.js",
"dependencies": {
"commander": "^12.0.0",
"@larksuiteoapi/node-sdk": "^1.26.0"
},
"bin": {
"feishu-find-file": "./index.js"
No suspicious patterns detected.