Back to skill

Security audit

Knowledge Curator

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real knowledge-base skill, but it needs review because it fetches arbitrary URLs and writes/deletes persisted files with weak validation.

Review before installing, especially in cloud, enterprise, or shared-agent environments. The skill should add URL destination validation, block private/internal addresses, cap response sizes, allowlist or contain category paths, redact sensitive URL parameters, and require clear confirmation for saving sensitive links and deleting entries. If used before fixes, run it in an isolated environment with no access to internal networks or sensitive local files.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/fetch.js:45
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis
{ const protocol = url.startsWith('https') ? https : http; const options = { headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8' } }; const req = protocol.get(url, options, (res) => { let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { resolve(data); }); }); ``` The input reaches this code without security validation: ```javascript async function processLink(url, options = {}) { console.log(`Processing link: ${url}`); try { const content = await fetch.fetchContent(url); ``` ### Technical Analysis The application performs an HTTP request to a caller-supplied URL without validating the destination. It does not enforce a strict scheme allowlist through structured URL parsing, resolve and inspect the destination IP address, or reject loopback, private, link-local, multicast, and reserved address ranges. The platform-recognition logic does not provide a security boundary. Unknown destinations are handled by the generic fetching strategy and therefore remain reachable. An attacker can consequently direct the process to HTTP services that are inaccessible from the attacker's own network but accessible from the environment running the Skill. The implementation also lacks controls against DNS rebinding. If redirect support is added ...[truncated 1378 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/store.js:176
Finding

Unvalidated Category Allows Path Traversal and Filesystem Writes Outside the Knowledge Base

Content
View full analysis
:"/\\|?*]/g, '_').substring(0, 50); const fileName = `${entryId}-${safeTitle}.md`; const filePath = path.join(knowledgeBasePath, entry.category, fileName); // Generate Markdown content const markdownContent = generateMarkdown(entry); // Write file fs.writeFileSync(filePath, markdownContent, 'utf-8'); ``` ### Technical Analysis Although the title is partially sanitized, `entry.category` is not validated or normalized as an allowed category. A caller can supply traversal components such as `../` in `options.category`. `path.join()` normalizes traversal segments but does not enforce containment within `knowledgeBasePath`. As a result, a category such as `../../target-directory` can resolve to a location outside the intended knowledge-base root. The generated filename is not fully attacker-selected, which limits direct replacement of a specific filename, but it does not prevent creation of an attacker-influenced Markdown file in an unauthorized directory. The supported categories are already present in `CONFIG.categories`, so accepting arbitrary path values is un ...[truncated 1417 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
knowledge-base/чФЯц┤╗/kb-20260316-001.md:3
Finding

Plaintext Platform Security Token Is Bundled and Persisted in Stored URLs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch.js:66
Finding

Unbounded HTTP Response Buffering Permits Memory Exhaustion

Content
View full analysis
{ data += chunk; }); res.on('end', () => { resolve(data); }); ``` ### Technical Analysis The HTTP response is accumulated into a JavaScript string without a byte limit. Although extracted page text is later truncated, that truncation happens only after the complete HTTP response has been downloaded and buffered. The ten-second request timeout does not provide an adequate size limit. A server can transmit a very large amount of data within that interval, and request timeouts may not stop a continuously active response in the same way as a strict overall deadline. The code also does not inspect `Content-Length`, constrain accepted response media types, or limit decompressed response size. Repeated large responses can increase garbage-collection pressure and exhaust the Node.js heap, terminating or substantially degrading the Agent process. ### Attack Path 1. An attacker hosts an endpoint that returns a very large response body or continuously streams data. 2. The attacker asks the Skill to save that URL. 3. `fetchHtml()` appends every received chunk to `data`. 4. Memory consumption grows until the response ends, the process becomes unstable, or the Node.js heap is exhausted. 5. Repeating the request increases the likelihood of service interruption. ### Impact Assessment Exploitation can cause elevated memory use, severe latency, process termination, and loss of availability for all users sharing the Agent process. The issue does not directly grant additional privileges, but it can disrupt knowledge-base operations and other co-located Agent functions. The impact depends on the Node.js heap limit, concurrency, response transfer speed, and whether a supervisor automatically restarts the process. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (28)

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The README claims 'only explicit user instructions' should trigger saving, but immediately contradicts that with '直接发送链接即可', meaning a bare link may cause collection and persistence. This ambiguity can lead to unintended data capture, remote fetching of user-supplied URLs, and permanent storage of content without clear affirmative consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file says the skill supports fetching content from multiple platforms, and later mentions integrating external AI APIs and cloud sync. In a markdown skill description, these behaviors should include a user-facing warning that links, content, or knowledge-base data may be transmitted to third-party services or remote systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This is a markdown file, so SQP-2 applies to user-facing descriptions of risky behavior. The document shows /kb delete and /kb export as available management commands, but it does not warn that deletion may be irreversible or that export may expose stored knowledge contents to other locations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The quickstart tells users that content will be automatically fetched, summarized, classified, and saved, but gives no notice about data collection, retention, or possible transmission of linked content to external services. In a knowledge-curation skill, this omission can cause users to submit links or notes containing sensitive, copyrighted, or private material without understanding the storage and processing implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file documents a destructive operation that affects user data, but it provides no caution, confirmation note, or recovery guidance near the delete command. Under the markdown criteria for missing user warnings, users should be warned when a skill can remove stored content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
71% confidence
Finding

The entire user-facing documentation, commands, category names, and examples are presented in Chinese, with no indication that other languages are supported or that the user can choose their locale. This can constitute a language/locale policy issue when a skill implicitly enforces one language without opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill is described as automatically fetching external links, generating AI summaries, and writing structured entries to a local knowledge base, but the README does not prominently warn users that submitted URLs may trigger outbound requests and persistent local storage. Users may unknowingly disclose sensitive links or cause the system to retain private content longer than intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly stores structured knowledge-base entries that may include full or abridged original content, extracted page text, transcripts, and user-added notes, but it does not clearly warn users about the privacy and data-handling implications of persisting that material. This can lead to unintended retention or export of sensitive personal data, copyrighted content, or confidential notes, especially because the skill supports export and broad multi-platform ingestion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documented /kb delete <id> command exposes destructive behavior without any stated confirmation, undo, or warning about permanent data loss. In a knowledge-management skill that stores curated content over time, accidental or ambiguous deletions could remove valuable or sensitive records irreversibly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The titles, platform labels, categories, and tags are all specified in Chinese, which indicates the skill content is constrained to a specific language/locale. The file does not document that this knowledge base is China-specific or that users can opt into Chinese-language content, which can violate the language/locale policy for natural-language behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The examples explicitly show automatic extraction of video subtitles and summarization, but provide no consent, privacy, retention, or copyright-handling notice. In a knowledge-curation skill that ingests third-party content, this can cause users to process personal, copyrighted, or sensitive content without understanding what is stored or transformed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language interface and taxonomy are entirely hard-coded in Chinese, including category names, comments, and CLI output. There is no indication that this skill is region-specific or that users can opt into another language, which can violate a language/locale policy requiring user choice or justification.

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 · scripts/config.js (reported line 150)May include surrounding context.

js
aiService: {
    provider: 'openai',  // 或 'anthropic', 'bailian', etc.
    apiKey: process.env.AI_API_KEY,
    endpoint: 'https://api.openai.com/v1/chat/completions',
    model: 'gpt-3.5-turbo',
    maxTokens: 500
  },

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The searchKnowledge function shadows the imported query module with a string parameter named query, then attempts to call methods on that string. This causes runtime failures or denial of service for search operations, and in some JS environments could trigger unexpected method resolution behavior if the value is attacker-controlled and not a plain string.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The deleteEntry path performs deletion immediately with no confirmation, preview, or safety guard. In an agent or CLI context, this increases the risk of accidental or socially engineered destructive actions that can permanently remove knowledge-base data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The help text and command examples are presented only in Chinese for core user workflows such as saving content and querying the knowledge base. This creates a language/locale constraint without any opt-in or alternative language support, which matches the policy's language-choice concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code forces date formatting to the zh-CN locale, which imposes a specific language/locale behavior regardless of user preference. This is a natural-language policy concern because the skill does not offer opt-in, fallback, or configuration for other locales.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The deleteEntry function deletes a stored file with fs.unlinkSync and updates the index, but there is no confirmation prompt or explicit user-facing disclosure that this operation irreversibly removes data. Although errors are logged, the code does not warn the user before performing the destructive action.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JavaScript file documents its behavior and presents CLI output entirely in Chinese, which imposes a specific language on users without any opt-in or alternative locale. The policy for natural-language violations applies to all file types, including code comments and string literals.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file’s natural-language strings, comments, labels, and category values are consistently Chinese-only, indicating a fixed language/locale choice. Under the policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. This file presents the skill report and usage instructions entirely in Chinese, while not stating that the skill is region-specific or that users can select another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

A language-only presentation can violate locale-choice policy when it forces a specific language without user opt-in. This file provides no indication that the skill is China-region-specific or that alternative language documentation is available.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all user-facing content in a single language and does not indicate that the user can choose another language or that the restriction is required for a region-specific purpose. Under the policy rule for natural-language violations, forcing a specific language without opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The package description is written entirely in Chinese and does not indicate that users can choose another language or that the skill is intentionally region-specific. This can be a natural-language locale policy issue because it implicitly fixes the skill's user-facing description to one language without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The examples, commands, and interaction text are all written in Chinese, which can amount to a language-policy issue if the skill implicitly forces a specific language for use or documentation. There is no visible indication that users may choose another language or locale.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.