Back to skill

Security audit

article-collect

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches an article-saving purpose, but its browser fetching is too broadly scoped and can navigate to arbitrary URLs without code-level safeguards.

Install only if you are comfortable with the skill using a browser to open URLs from the agent environment and storing article records under your home directory. Avoid using it with internal, localhost, private-network, authenticated, or sensitive URLs until the package enforces an allowlist and adds clearer confirmation around deletion and persistence.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
dist/fetch-content.js:7
Finding

Unrestricted Browser Navigation Enables Server-Side Request Forgery

Content
View full analysis

Vulnerability Details

File Location: dist/index.js:44-53; request execution occurs at dist/fetch-content.js:7-10
Vulnerability Type: Server-Side Request Forgery (SSRF) through unvalidated browser navigation
Risk Level: High

Vulnerable Code

dist/index.js:44-53:

js
if (action === "add_article") {
    const exists = db.article.some(k => k.url === url);
    if (exists) {
        console.log("该 URL 已存在,跳过重复添加");
    }
    else {
        const browser = await getBrowser();
        const content = await fetchUrlContent(browser, url);
        db.article.push({

dist/fetch-content.js:7-10:

js
export async function fetchUrlContent(browser, url) {
    const page = await browser.newPage();
    try {
        await page.goto(url, { waitUntil: "domcontentloaded" });

Technical Analysis

The add_article action accepts process.argv[3] as a URL and passes it to fetchUrlContent. That function supplies the value directly to Puppeteer's page.goto() without validating the URL scheme, hostname, resolved IP address, port, or redirect targets.

Although SKILL.md instructs the Agent to invoke this command only for mp.weixin.qq.com, this policy is not enforced by the executable. Consequently, any caller able to control the command argument can direct the browser to loopback addresses, private-network services, link-local resources, cloud metadata services, or attacker-controlled redirectors.

The response is reduced to text from #activity-name or .rich_media_title, limiting direct response disclosure. However, navigation itself can still reach protected services, trigger state-changing GET endpoints, and disclose selected internal page content through the title stored in the local article database.

Attack Path

  1. An attacker supplies a loopback, private-network, link-local, metadata-service, or redirecting URL as the add_article argument.
  2. The CLI reads th ...[truncated 1207 chars]
Remediation
View remediation

Remediation Suggestions

  1. Parse every supplied value with new URL() and reject malformed URLs.
  2. Permit only the https: scheme unless another scheme is explicitly required.
  3. Enforce the intended hostname in code, using an exact match for mp.weixin.qq.com or a narrowly defined allowlist. Do not rely solely on Agent instructions.
  4. Resolve the hostname before navigation and reject every loopback, private, link-local, multicast, unspecified, and reserved IPv4 or IPv6 address.
  5. Revalidate each redirect target because an allowed public URL may redirect to a prohibited destination.
  6. Prevent DNS-rebinding attacks by coupling validated resolution with the actual connection or by enforcing browser egress controls at the network layer.
  7. Restrict browser network access to explicitly approved destinations as defense in depth.
  8. Add automated tests covering localhost, RFC 1918 ranges, IPv6 loopback, link-local addresses, alternative IP representations, malicious redirects, and DNS rebinding scenarios.
Vulnerability Patterns
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The analysis indicates both network/browser access and local persistence under the user's HOME directory, while the description frames the skill as simple article collection. Combining undisclosed remote retrieval with local storage increases risk of collecting and retaining data beyond what users expect, especially when arbitrary URLs can be processed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The analysis indicates both network/browser access and local persistence under the user's HOME directory, while the description frames the skill as simple article collection. Combining undisclosed remote retrieval with local storage increases risk of collecting and retaining data beyond what users expect, especially when arbitrary URLs can be processed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The analysis indicates both network/browser access and local persistence under the user's HOME directory, while the description frames the skill as simple article collection. Combining undisclosed remote retrieval with local storage increases risk of collecting and retaining data beyond what users expect, especially when arbitrary URLs can be processed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The analysis indicates both network/browser access and local persistence under the user's HOME directory, while the description frames the skill as simple article collection. Combining undisclosed remote retrieval with local storage increases risk of collecting and retaining data beyond what users expect, especially when arbitrary URLs can be processed.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node dist/index.js <action> <content>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node dist/index.js <action> <content>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node dist/index.js <action> <content>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node dist/index.js <action> <content>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node dist/index.js <action> <content>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node dist/index.js <action> <content>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node dist/index.js <action> <content>

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file documents that the skill stores knowledge records in a JSON file and supports deleting entries, but it provides no explicit warning that running the delete command will permanently modify local user data. Under the markdown-specific warning rule, behaviors affecting user data or system integrity should be disclosed clearly.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill invokes local code (node dist/index.js ...) and the supplied analysis indicates environment access, but the manifest does not declare any permissions or allowed-tools scope. Missing scope declarations reduce transparency and reviewability, making it easier for a skill to exercise capabilities the operator did not clearly authorize.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation allows direct deletion of article records by index without warning, undo support, or confirmation. In a stateful skill that stores user data, destructive actions without confirmation can lead to accidental data loss and can be triggered too easily by natural-language instructions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation rule triggers on any user-sent URL, then decides whether to store it or open it in a browser. Overly broad URL-based triggering can cause unintended tool execution on benign conversational content, and in this skill context it may initiate network access or persistence without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The listed trigger phrases for querying records are broad natural-language phrases that may overlap with ordinary conversation. Ambiguous triggers increase the chance of unintentional record disclosure or tool execution when the user did not intend to invoke the skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill metadata says it only records and manages article URLs, but this code actively opens arbitrary user-supplied URLs in a browser and extracts page content. That expands the capability surface beyond the declared purpose, creating SSRF-style access risks to internal or local resources and increasing privacy and compliance exposure if sensitive pages are fetched without clear authorization or restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Calling page.goto(url) sends a network request to the supplied URL, which can leak user-provided targets to remote systems and trigger unintended requests from the agent environment. In combination with arbitrary URL input, this can be abused for probing internal endpoints, accessing metadata services, or fetching attacker-controlled pages without transparent notice to the user.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description says it records article URLs, but the implementation fetches remote page content and stores a summary alongside the URL. This creates a scope mismatch that can surprise users, persist more data than expected, and capture sensitive or copyrighted page content from authenticated or internal resources if the browser has access.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Using a browser to retrieve arbitrary user-supplied URLs expands the skill from local record-keeping into active network access. In an agent environment, this can be abused to access internal services, authenticated pages, or other sensitive resources reachable by the browser, making the capability more dangerous than the stated simple article-recording purpose suggests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill persists browser-fetched content to a local JSON file without warning the user that remote content will be stored. This can retain sensitive information from pages the browser can access, increasing privacy and data-handling risk beyond what a user would expect from a URL collection tool.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The delete_article branch performs a destructive local data modification by splicing an entry from the database and immediately saving the updated file. It prints a message only after deletion, but provides no confirmation prompt, pre-action warning, or inline documentation about the irreversible removal of stored records.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language content of the skill documentation is entirely in Chinese, with no indication that this locale is optional or required for a region-specific use case. Per the policy rule, forcing a specific language without user opt-in can be a language or locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The operational instructions, trigger phrases, outputs, and example user utterances are presented only in Chinese, including a fixed Chinese response for the empty state. There is no indication that the user may choose another language or that the skill is intentionally limited to a Chinese-language environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The hardcoded error string 获取url内容失败: enforces Chinese output regardless of user preference or environment. The file does not offer a language choice or document a justified region-specific constraint, which creates a locale policy concern.

Content

No source excerpt is available for this finding.