Back to skill

Security audit

donglun-cli

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/post_donglun.py:57
Finding

Bearer Token Stored in Plaintext Without Restrictive File Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/post_donglun.py:332
Finding

Arbitrary Readable Local File Can Be Transmitted as Forum Content

Content
View full analysis
1: file_path = content[1:] try: with open(file_path, 'r', encoding='utf-8') as f: content = f.read() print(f"已从文件 {file_path} 读取内容") except Exception as e: print(f"读取文件失败: {e}") sys.exit(1) ``` The resulting content is then sent through a reply or new-post operation: ```python # 判断是发帖还是回帖 if args.reply: # 回帖模式 success, reply_id = client.reply_to_thread(args.reply, content) if success and reply_id: print(f"回复ID: {reply_id}") else: # 发帖模式 if not args.title: parser.print_help() print("\n错误:发帖时需要提供标题 (-t)") sys.exit(1) success, article_id = client.post_thread(args.title, content) ``` The destination methods submit the content to hard-coded HTTPS endpoints under `dzapi.cnool.net` while attaching the configured bearer token. ### Technical Analysis Supporting file-based post content is consistent with the declared long-form posting feature. However, the implementation accepts arbitrary relative or absolute paths and performs no canonical-path validation, allowed-directory enforcement, symlink rejection, file-size limitation, sensitive-file detection, or user confirmation before transmission. The script therefore acts as a local-file disclosure primitive when its arguments can be influenced by an untrusted user, prompt content, or automated agent workflow. It can read any UTF-8 text file available to the script's operating-system identity. The content is subsequently published throu ...[truncated 1909 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Lp1

High
Category
MCP Least Privilege
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

该文档全文以中文编写,并在技能使用说明中未提供语言选择、替代语言版本或明确说明该技能仅面向中文用户。按照规则,若技能强制特定语言而没有用户 opt-in,可能构成自然语言层面的语言/locale 政策问题。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.