Back to skill

Security audit

本地知识库集成

Security checks for vulnerabilities and agentic risk

Overview

This local knowledge-base skill asks for broad file and command access without clearly limiting when it runs or whether data may be sent to external APIs.

Review this before installing. It may be appropriate only if you intend to grant a knowledge-base helper broad local file access and command execution. Avoid using it with sensitive documents unless network/API behavior is clarified, and do not run the agent as administrator for this skill.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:25
Finding

Overprivileged Command Execution and Filesystem Write Capabilities

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 25–28
Vulnerability Type: Excessive tool permissions that violate least-privilege principles
Risk Level: Medium

Vulnerable Code

yaml
tools:
- read
- exec
- write

Related documentation at line 214 states that the Skill executes system commands, while the troubleshooting guidance around line 227 recommends running with administrator privileges when permissions are insufficient. The security guidance at line 205 mentions sandboxing and command allowlisting, but the package contains no implementation or enforceable policy for either control.

Technical Analysis

The Skill requests general-purpose read, exec, and write capabilities even though its stated purpose is local document retrieval, document ingestion, and knowledge-base mode switching. No allowed command set, permitted filesystem root, path-validation policy, argument schema, or privilege boundary is defined.

General command execution combined with filesystem write access provides substantially more authority than is inherently necessary for document retrieval. The Markdown documentation claims that execution occurs in a secure sandbox and recommends command allowlisting, but the project contains only SKILL.md; therefore, no included code enforces those controls.

This is a least-privilege violation rather than evidence that malicious commands are currently embedded in the package. Exploitation would require an agent platform to grant the declared capabilities and untrusted or ambiguous input to influence how those capabilities are used.

Attack Path

  1. An agent loads the Skill and grants the declared read, exec, and write tools.
  2. A user instruction, malicious document, or other untrusted knowledge-base content influences an operation performed through the Skill.
  3. Because no enforceable command allowlist, path restriction, or structured argument validation is d ...[truncated 1227 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove exec unless command execution is indispensable to a documented feature.
  2. Replace unrestricted filesystem access with operations constrained to a dedicated knowledge-base directory.
  3. Canonicalize every path before access and reject absolute paths, traversal sequences, symbolic-link escapes, and paths outside the configured root.
  4. If execution is required, define a fixed allowlist of executable names and permitted operations. Do not invoke a shell or concatenate user-controlled text into command strings.
  5. Pass validated arguments as a structured argument array and reject metacharacters or unsupported options.
  6. Run commands in an enforced sandbox with minimal operating-system permissions, network access disabled by default, resource limits, and strict timeouts.
  7. Require explicit user confirmation before any command execution or write outside a narrowly defined application data directory.
  8. Remove the blanket recommendation to run as administrator. Instead, document the exact minimum directory permissions required.
  9. Treat retrieved documents and knowledge-base content as untrusted data and prohibit their contents from directly authorizing tool calls.
  10. Add automated tests confirming that commands outside the allowlist and filesystem paths outside the approved root are rejected.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The invocation guidance is broad enough to match generic productivity, automation, and workflow-optimization requests rather than a narrow knowledge-base task. In context, that is more dangerous because the skill also declares read/write/exec capabilities, so over-triggering could grant powerful tools in situations unrelated to the user's intent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is presented as a local knowledge-base/document retrieval tool, but its manifest requests the generic exec capability. That materially expands the trust boundary from document handling into arbitrary command execution, creating a path for file-system changes, process spawning, and abuse if the skill is invoked on loosely scoped requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example trigger phrase is ambiguous and generic, making accidental activation more likely. While the phrase alone is not exploit code, ambiguous activation is risky here because the skill exposes sensitive capabilities and may be invoked outside its intended document-retrieval context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation states the skill is local-only while other sections describe external APIs and network communication. This inconsistency can mislead users into trusting the skill with sensitive local documents under the assumption that data never leaves the machine, increasing the risk of unintended disclosure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The manifest and usage text emphasize a local knowledge base, but the file also introduces an LLM API, API key configuration, network error handling, and external service/API usage. For a skill framed as local document retrieval and ingestion, external API dependency is not clearly justified by the stated purpose alone.

Content

No source excerpt is available for this finding.