T09 · Insecure Skill Coding Practices
- Location
send.js:36- Finding
Unrestricted Local File Read and Upload to Feishu
- 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 upload any readable local file or fetched URL content to Feishu without enough scoping or safety checks.
Review before installing. Use only with trusted image paths, trusted URLs, and verified Feishu recipients. Do not let untrusted prompts choose --file, --image, --url, or --target values. Keep FEISHU_APP_SECRET out of source control and logs. Prefer adding image type validation, file-size limits, HTTPS-only URL handling, private-network blocking, timeouts, and clearer install dependencies before routine use.
send.js:36Unrestricted Local File Read and Upload to Feishu
send.js:15Server-Side Request Forgery Through Unrestricted Image URL Download
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
const crypto = require('crypto');
const { program } = require('commander');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env'), quiet: true });
// Optimization: Remove SDK, use shared client + caching (Cycle #0063)
const { getToken, fetchWithRetry } = require('../feishu-common/index.js');
The README instructs users to send a local image file to Feishu but does not clearly disclose that the file contents will be uploaded to an external third-party service. This can lead users or downstream agents to transmit sensitive local files without informed consent, especially when the input path is user-controlled or automation is involved.
This code uploads the selected image to Feishu and later sends a message using that uploaded content, which transmits user-provided data to an external service. While there are progress logs, there is no warning or confirmation that the image contents may leave the local system and that image keys are also cached locally.
The skill documentation advertises a --url option that will automatically download a remote image, but it does not warn users that invoking this option causes outbound network access and retrieval of attacker-controlled content. This can mislead users about the skill's behavior and increases the risk of SSRF-like misuse, unexpected connections to untrusted hosts, or processing of malicious remote files.
The documentation lists FEISHU_APP_ID and FEISHU_APP_SECRET as required environment variables but does not warn that these are sensitive credentials used to authenticate to the Feishu API. Without that warning, users may mishandle, log, or expose the secret during setup, increasing the chance of credential leakage and unauthorized API use.
The dependency uses a caret range (^1.6.0), which allows installation of newer compatible releases rather than a single reviewed version. This weakens supply-chain control and can unexpectedly introduce vulnerable or malicious upstream changes into the skill at install time.
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"axios": "^1.6.0",
"form-data": "^4.0.0"
},
"author": "OpenClaw",
Axios has multiple known advisories, and because the manifest does not pin an exact version, it is not possible to verify whether deployed installs avoid affected releases. Given this skill's stated purpose of uploading and sending data to external Feishu endpoints, an axios issue could affect request integrity, credential handling, or enable SSRF-related abuse depending on usage.
The dependency uses a caret range (^4.0.0), so installs are not fully reproducible and may resolve to different package releases over time. In a package that handles uploads and external requests, this increases supply-chain exposure if a future dependency release contains a flaw or compromise.
},
"dependencies": {
"axios": "^1.6.0",
"form-data": "^4.0.0"
},
"author": "OpenClaw",
"license": "ISC"
Form-data has known advisories, and the unpinned manifest makes it impossible to determine whether installations will pull a safe release. Because the skill is intended to upload images, flaws in multipart boundary generation or header construction could become relevant in real request-building paths and increase request manipulation risk.