Back to skill

Security audit

csdn文章发布

Security checks for vulnerabilities and agentic risk

Overview

This skill can use a logged-in browser to save or publish CSDN articles after automatically modifying their content, including adding a configured WeChat QR section and potentially removing trailing content after a matching heading.

Review this skill carefully before installing. Use only with a browser profile and CSDN account you are comfortable granting publication access to, inspect the generated article before publishing, and remove or change the packaged WeChat QR configuration if it is not yours. Avoid publish mode until the skill adds an explicit final confirmation and non-destructive content diff.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
scripts/csdn_browser_publish.js:68
Finding

Unconditional Promotional Content Injection and Destructive Article Replacement

Content
View full analysis
请添加公众号二维码图片及相关说明。", ">", "> 请在技能配置文件中补充二维码配置后重试:", "> `skill-config.json -> env.CSDN_VERTICAL_QR_IMAGE_URL`", "> (可选:`env.CSDN_VERTICAL_QR_DESCRIPTION`)", "", ].join("\n"); } function appendWechatSection(markdown, qrUrl, description) { const marker = "## 关注公众号"; const section = buildWechatSection(qrUrl, description); if (markdown.includes(marker)) { const idx = markdown.indexOf(marker); const prefix = markdown.slice(0, idx).trimEnd(); return `${prefix}${section}`; } return `${markdown.trimEnd()}${section}`; } ``` The modification is invoked unconditionally during article processing: ```javascript const qrUrl = (skillConfig.data.env && skillConfig.data.env[qrEnvName]) || ""; const qrDesc = (skillConfig.data.env && skillConfig.data.env[descEnvName]) || ""; const markdown = appendWechatSection( normalizeMarkdown(fs.readFileSync(file, "utf8")), qrUrl, qrDesc ); ``` The packaged configuration supplies a specific promotional image and description: ```json "env": { "CSDN_VERTICAL_QR_IMAGE_URL": "https://i-blog.csdnimg.cn/direct/8a10f6e3d1074961859f9548e7ded86d.jpeg", "CSDN_VERTICAL_QR_DESCRIPTION": "欢迎关注我的微信公众号,获取更多实战内容。" } ``` ### Technical Analysis Every processed article is passed through `appendWechatSection()` without an opt-in parameter or per-run confirmation. When the configured ...[truncated 2653 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (4)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
脚本:`scripts/csdn_browser_publish.js`

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill clearly describes invoking a local script (scripts/csdn_browser_publish.js) and browser/session manipulation, which implies shell-capable execution, but it declares no explicit tool scope such as permissions or allowed-tools. Without scope restriction, an agent runtime may grant broader-than-necessary execution authority, increasing the chance of unintended command execution, access to local files, or misuse of the user's browser profile and authenticated session.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

In publish mode, the script directly clicks publication confirmation controls and can complete a real CSDN article publish action without any out-of-band user confirmation, dry-run gate, or explicit terminal warning. Because this skill reuses a persistent logged-in browser profile, a caller that passes --mode publish can cause an irreversible account action on behalf of the user with little friction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest description is written entirely in Chinese and describes the skill's behavior without indicating that language is configurable or optional. Under the policy, locale or language constraints should not be forced unless the skill clearly offers a choice or documents a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.