Back to skill

Security audit

Content Publisher Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill is a real content-publishing tool, but it asks users to use powerful publishing tokens while under-protecting them and can add fixed promotional links to public posts without adequate user control.

Review the exact content before publishing, especially summary or abstract mode, because it may add a fixed blog link and promotional text. Do not store real GitHub or Dev.to tokens in a tracked config.yaml; use environment variables or a secret manager where possible, add your own .gitignore, and scope tokens only to the target repository and publishing actions.

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
utils/content_processor.py:44
Finding

Hard-Coded Promotional Content and External Link Injection

Content
View full analysis

Vulnerability Details

File Location: utils/content_processor.py, lines 44–55
Vulnerability Type: Unconditional output modification and traffic diversion
Risk Level: Medium

Complete Code Snippet

python
        # 添加引流footer
        blog_url = "https://your-blog-url.com"
        footer = f"""

---

> 📢 **本文为精简版,完整版包含更多深度分析和独家内容,请访问 [博客]({blog_url}) 查看!**

*关注获取最新技术资讯和教程!*
"""
        
        summary_body = '\n'.join(summary_lines) + footer

A corresponding hard-coded link is also injected into abstract content at lines 73–77:

python
        blog_url = "https://your-blog-url.com"
        
        return {
            'title': title,
            'body': f"{excerpt}\n\n👉 阅读全文: {blog_url}",
            'tags': article_data.get('tags', []),
            'is_abstract': True
        }

Technical Analysis

The summary and abstract transformation routines append promotional language and a fixed external URL to user-authored content. This modification is not required to parse, summarize, optimize, or publish an article. The URL and promotional text cannot be configured or disabled independently.

The general concept of adding a traffic-diversion link is disclosed in SKILL.md, but the implementation does not obtain confirmation for the exact text or destination before publication. The dry-run path also does not display the transformed article body, so it does not provide an effective opportunity to review the injected content.

This behavior does not constitute agent instruction hijacking because it does not modify system instructions or agent safety constraints. It is an insecure output-integrity practice in which content not supplied by the user can be published under the user's identity.

