Back to skill

Security audit

blog-toolkit

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed blog-management CLI, but it can create, modify, upload, and delete public blog data with weak guardrails.

Install only if you trust the target Blog API and intend the agent to manage that site. Use a non-production endpoint or a least-privileged, protected API where possible, prefer HTTPS, avoid passing sensitive files or passwords through commands, and require human approval before any create, update, upload, or delete operation.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
blog-toolkit.py:484
Finding

Path Injection in Uploaded-File Deletion Endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
blog-toolkit.py:148
Finding

Sensitive User Data Can Be Transmitted over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned and Overly Broad Third-Party Dependency

Content
View full analysis
=2.20.0 ``` ### Technical Analysis The dependency specification permits any `requests` release from version 2.20.0 onward. It does not pin an exact reviewed version, impose an upper compatibility boundary, provide cryptographic hashes, or include a lockfile. As a result, separate installations can resolve to different dependency versions. Future releases become eligible without project review, while constrained environments may continue using substantially older permitted releases. Transitive dependencies are also left unresolved and unhashed. This is not evidence that the legitimate `requests` package is malicious. The risk arises from non-reproducible installation and the absence of integrity controls around the dependency set. ### Attack Path 1. An operator follows the documented installation process: ```bash pip install -r requirements.txt ``` 2. The package resolver selects whichever eligible `requests` release and transitive dependencies are available from the configured package index at installation time. 3. A newly compromised, vulnerable, or incompatible eligible release can be installed without a source change in this project. 4. Dependency code is imported when `_api_request` executes: ```python import requests ``` 5. Any malicious or compromised dependency code then executes with the privileges of the CLI process. Exploitation requires compromise or unsafe control of the package source, resolver configuration, or an eligible dependency release; the current repository does not itself contain such a payload. ### Impact Assessment A compromised dependency executes in the local Python process and therefore inherits the user's operating-system privileges. It could access files readable by the user, in ...[truncated 306 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (31)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The documented delete-article operation exposes a destructive parameterized action, including an option for hard deletion via soft=false, against an explicitly unauthenticated public API. In this skill context, an agent or user can directly invoke irreversible content deletion by supplying an article ID, making abuse trivial.

Content

Scanner excerpt · api-reference.md (reported line 30)May include surrounding context.

md
- 响应:`{"code":200,"data":{...}}`
- 子命令:`update-article`

### 5. DELETE /api/articles/{article_id} — 删除文章
- 参数(path):`article_id*(int)`;(query):`soft(bool,默认true)`,soft=false 硬删除
- 响应:`{"code":200,"data":{...}}`
- 子命令:`delete-article`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The documented comment deletion endpoint enables direct deletion by comment_id on a public unauthenticated API. Because the skill is a CLI wrapper for these endpoints, it facilitates straightforward moderation abuse or censorship by anyone who can enumerate IDs.

Content

Scanner excerpt · api-reference.md (reported line 83)May include surrounding context.

md
- 响应:`{"code":200,"data":{id,...}}`
- 子命令:`create-comment`

### 14. DELETE /api/comments/{comment_id} — 删除评论(软删除)
- 参数(path):`comment_id*(int)`
- 响应:`{"code":200,"data":{...}}`
- 子命令:`delete-comment`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The message deletion endpoint allows a destructive action keyed only by message_id and is documented as part of an unauthenticated public API. This makes unauthorized removal of user-generated content easy to automate through the skill.

Content

Scanner excerpt · api-reference.md (reported line 105)May include surrounding context.

md
- 响应:`{"code":200,"data":{id,...}}`
- 子命令:`reply-message`

### 18. DELETE /api/messages/{message_id} — 删除留言(软删除)
- 参数(path):`message_id*(int)`
- 响应:`{"code":200,"data":{...}}`
- 子命令:`delete-message`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The mood deletion endpoint is another direct destructive operation on a public unauthenticated API. Even if limited to informal content, it still permits unauthorized content tampering and service abuse through simple ID-based requests.

Content

Scanner excerpt · api-reference.md (reported line 122)May include surrounding context.

md
- 响应:`{"code":200,"data":{id,...}}`
- 子命令:`create-mood`

### 21. DELETE /api/moods/{mood_id} — 删除说说
- 参数(path):`mood_id*(int)`
- 响应:`{"code":200,"data":{...}}`
- 子命令:`delete-mood`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The upload deletion endpoint is especially dangerous because the same document also explains how to enumerate uploaded files and obtain the exact filename token needed for deletion. In an unauthenticated public API, this enables bulk deletion of stored files and potentially broader disruption of site assets or user content.

Content

Scanner excerpt · api-reference.md (reported line 147)May include surrounding context.

md
- 子命令:`list-uploads`
- 注意:列表项的 `filename` 即存储文件名(hash),可直接用于 delete-upload

### 25. DELETE /api/uploads/{filename} — 删除已上传文件
- 参数(path):`filename*(str)` — 存储文件名(hash,即 upload 返回 `data.url` 路径末段,或 list-uploads 返回的 `filename`)
- 响应:`{"code":200,"message":"文件已删除"}`
- 子命令:`delete-upload`

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
96% confidence
Finding

The skill scans all environment variables and harvests any matching username, password, token, API key, and base URL values under the prefix, even though this particular skill uses no authentication. Broad secret collection is dangerous because it expands the sensitive data the process reads and can be combined with future logging, error handling, or code changes to leak credentials.

Content

Scanner excerpt · blog-toolkit.py (reported line 61)May include surrounding context.

python
def _load_credentials():
    """动态扫描环境变量获取认证凭据(前缀由 skill name 推导)。"""
    creds = {}
    for k, v in os.environ.items():
        u = k.upper()
        if u.startswith(_CRED_PREFIX):
            if 'USERNAME' in u or u.endswith('_USER'):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

This tool exposes a high-impact parameterized delete capability, including hard delete control via soft=false, with no policy enforcement or confirmation. In an agent context, such direct destructive primitives are susceptible to prompt injection, operator mistakes, or misuse against arbitrary article IDs on a public API.

Content

Scanner excerpt · blog-toolkit.py (reported line 316)May include surrounding context.

python
def cmd_delete_article(args):
    """能力 E:删除文章(默认软删除,soft=false 硬删除)。"""
    # DELETE /api/articles/{article_id}
    params = {'soft': 'true' if args.soft else 'false'}
    return _api_request('DELETE', '/api/articles/%s' % args.article_id,
                        params=params)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The tool permits arbitrary comment deletion by ID without verification of ownership, confirmation, or runtime policy checks. As an agent skill for an unauthenticated public API, this creates a strong misuse primitive for destructive moderation actions.

Content

Scanner excerpt · blog-toolkit.py (reported line 391)May include surrounding context.

python
def cmd_delete_comment(args):
    """能力 N:删除评论(软删除)。"""
    # DELETE /api/comments/{comment_id}
    return _api_request('DELETE', '/api/comments/%s' % args.comment_id)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

This is a direct arbitrary message-deletion primitive exposed through a low-friction CLI interface. The public/no-auth API context makes the capability more dangerous because there is no compensating authentication boundary enforced by the client.

Content

Scanner excerpt · blog-toolkit.py (reported line 419)May include surrounding context.

python
def cmd_delete_message(args):
    """能力 R:删除留言(软删除)。"""
    # DELETE /api/messages/{message_id}
    return _api_request('DELETE', '/api/messages/%s' % args.message_id)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

The mood deletion command is another arbitrary destructive operation that trusts a single input parameter and immediately calls the remote API. In tool-using agent systems, such unchecked destructive endpoints are a common abuse path.

Content

Scanner excerpt · blog-toolkit.py (reported line 440)May include surrounding context.

python
def cmd_delete_mood(args):
    """能力 U:删除说说。"""
    # DELETE /api/moods/{mood_id}
    return _api_request('DELETE', '/api/moods/%s' % args.mood_id)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Deleting uploaded files by arbitrary filename gives the tool a direct remote content-destruction capability with no guardrails. Because the filename is user-supplied and the API is public, an attacker or bad prompt can steer the tool toward deleting content with minimal resistance.

Content

Scanner excerpt · blog-toolkit.py (reported line 485)May include surrounding context.

python
def cmd_delete_upload(args):
    """能力 Y:删除已上传文件。"""
    # DELETE /api/uploads/{filename}
    return _api_request('DELETE', '/api/uploads/%s' % args.filename)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares operational capabilities that read project files, consume environment variables, and make network requests, but it does not declare an explicit tool scope such as allowed-tools or permissions. In an agent environment, that ambiguity weakens least-privilege controls and can let the skill access broader resources than a reviewer or runtime policy expects.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The task-completion instructions require the final JSON block contents to be written in Chinese, such as the example strings and field guidance, but do not provide any user opt-in or alternative language option. This creates a locale/language constraint in the skill's natural-language behavior that may violate organizational language-choice policy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file describes deletion capabilities, including article deletion with an explicit hard-delete option, but does not include any warning about data loss, reversibility, or the need for care when invoking the command. Under the markdown-specific SQP-2 criteria, destructive behaviors affecting user data should be disclosed to users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document explicitly describes a public unauthenticated user-list endpoint returning personal data fields including phone, email, address, and profession. In this skill context, that makes privacy exposure easy to discover and operationalize, enabling bulk harvesting of PII from a public API.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file documents unauthenticated upload, listing, and deletion capabilities for server-hosted files, including exactly how to derive deletion identifiers from responses. In a CLI management skill, this materially lowers the barrier to arbitrary file hosting abuse, mass enumeration, and deletion of stored content.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L092-L095 的说明明确表示“只读 base_url/api_url/host——不读 token/密码等敏感凭据”。但实际执行路径中,_get_base_url 在 L137 调用 _load_credentials,而 _load_credentials 在 L61-L73 会遍历并读取 BLOG_TOOLKIT 前缀下的 username、password、token、api_key 和 base_url 环境变量。该注释对实际敏感信息读取行为形成了直接误导。

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · blog-toolkit.py (reported line 220)May include surrounding context.

python
if method == 'GET':
            resp = requests.get(url, params=params, timeout=30, **auth_kwargs)
        elif method == 'POST':
            resp = requests.post(url, json=payload, files=files, timeout=30,
                                 **auth_kwargs)
        elif method == 'PUT':
            resp = requests.put(url, json=payload, files=files, timeout=30,

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · blog-toolkit.py (reported line 223)May include surrounding context.

python
resp = requests.post(url, json=payload, files=files, timeout=30,
                                 **auth_kwargs)
        elif method == 'PUT':
            resp = requests.put(url, json=payload, files=files, timeout=30,
                                **auth_kwargs)
        elif method == 'PATCH':
            resp = requests.patch(url, json=payload, timeout=30,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill exposes a remote delete operation for articles, including hard delete via soft=false, with no confirmation prompt, dry-run mode, or high-friction safety flag. In an agent/tooling context, this increases the chance of accidental or prompt-induced destructive actions against a live public API.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Comment deletion triggers a remote destructive action immediately with no user confirmation or secondary safety check. In an agent setting, this makes accidental deletion or instruction-injection-driven misuse materially easier.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Message deletion is executed directly from a single parameter with no confirmation, preview, or guardrail. Because the API is explicitly unauthenticated and public, misuse is easier and accidental destructive actions have lower friction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The mood deletion command performs an irreversible remote action from a single ID input without any human-in-the-loop confirmation. This is risky in CLI skills intended for agent use, where malformed inputs or adversarial prompts can trigger deletions unintentionally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This command reads a local file and transmits its contents to a remote host without an explicit warning at execution time about data exfiltration risk. In agent-mediated workflows, local file paths may come from untrusted prompts, so the lack of friction increases the chance of unintended disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Batch upload amplifies the previous risk by allowing multiple local files to be transmitted to a remote service in one action, again with no warning or confirmation. If driven by an agent or copied instructions, this can quickly exfiltrate a set of unintended files.

Content

No source excerpt is available for this finding.