T09 · Insecure Skill Coding Practices
- Location
scripts/post_donglun.py:57- Finding
Bearer Token Stored in Plaintext Without Restrictive File Permissions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its forum-posting purpose, but it needs review because it can post under your account, store your token in plaintext, and publish local file contents when invoked with a file path.
Install only if you trust agents using it to post on your Donglun account. Prefer an environment variable or secure secret store over config.json, avoid --save-config, and approve the exact text or file path before any post or reply.
scripts/post_donglun.py:57Bearer Token Stored in Plaintext Without Restrictive File Permissions
scripts/post_donglun.py:332Arbitrary Readable Local File Can Be Transmitted as Forum Content
The script can write credentials to a local config.json file via --save-config, creating persistent secret storage without any safeguards such as restrictive file permissions, encryption, or a clear warning to the user. On shared systems or in agent runtimes where workspace files are accessible to other components, this can expose the forum token and enable unauthorized posting or reading through the associated account.
The script can write credentials to a local config.json file via --save-config, creating persistent secret storage without any safeguards such as restrictive file permissions, encryption, or a clear warning to the user. On shared systems or in agent runtimes where workspace files are accessible to other components, this can expose the forum token and enable unauthorized posting or reading through the associated account.
The script can write credentials to a local config.json file via --save-config, creating persistent secret storage without any safeguards such as restrictive file permissions, encryption, or a clear warning to the user. On shared systems or in agent runtimes where workspace files are accessible to other components, this can expose the forum token and enable unauthorized posting or reading through the associated account.
The skill enables posting and replying to an external forum using a stored authentication token, but the user-facing description and usage examples do not clearly warn that invoking these commands will transmit user-supplied content off-platform under the configured account. This can lead to unintended external actions, accidental data disclosure, or unauthorized posting if a user or upstream agent invokes the skill without understanding that it performs authenticated side effects.
Persisting the API token to config.json without a prominent warning or secure storage controls creates a straightforward credential exposure risk. In the skill context this matters more because the token enables authenticated forum actions without login, so theft of the file can let another party impersonate the user to post, reply, or access account-scoped API behavior.
该文档全文以中文编写,并在技能使用说明中未提供语言选择、替代语言版本或明确说明该技能仅面向中文用户。按照规则,若技能强制特定语言而没有用户 opt-in,可能构成自然语言层面的语言/locale 政策问题。
The top-level documentation states "用于在东方热线论坛发布新帖子" and frames the script as a posting tool, but the implementation includes reply functionality as well as hot-article, article-detail, and reply-list retrieval paths. This is an active contradiction between the file-level documentation and the actual operational scope, not merely an omission in a single function comment.
The file header presents the script as a "东论发帖脚本" used to publish new posts without login, implying a narrower purpose. In practice, the code exposes additional capabilities to reply to threads, list hot articles, view article details, and fetch replies, which exceed the behavior described in the file's own stated intent.
The code hard-codes Accept-Language to zh-CN,zh;q=0.9, which imposes a specific language/locale preference on all requests. Under the policy, forcing a locale without user opt-in or documented justification is a natural-language policy concern.