Attack Path

  1. A user supplies an article and invokes the program with --mode summary or --mode abstract.
  2. publish.py calls generate_summary() or generate_abstract().
  3. The processor adds the fixed promotional message and `h ...[truncated 1050 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the promotional footer and external link from the default summary and abstract transformations.
  2. Introduce explicit configuration fields such as promotion.enabled, promotion.url, and promotion.text.
  3. Keep promotional output disabled by default and require affirmative user opt-in.
  4. Validate configured URLs, permitting only expected https:// destinations.
  5. Display the complete transformed article during dry-run rather than only reporting the target platform.
  6. Require confirmation before publishing when generated content differs from the source article.
  7. Add tests verifying that no external link or promotional text is inserted unless explicitly configured.
  8. Consider recording a clear diff between the original and transformed content before publication.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:193
Finding

False Assurance That Plaintext Credential Configuration Is Git-Ignored

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 193
Vulnerability Type: Insecure credential-handling documentation
Risk Level: Medium

Complete Code Snippet

markdown
3. **隐私保护**: 不要将 `config.yaml` 提交到公共仓库(已在 .gitignore 中忽略)

The same document instructs users to place credentials in a plaintext YAML file at lines 49–55:

yaml
github:
  token: "ghp_xxxxxxxxxxxx"       # GitHub Personal Access Token
  repo: "username.github.io"       # 博客仓库名 (格式: 用户名/仓库名)

devto:
  api_key: "xxxxxxxxxx"            # Dev.to API Key

Technical Analysis

The documentation states that config.yaml is excluded through .gitignore, but the audited project contains no .gitignore file. At the same time, users are instructed to store GitHub and Dev.to credentials in config.yaml.

This creates a hazardous mismatch between the documented protection and the repository's actual configuration. A user may reasonably rely on the claim and assume that Git will not stage the credential file. Because the protection is absent, normal commands such as git add . can include the plaintext secrets.

The application legitimately requires credentials for its publishing functions, but protecting those credentials is part of the minimum-security requirements for the workflow. The issue does not itself extract credentials; it increases the likelihood of accidental disclosure.

Attack Path

  1. A user follows the setup instructions and creates config.yaml.
  2. The user places an active GitHub personal access token and Dev.to API key in that file.
  3. The user relies on the documentation's statement that .gitignore excludes the file.
  4. Because no .gitignore exists in the audited project, the user runs a broad staging command such as git add ., which includes config.yaml.
  5. The user commits and pushes the repository.
  6. An unauthorized party with access to the repository retrieves the plaintext credentials.
  7. The party uses the Dev.to key to publi ...[truncated 931 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a tracked .gitignore containing at least:
gitignore
config.yaml
*.local.yaml
.env
.env.*
  1. Replace the nonexistent config.yaml.example reference with the existing safe example or add the documented example file without real credentials.
  2. Prefer environment variables or a dedicated secret manager over plaintext configuration values.
  3. If file-based credentials remain supported, validate restrictive file permissions and warn when the file is readable by other users.
  4. Add startup checks that warn when the configured secret file is tracked by Git.
  5. Document that accidentally committed credentials must be revoked and rotated immediately.
  6. Recommend narrowly scoped GitHub tokens restricted to only the target Pages repository.
  7. Add automated tests or repository checks that verify .gitignore continues to exclude local credential files.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明的核心能力是“一键发布”到两个平台,并支持 SEO 优化和去重检查;而给出的代码片段只是一个内容处理器,负责解析 Markdown 和生成不同长度的内容版本。它没有任何网络请求、平台 API 调用、仓库操作、发布逻辑、SEO 处理或重复检查实现。虽然“内容差异化”与生成精简版/摘要有一定相关性,但该代码的主要行为仍与声明的整体用途明显不符,且还包含未明确声明的固定导流链接注入行为。因此应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

该代码块的实际功能与声明描述不完全一致。代码确实包含“发布前去重检查”,并执行 Dev.to 平台的文章发布,但没有任何 GitHub Pages 相关逻辑,也没有看到内容差异化或 SEO 优化实现。因此,这个代码块只覆盖了声明中的一部分能力,且其主要行为是单独的 Dev.to 发布器模块,而不是所描述的完整多平台一键发布能力。未发现明显的额外未声明高风险能力;不匹配主要在于声明范围大于实际实现。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个可同时发布到 GitHub Pages 和 Dev.to 的工具,并包含内容差异化、SEO 优化、发布前去重检查等能力。实际代码只包含 GitHubPublisher:通过 GitHub Contents API 在仓库 _posts 目录创建/更新 Jekyll 文章,生成 slug、YAML front matter,并检查 _posts 中文件名是否包含对应 slug 以做简单去重。代码没有任何 Dev.to API 调用,也没有针对不同平台改写内容的逻辑,更没有 SEO 分析、元标签增强、关键词优化等处理。因此描述显著高于实际实现,属于能力不匹配。

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
89% confidence
Finding

The skill explicitly instructs users to place long-lived GitHub and Dev.to API tokens in a local YAML config file. Even though the example shows placeholders, normalizing secret storage in plaintext files increases the risk of accidental commit, local disclosure, backup leakage, or exposure through verbose logs and support bundles.

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

yaml
github:
  token: "ghp_xxxxxxxxxxxx"       # GitHub Personal Access Token
  repo: "username.github.io"       # 博客仓库名 (格式: 用户名/仓库名)

devto:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README instructs users to publish articles to GitHub Pages and Dev.to and to place API credentials in a local config file, but it does not explicitly warn that article content and authentication data will be transmitted to third-party services. In a publishing skill, this omission can cause users to underestimate privacy, data handling, and credential exposure risks, especially when posting unpublished or sensitive content.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description is written entirely in Chinese, and the rest of the skill documentation likewise assumes Chinese without indicating that the skill is intentionally China-specific or offering an alternative language. This creates a natural-language locale policy issue because the skill appears to enforce a specific language context without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file-level description is written as a Chinese-only product description, and all user-facing CLI descriptions and status messages in this file are also Chinese-only. There is no indication that language selection is optional or that the tool is intentionally region-specific, which can violate language/locale policy for general-purpose skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code uses Chinese-only natural-language strings in module docstrings, method docstrings, comments, and generated footer/output text. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.

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 · utils/devto_publisher.py (reported line 27)May include surrounding context.

python
if method == "GET":
            response = requests.get(url, headers=headers)
        elif method == "POST":
            response = requests.post(url, headers=headers, json=data)
        else:
            raise ValueError(f"不支持的HTTP方法: {method}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code file performs a network operation that transmits article content and authentication headers to an external service, and also makes the article immediately public via published: True. The file contains no confirmation prompt, user-facing logging/print, or warning comment/docstring disclosing that publication and data transmission will occur.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The module docstrings, comments, and user-visible messages are written exclusively in Chinese, indicating a fixed language choice. There is no indication that the skill is region-specific or that users can opt into a preferred language, which can violate language/locale policy requirements.

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 · utils/github_publisher.py (reported line 31)May include surrounding context.

python
if method == "GET":
            response = requests.get(url, headers=headers)
        elif method == "PUT":
            response = requests.put(url, headers=headers, json=data)
        else:
            raise ValueError(f"不支持的HTTP方法: {method}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code performs a remote file write to a GitHub repository by calling the contents API with PUT, which can create or overwrite blog posts. While there is a print when a file already exists, there is no general confirmation prompt or clear user-facing disclosure in this file before publishing occurs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This Python file’s natural-language strings, comments, and title optimization logic are written specifically for Chinese, including the hardcoded suffix '完整指南与实战'. That creates a locale/language constraint without any visible user opt-in or documentation justifying that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language guidance in the skill is presented entirely in Chinese, and the file does not indicate that this locale is optional or required for a region-specific purpose. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file applies to SQP-2, and it instructs users to fill in API keys and run a publishing command targeting GitHub Pages and Dev.to. The document does not include any user-facing warning about protecting credentials or that article content and metadata will be sent to third-party platforms during publication.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file's human-facing comments are written only in Chinese ('示例配置', '复制此文件为 config.yaml 并替换占位符') with no indication that other languages are supported. Under the policy rule, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency specifier requests>=2.28.0 is unpinned, so builds may resolve to different versions over time, undermining reproducibility and making it difficult to verify whether a vulnerable or breaking release is installed. In a publishing skill that performs outbound network operations, an unexpected dependency upgrade could introduce security regressions or supply-chain risk.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28.0
pyyaml>=6.0
markdown>=3.4.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
89% confidence
Finding

requests has multiple known advisories, and because the manifest does not pin an exact version, it is impossible to determine from this file alone whether the installed release is affected. In a skill that likely makes authenticated HTTP requests to platforms like GitHub or Dev.to, using an affected requests version could expose tokens, credentials, or request integrity.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency pyyaml>=6.0 is unpinned, which allows installation of any newer release without review. Because PyYAML has a history of security issues related to unsafe parsing/deserialization, leaving the version open-ended increases the chance of pulling in an affected or incompatible version in future environments.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
requests>=2.28.0
pyyaml>=6.0
markdown>=3.4.0

Unverifiable Dependency: pyyaml has 8 known advisory(ies) (CVE-2019-20477 (Deserialization of Untrusted Data in PyYAML); CVE-2020-1747 (Improper Input Validation in PyYAML); CVE-2020-14343 (Improper Input Validation in PyYAML) +5 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

PyYAML has several known advisories, and without an exact version pin the environment may install a vulnerable release. Given this skill handles content publishing and may ingest structured metadata or configuration, a vulnerable YAML library can increase risk of unsafe parsing or denial-of-service conditions if untrusted YAML is ever processed.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency markdown>=3.4.0 is unpinned, so the installed version may vary between deployments and could silently introduce vulnerable or unstable releases. For a content publishing skill that processes article text and markup, parser behavior changes can affect security and reliability.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
requests>=2.28.0
pyyaml>=6.0
markdown>=3.4.0

Unverifiable Dependency: markdown has 2 known advisory(ies) (CVE-2025-69534 (Python-Markdown has an Uncaught Exception); CVE-2025-69534 (Python-Markdown version 3.8 contain a vulnerability where malformed HTML-like se)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
86% confidence
Finding

markdown has known advisories, and the unpinned manifest prevents verification that deployed environments avoid affected versions. Because this skill publishes and transforms article content, a vulnerable markdown parser could be abused to trigger crashes or unexpected rendering behavior when processing malformed input.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The template sets categories to "技术", which imposes a specific language/locale choice in generated content. The file does not provide any user opt-in, alternative locale handling, or justification that this template is intended only for a Chinese-language context.

Content

No source excerpt is available for this finding.