T09 · Insecure Skill Coding Practices
- Location
SKILL.md:98- Finding
Hard-Coded Feishu Application Secret Enables Unauthorized API Authentication
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent as a Feishu tech-news reporting workflow, but it embeds a Feishu app secret and automatically grants or sends document access to fixed Feishu accounts.
Review before installing. Only use this skill if you control the exact Feishu app, wiki space, OpenID, and chat ID shown in the artifact. Rotate the exposed app secret, replace it with a protected runtime secret, make the recipient and chat destination configurable, and require confirmation before creating documents, overwriting content, granting permissions, or sending links.
SKILL.md:98Hard-Coded Feishu Application Secret Enables Unauthorized API Authentication
SKILL.md:98Automatic Full-Access Grant to a Hard-Coded Feishu Account
SKILL.md:305Mandatory Disclosure of Report Links and Local Path Metadata to a Hard-Coded Group
The fallback path combines credentialed Open API calls, document creation, content upload, and permission grants without any explicit privacy/security warning. Because it bypasses interactive tooling safeguards and directly uses API credentials, misuse or accidental execution can have broad tenant impact.
This pattern is effectively a credentialed external fetch/authentication flow using curl, paired with a hardcoded app_secret. In context, it enables direct token acquisition outside safer abstractions, making secret theft and downstream API abuse substantially more likely.
--content @memory/YYYY-MM-DD-tech-news.xml
# 步骤 3:授予张公子 full_access 权限(用 Open API 直接调,绕过 lark-cli 交互限制)
ACCESS_TOKEN=$(curl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \
-H 'Content-Type: application/json' \
-d '{"app_id": "cli_a94b4a1e43781cc7", "app_secret": "NALleHubGWREfZJkXpYizwszPIBFIBq7"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin).get('tenant_access_token',''))")
The skill documentation embeds a live Feishu app_secret and explicitly instructs using it to mint tenant access tokens. Hardcoded secrets in skill content can be exfiltrated by anyone with access to the file and then abused to access or modify Feishu resources tied to the tenant.
This curl-based direct API invocation alters document permissions using the acquired bearer token, bypassing safer interactive or policy-enforced tooling. In context, the combination of direct scripting plus privilege grant makes accidental or unauthorized access expansion more dangerous.
-d '{"app_id": "cli_a94b4a1e43781cc7", "app_secret": "NALleHubGWREfZJkXpYizwszPIBFIBq7"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin).get('tenant_access_token',''))")
curl -s -X POST 'https://open.feishu.cn/open-apis/drive/v1/permissions' \
-H 'Authorization: Bearer '$ACCESS_TOKEN \
-H 'Content-Type: application/json' \
-d '{
The manifest claims the skill now reads hot news 'from AIHOT single site,' implying a direct-source workflow. However, the implementation instructions specify using the Tavily extraction tool against the AIHOT page, which is materially different from directly reading the site and contradicts the declared simplification away from intermediary search/extraction tooling.
The skill performs external side effects including local file writes, Feishu document overwrite/creation, permission changes, and message sending without an explicit warning or confirmation boundary. In agent environments, undocumented side effects increase the chance of unintended data modification or transmission.
The documented workflow grants a specific user full_access on generated Feishu documents, which exceeds the stated need of publishing a daily report link. Unnecessary privilege grants create an access-control risk and can expose, alter, or re-share documents beyond the intended audience.
This line sends credentials to Feishu to obtain a tenant access token, enabling authenticated access to external systems. In context, the risk is elevated because the request uses a hardcoded secret embedded in the skill, turning ordinary transmission into credential exposure and potential tenant compromise.
--content @memory/YYYY-MM-DD-tech-news.xml
# 步骤 3:授予张公子 full_access 权限(用 Open API 直接调,绕过 lark-cli 交互限制)
ACCESS_TOKEN=$(curl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \
-H 'Content-Type: application/json' \
-d '{"app_id": "cli_a94b4a1e43781cc7", "app_secret": "NALleHubGWREfZJkXpYizwszPIBFIBq7"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin).get('tenant_access_token',''))")
This external API call modifies Feishu document permissions by granting full_access to a specific member. External transmission that changes access control is security-sensitive and can directly expose or delegate control over generated documents.
-d '{"app_id": "cli_a94b4a1e43781cc7", "app_secret": "NALleHubGWREfZJkXpYizwszPIBFIBq7"}' \
| python3 -c "import sys,json; print(json.load(sys.stdin).get('tenant_access_token',''))")
curl -s -X POST 'https://open.feishu.cn/open-apis/drive/v1/permissions' \
-H 'Authorization: Bearer '$ACCESS_TOKEN \
-H 'Content-Type: application/json' \
-d '{
Creating a Feishu wiki node is an external transmission with write side effects, but by itself it is aligned with the skill's stated purpose and is not inherently malicious. It is still security-relevant because it writes to an external system and should be disclosed and authorized.
| python3 -c "import sys,json; print(json.load(sys.stdin).get('tenant_access_token',''))")
# 2. 在知识库「科技新闻日报」节点下创建 wiki 节点
curl -s -X POST 'https://open.feishu.cn/open-apis/wiki/v2/spaces/7621391289904516315/nodes' \
-H 'Authorization: Bearer '$ACCESS_TOKEN \
-H 'Content-Type: application/json' \
-d '{"parent_node_token": "Iv9UwDW5viSJDWk12j7cBazYn8b", "node_type": "origin", "obj_type": "docx", "title": "科技新闻日报 | YYYY年MM月DD日"}'
Uploading document content to Feishu is an external write operation consistent with the skill's purpose, but it still transmits potentially sensitive compiled content to an external platform. The risk depends on content sensitivity and whether the user expected this transmission.
# → 获得 obj_token
# 3. 写入文档内容(batch create blocks,XML 格式)
curl -s -X POST 'https://open.feishu.cn/open-apis/docx/v1/documents/<obj_token>/blocks/<root_block_id>/children' \
-H 'Authorization: Bearer '$ACCESS_TOKEN \
-H 'Content-Type: application/json' \
-d '{"children": [...]}'
The description mandates a Chinese daily report format ('每日AI/科技热榜日报') and the document/message templates throughout the file are fixed in Chinese. There is no indication that the user can opt into another language or locale, which is a natural-language locale policy concern under the rule.
Earlier workflow instructions explicitly define the time window as the past 3 days, while the later '注意事项' section says only current-day news should be included. These directives conflict and create an intent-code/documentation divergence about the actual collection scope.
The main Feishu sync workflow instructs granting access after document creation via the permissions API, but the later notes say the document must be created with owner_open_id to ensure edit access. These are conflicting operational instructions for how access should be established.
The natural-language instructions and examples are presented only in Chinese, which can amount to forcing a specific language without user opt-in. The file does not indicate that the skill is region-specific or provide an alternative language option.
This markdown file includes examples for creating a document and writing content to an existing document, which are user-data modifying operations. The description does not include any warning about creating or overwriting content, choosing the correct destination, or verifying tokens before execution.
No suspicious patterns detected.