T09 · Insecure Skill Coding Practices
- Location
fetch.sh:43- Finding
Hard-Coded Administrative API Token in Executable Script
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its stated import-and-save purpose, but it includes an embedded ChainThink admin token and can upload loosely validated web content without clear user control.
Review before installing. The publisher should remove and revoke the embedded JWT, require a secure user-provided token, enforce an exact BlockBeats URL allowlist, sanitize or preview imported HTML, and ask for confirmation before creating a ChainThink draft.
fetch.sh:43Hard-Coded Administrative API Token in Executable Script
fetch.sh:7Insufficient URL Validation Enables Arbitrary Navigation and Untrusted HTML Import
The script embeds a live-looking JWT token directly in source code while claiming it is read from TOOLS.md, which is a strong secret-handling failure. Anyone with access to the script can reuse the token to call the ChainThink API as the associated user, potentially creating, modifying, or abusing content until the token is revoked or expires.
The skill explicitly instructs the agent to retrieve an authentication token from TOOLS.md, which expands the skill's access to stored secrets. While a token is needed to call the destination admin API, directing the agent to read credentials from another file creates a secret-access pattern that can be abused or reused beyond the narrow article-import task.
The skill tells users to store and use an API token but does not include adequate handling guidance for sensitive credentials. This increases the chance that users place long-lived admin tokens into ordinary markdown files, where they may be exposed to other tools, logs, or unintended readers.
The skill instructs the agent to send scraped article content together with authentication headers to an external admin API, but it does not clearly warn the user that a network transmission to a third-party service will occur. Even if the operation is the intended function, the lack of explicit disclosure reduces informed consent around external data transfer and credential use.
The skill performs an authenticated external transmission to an admin API, including article data and sensitive headers. External transmission is central to the skill's purpose, so this is not malicious on its face, but it remains security-relevant because it moves data and credentials off-tool and into a remote service with elevated publishing capabilities.
调用 API:
curl 'https://api-v2.chainthink.cn/ccs/v1/admin/content/publish' \
-H 'Content-Type: application/json' \
-H 'X-App-Id: 101' \
-H 'x-token: <从TOOLS.md读取>' \
The script automatically sends fetched article title, abstract, and content to a remote API without an explicit confirmation step or clear warning at the point of transmission. In an agent skill context, this increases the risk of unintended data exfiltration, especially if the fetched page contains sensitive, proprietary, or unexpectedly private content.
The curl call transmits collected article data and associated authentication headers to an external service, creating a clear outbound data path. In this skill, the danger is elevated because the transmission is coupled with a hardcoded token and automated publishing behavior, which can enable unauthorized or opaque content submission.
}')
# 调用 ChainThink API
RESPONSE=$(curl -s 'https://api-v2.chainthink.cn/ccs/v1/admin/content/publish' \
-H 'Content-Type: application/json' \
-H 'X-App-Id: 101' \
-H "x-token: $TOKEN" \
The file presents all user-facing instructions in Chinese, and the payload later hard-codes the translation locale as zh-CN. There is no indication that users may opt into another language or that the locale restriction is a documented, justified regional requirement.
The request body stores content only under the zh-CN locale. This is a natural-language/locale constraint that may violate organizational language-choice policy when users are not given a choice and no region-specific justification is stated.
Comments and terminal output throughout the script are in Chinese, including usage and status messages, with no option for another language. This can violate language/locale policy when a skill imposes a specific language without user opt-in or a documented regional constraint.