Back to skill

Security audit

整理当天AI行业新闻发布到公众号

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims at a high level, but it can affect a WeChat public account and the local environment with too little scoping and confirmation.

Review this carefully before installing. Only use it in an isolated workspace or low-privilege account, provide WeChat credentials through a dedicated secret mechanism rather than shared TOOLS.md, preinstall and pin @wenyan-md/cli yourself instead of allowing automatic global npm installation, and require manual confirmation before any WeChat draft is created.

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)

T08 · Insecure Dependencies

Error
Location
scripts/publish.sh:20
Finding

Automatic Installation of an Unpinned Global npm Package

Content
View full analysis
/dev/null; then npm install -g @wenyan-md/cli fi ``` ### Technical Analysis The publishing workflow automatically downloads and globally installs `@wenyan-md/cli` when the `wenyan` command is unavailable. The dependency is not pinned to an audited version, and the installation is not protected by a lockfile, package integrity hash, trusted artifact repository, or explicit user approval. Consequently, the effective code executed by the Skill can change after the Skill itself has been reviewed. A compromised npm publisher account, registry compromise, or malicious future package release could introduce arbitrary code through package installation scripts or the installed executable. The global installation scope increases the risk because files may be written outside the project directory. The installation and package lifecycle scripts execute with the privileges of the user running `publish.sh`. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or its dependency chain. 2. The attacker publishes a malicious version under the existing package name. 3. A user invokes `scripts/publish.sh` on a system where `wenyan` is not installed. 4. The script executes `npm install -g @wenyan-md/cli` without a version constraint. 5. npm retrieves the current mutable package version and runs any enabled installation lifecycle scripts. 6. The malicious package executes with the privileges of the invoking account. 7. If the Skill is run by a privileged account, the package may modify globally accessible files, steal credentials available to the process, or compromise the host. ### Impact Assessment Successful exploitation permits arbitrary ...[truncated 335 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/scrape_news.py:135
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup.sh:5
Finding

Plaintext WeChat Credentials Loaded from a Shared Workspace File

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented behavior does not cleanly match the actual operational behavior described by the analyzer, especially around local publishing actions, credential usage, and package installation. When a skill's description understates what it can really do, users and orchestrators cannot accurately assess risk, which can lead to unexpected credential access or content publication.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior does not cleanly match the actual operational behavior described by the analyzer, especially around local publishing actions, credential usage, and package installation. When a skill's description understates what it can really do, users and orchestrators cannot accurately assess risk, which can lead to unexpected credential access or content publication.

Content

No source excerpt is available for this finding.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding

An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Content

No source excerpt is available for this finding.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding

An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Content

No source excerpt is available for this finding.

Concealed Executable Artifact

High
Category
Supply Chain
Confidence
100% confidence
Finding

An executable nested in a document or hidden/disguised artifact can evade ordinary extension-based review while still being available to the skill at runtime.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs the agent to use shell commands, network access, and file writes, but it does not declare any explicit tool scope or permissions boundary. This is dangerous because an agent or runtime may execute higher-risk actions than a user expects, including external network retrieval, local file modification, and publishing-related shell execution, without clear consent or restriction.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad and could match routine requests about publishing or writing articles, causing accidental invocation of a skill that performs network fetching and prepares content for WeChat publication. In this context, overbroad activation is risky because the skill can progress toward an external publishing workflow without a sharply delimited user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill publishes content to a WeChat public account draft box but does not prominently warn the user or require explicit confirmation immediately before that action. This is dangerous because publishing-related actions affect an external account and brand presence, and accidental or unauthorized draft creation can leak sensitive content, create reputational harm, or trigger downstream approval workflows.

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 recommends stealthy-fetch and proxy usage to bypass anti-bot protections, but provides no warning about compliance with site terms, legal restrictions, or operator authorization. In the context of an automated AI-news publishing skill that targets third-party news sites, this guidance can normalize evasive scraping behavior and increase the likelihood of unauthorized collection at scale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file contains user-facing instructional content only in Chinese, which effectively forces a specific language experience. Under the policy rule, a skill should not impose a language or locale without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The script performs a runtime global npm install, which executes code from the npm supply chain with the user's privileges and modifies the host environment outside the skill's directory. This expands the trust boundary and can lead to arbitrary code execution or persistence if the package or dependency chain is compromised.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script reads WeChat credentials from a broad shared TOOLS.md file and exports them into the environment, creating unnecessary secret exposure and coupling this skill to a general credential store. In a multi-skill workspace, this increases the chance of unintended credential access, parsing mistakes, or secret leakage through logs, process environments, or reuse by other commands.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script silently edits the user-supplied markdown file in place by inserting a cover field, which can unexpectedly alter source content and break workflows that assume inputs are read-only. While not a direct code-execution issue, silent mutation is risky in automation because it can corrupt content, taint repositories, or publish unintended metadata.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script's user-facing description, help text, and status/error messages are all in Chinese, with no option for users to select another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User-facing comments and echo messages are written in Chinese throughout the script, which imposes a specific language on users without opt-in. The policy allows locale constraints only when user choice is offered or the restriction is clearly documented and justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script reads WeChat credentials from a shared TOOLS.md file and exports them into the current shell environment, increasing their exposure to any later commands, subprocesses, logs, or debugging output in the agent session. In this skill context, those credentials are directly tied to publishing to a public WeChat account, so compromise could enable unauthorized content publication or abuse of the account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

Natural-language strings in the script, including the top-level description and status messages, are presented only in Chinese. There is no indication that the skill is region-specific or that users can opt into this locale, which can violate language-choice policy expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code writes scraped data to a user-specified path, but there is no confirmation prompt or warning that running the script will create or overwrite a file at that location. Although the CLI argument name suggests output behavior, the file-writing side effect itself is only disclosed after the write completes.

Content

No source excerpt is available for this finding.