Back to skill

Security audit

smart-collect

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its note-taking purpose, but it can fetch arbitrary network URLs and read or rewrite Markdown files outside its intended storage folder through unvalidated inputs.

Review before installing. Use this only with URLs and storage paths you trust, avoid internal or private URLs, and assume fetched content may be sent to DeepSeek if LLM configuration is enabled. The collection ID handling should be fixed before relying on it around private Obsidian vaults or shared command inputs.

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

T09 · Insecure Skill Coding Practices

Error
Location
lib/fetcher.js:138
Finding

Server-Side Request Forgery Through Unrestricted URL Fetching

Content
View full analysis
{ const url = new URL(urlStr); const protocol = url.protocol === 'https:' ? https : http; const options = { hostname: url.hostname, path: url.pathname + url.search, headers: { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36' }, timeout: 30000 }; protocol.get(options, (res) => { if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { return httpGet(res.headers.location).then(resolve).catch(reject); } let data = ''; res.on('data', chunk => data += chunk); res.on('end', () => resolve(data)); }).on('error', reject).setTimeout(options.timeout, () => { reject(new Error('请求超时')); }); }); } ``` The untrusted URL originates from command-line input in both add workflows: ```js // scripts/shoucang-add.js:32-41 const url = process.argv[2]; if (!url) { console.log('用法: node shoucang-add.js '); process.exit(1); } console.log(`开始抓取: ${url}`); try { // 1. 抓取网页 const fetchResult = await fetcher.fetch(url); ``` ```js // scripts/smart-collect.js:69-74 if (args[0] === 'add' && args[1]) { const url = args[1]; console.log(`抓取: ${url}`); try { const fetchResult = await fetcher.fetch(url); ``` ### Technical Analysis The application sends requests to a user-controlled URL without validating the destination hostname, resolved IP address, port, or redirect target. An attacker able to invoke either add workflow can therefore make the process request HTTP services available from the host's network context. There are no controls preventing access to: - Loopback addresses such as `127.0.0.1` ...[truncated 2697 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
lib/markdownStore.js:145
Finding

Path Traversal Through Unvalidated Collection Identifiers

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented purpose emphasizes URL collection and Obsidian persistence, but the described operational path includes undeclared notification behavior and appears centered on review execution instead. Such mismatch is risky because it prevents informed approval, especially where notifications or background actions may occur in unattended scheduled contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented purpose emphasizes URL collection and Obsidian persistence, but the described operational path includes undeclared notification behavior and appears centered on review execution instead. Such mismatch is risky because it prevents informed approval, especially where notifications or background actions may occur in unattended scheduled contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The documented purpose emphasizes URL collection and Obsidian persistence, but the described operational path includes undeclared notification behavior and appears centered on review execution instead. Such mismatch is risky because it prevents informed approval, especially where notifications or background actions may occur in unattended scheduled contexts.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented purpose emphasizes URL collection and Obsidian persistence, but the described operational path includes undeclared notification behavior and appears centered on review execution instead. Such mismatch is risky because it prevents informed approval, especially where notifications or background actions may occur in unattended scheduled contexts.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill documents capabilities that imply shell, network, and environment access but does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, this weakens least-privilege controls and can allow the skill to run with broader access than users would reasonably infer from the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

A skill that automatically fetches arbitrary URLs and sends content to an external LLM creates clear privacy and data-handling risks, yet the description provides no warning or limitation. Users may inadvertently submit private, internal, or regulated content to third parties, especially when the workflow appears to be a simple note-taking helper.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · lib/fetcher.js (reported line 233)May include surrounding context.

js
}

    const [_, owner, repo] = match;
    const apiUrl = `https://api.github.com/repos/${owner}/${repo}`;

    const data = JSON.parse(await httpGet(apiUrl));
    result.title = data.name || '';

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes analyzing and summarizing URL content, then saving it to Obsidian and sending review reminders. In this file, the dynamic-page path introduces child_process usage and a local browser snapshot service integration, which is a materially stronger capability than simple content retrieval and is not justified by the stated purpose in the manifest.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The comments in this method say it fetches dynamic pages with a browser and references a curl command to a browser snapshot tool. However, the command is never executed, the imported spawn function is unused, and the function simply marks the result as needing browser handling and resolves immediately.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function sends up to 5000 characters of fetched page content to an external DeepSeek API for summarization without any user-facing notice, consent flow, or data classification checks. Because fetched URLs may contain private, proprietary, or sensitive content, this can cause unintended data exfiltration to a third party.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The summarization prompt requires Chinese tags and categories and is written to produce output in Chinese, but there is no indication that this language choice is user-selectable or justified as region-specific. This creates a language/locale policy issue because the skill imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The delete method removes a file with fs.unlinkSync, but there is no confirmation prompt, logging, or comment/docstring warning that this is a destructive operation. For code files, irreversible file deletion should include some form of user disclosure unless clearly covered elsewhere.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

All natural-language instructions, command matching, error messages, and supported command examples are fixed in Chinese, and the parser only recognizes Chinese phrases. This enforces a specific language/locale without any visible opt-in or justification, which matches the language-policy violation criterion.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a skill focused on analyzing URL content, saving summaries to Obsidian, and issuing review reminders. This parser additionally supports listing all stored items, viewing item details, archiving items, and adding/removing tags, which are broader collection-management capabilities not stated in the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The parser treats inputs containing '归档' or '看完' as an instruction to update stored metadata and archive the item immediately. Although the code comment describes the behavior for developers, there is no user-facing confirmation, warning, or visible disclosure before performing this write operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The '添加标签' path reads the item and updates its tags, which changes stored data, but the code provides no confirmation prompt or user-facing disclosure of the write. The existing inline comments are developer-only and do not satisfy the warning requirement for safety-relevant file modifications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

When '删除标签' matches, the code removes a tag and writes the updated tag list back to storage. This is a user-data modification with no confirmation, warning, or user-facing log explaining that the change will be persisted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The natural-language strings and comments in this file are entirely in Chinese, including the notifier description, without any indication that the skill supports other languages or that Chinese is an explicit user-selected locale. Under the policy, forcing a specific language without opt-in can be a locale-policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The user-facing comments and console messages are entirely in Chinese, including usage, warnings, progress, and error output. This imposes a specific language on users without any visible opt-in, selection mechanism, or documented justification that the skill is intended only for a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This JavaScript file contains the skill description, help text, and command examples entirely in Chinese, and the interface shown to users does not offer any language or locale selection. That creates a natural-language policy concern because the skill effectively requires a specific language without documented opt-in or justification.

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 instructions and descriptions are entirely in Chinese, which can amount to a language policy issue when no user opt-in, alternative language, or justification is provided. There is no indication that the skill is intentionally restricted to Chinese-speaking users or a China-specific compliance context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The file's natural-language comments and user-facing string literals are exclusively in Chinese, including error messages and default content labels. This can indicate a language policy constraint without offering users a language choice or documenting that the skill is intentionally Chinese-only.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The '已回顾'/'回顾' branch updates review counters and timestamps in storage, but there is no user-facing indication that invoking this natural-language command will write metadata changes. The surrounding comments are not visible to users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code sends item data through notifier.send(item), which is a network-capable notification action per the comment indicating a Feishu notifier. While the operation is commented for developers, there is no user-facing warning, confirmation, or visible log here to disclose that review data may be transmitted externally.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
lib/fetcher.js:13