T09 · Insecure Skill Coding Practices
- Location
config/feishu.env:4- Finding
Committed Feishu Application Secret
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Feishu integration mostly matches its stated purpose, but it ships a plaintext app secret and handles bearer tokens in ways that need review before use.
Do not use this skill as-is with real tenant privileges. Rotate the exposed Feishu app secret, replace config/feishu.env with a template, restrict the Feishu app scopes, harden token caching to private 0600 files or a secret store, validate authenticated request destinations, and update vulnerable dependencies before installing or running cron automation.
config/feishu.env:4Committed Feishu Application Secret
scripts/feishu-auth.sh:48Tenant Tokens Stored in Predictable Files Without Explicit Access Controls
reference-feishu-common/index.js:104Authenticated Fetch Helper Sends Feishu Bearer Tokens to Unrestricted URLs
scripts/group-welcome.py:175Group Welcome Module Reads All Values from a Shared OpenClaw Credential File
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
try:
url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
resp = requests.post(
url,
json={"app_id": app_id, "app_secret": app_secret},
timeout=REQUEST_TIMEOUT
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
/**
* Get Tenant Access Token (Cached)
*/
async function getToken(forceRefresh = false) {
const now = Math.floor(Date.now() / 1000);
The lockfile pins axios 1.13.5, which the static analysis reports as having multiple known advisories including SSRF/proxy bypass and prototype-pollution-related request/response manipulation issues. In a shared HTTP helper package, axios is likely a core dependency, so exploitable HTTP client bugs can affect any consumer that makes outbound requests with attacker-influenced URLs, proxy settings, or request configuration.
form-data 4.0.5 is flagged for CRLF injection via unescaped multipart field names and filenames. If any consuming code builds multipart requests from attacker-controlled input, this can let an attacker smuggle or alter multipart headers/content, potentially leading to request tampering against upstream services.
The package permits installation of axios 1.13.5 via the caret range, and the analyzer reports that version as having multiple known advisories including SSRF-related and prototype-pollution-adjacent issues. This is especially concerning in a Feishu API client and authentication utility because HTTP request handling and credential-bearing traffic are core functions, so exploitation could affect tokens, outbound request routing, or response integrity.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
// Try to load Lark SDK
let Lark;
axios 1.13.4 is directly depended on and the scanner reports multiple high-severity advisories, including SSRF/proxy bypass and prototype-pollution-related attack chains. In a messaging/integration skill that likely makes outbound HTTP requests, a vulnerable HTTP client is especially relevant because attacker-controlled URLs, redirects, headers, or proxy settings can turn these issues into credential leakage, request forgery, or traffic interception.
form-data 4.0.5 is reported as vulnerable to CRLF injection through unescaped multipart field names/filenames. In a skill that likely uploads files or posts multipart requests to Feishu or other APIs, attacker-controlled field metadata could poison outbound requests, alter multipart structure, or inject unintended headers/content.
music-metadata 11.11.2 is directly depended on and is reported to contain an infinite-loop vulnerability in ASF parsing. If this skill accepts or inspects user-supplied audio/media, a crafted file could hang the process or consume CPU, making the issue highly relevant in this context.
protobufjs 7.5.4 is present transitively through the Feishu SDK and the scanner reports multiple high-severity issues including denial of service and code-generation-related injection risks. Even if some advisories only apply when using code generation features, the package version is vulnerable and protobuf parsing of untrusted data could expose the application to resource exhaustion or unsafe generated output paths.
qs 6.14.1 is included transitively and is associated with multiple high-severity advisories, commonly around prototype pollution or unsafe querystring parsing behaviors. In an API integration skill, parsing attacker-controlled query strings or merging parsed objects into config/state can enable object pollution and downstream exploitation.
ws 8.19.0 is present transitively through the Feishu SDK and is flagged by the scanner with high-severity advisories. If the SDK opens WebSocket connections or processes attacker-influenced frames/handshakes, vulnerabilities in ws can expose the process to denial of service, data exposure, or protocol-level abuse depending on the specific advisory conditions.
The project declares axios with a version range that static analysis associates with a known vulnerable resolved version. Because this skill performs Feishu message operations and likely makes outbound HTTP requests, a vulnerable HTTP client can expose the skill to request smuggling, SSRF-related bypasses, header handling issues, or other library-specific flaws depending on which advisories apply.
form-data 4.0.5 is flagged for CRLF injection via unescaped multipart field names/filenames. In a messaging or file-upload skill, if any multipart field names or metadata can be influenced by external input, this could enable malformed requests, header injection, or abuse of downstream services that parse multipart bodies.
music-metadata 11.11.2 is reported vulnerable to an infinite loop in the ASF parser, creating a denial-of-service risk when parsing crafted media files. This package is especially relevant in a message-processing skill because attachments or uploaded audio/media may be attacker-controlled, making parser-level DoS more plausible in context.
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).
# 删除缓存强制刷新
rm /tmp/feishu_token_cache.json
# 或调用刷新命令
bash feishu-auth.sh refresh