Back to skill

Security audit

LLM Knowledge Base

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent knowledge-base purpose, but its broad triggers and unsafe URL/file ingestion instructions need careful review before installation.

Install only if you are comfortable with a skill that creates persistent project files, uses web search, fetches URLs, and copies local files into a vault. Prefer using it with explicit commands, review every URL or file before ingestion, avoid sensitive local paths, and ensure the agent uses safe argument handling and constrained output paths instead of literal shell interpolation.

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
SKILL.md:157
Finding

Unsafe Shell-Based URL Ingestion Permits Command Injection, SSRF, and Path Traversal

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 157–160
Vulnerability Type: Unvalidated user-controlled shell arguments and destination path
Risk Level: High

markdown
1. **Capture raw material**
   - URL: fetch with `curl -sL <url> | head -c 100000 > raw/inbox/<slug>.md` (prepend URL as comment)
   - File: copy to `raw/inbox/`

Technical Analysis

The skill instructs an agent to substitute a URL and slug into a shell command without requiring shell-safe argument handling, URL validation, or destination-path containment. If these values are interpolated literally, shell metacharacters in either value could change the command and permit arbitrary command execution.

The retrieval design also permits server-side request forgery and local-resource access. It does not restrict URLs to HTTP or HTTPS, reject loopback/private/link-local destinations, or protect against redirects to prohibited destinations. The -L option follows redirects, while curl supports protocols and locations beyond ordinary public web pages. Consequently, an attacker may cause the agent to request internal services, cloud metadata endpoints, or local resources and persist the response in the knowledge-base vault.

The slug is used as part of an output path without a strict format or canonical-path check. A slug containing path separators or .. components could write outside raw/inbox/. The adjacent file-copy instruction similarly does not require source authorization, rejection of sensitive files, or destination containment.

Attack Path

  1. An attacker asks the agent to ingest a crafted URL, file path, or source name.
  2. The agent substitutes attacker-influenced values into the documented curl command or copy operation.
  3. One or more unsafe behaviors occur:
    • Shell metacharacters alter the intended command.
    • A URL targets a local, private, link-local, or cloud metadata endpoint.
    • A public URL redirects to a prohibited internal destinat ...[truncated 1106 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not construct a shell command by concatenating or interpolating user-controlled values. Invoke the HTTP client through an argument-array API.
  2. Permit only explicitly required URL schemes, preferably https and optionally http.
  3. Resolve destination hostnames and reject loopback, private, link-local, multicast, reserved, and cloud-metadata addresses.
  4. Validate every redirect target under the same policy, or disable redirects unless explicitly required.
  5. If curl must be used, include -- before the validated URL and apply strict protocol, redirect, timeout, and download-size limits.
  6. Generate slugs internally and require a pattern such as ^[a-z0-9]+(?:-[a-z0-9]+)*$; never accept path separators or traversal components.
  7. Canonicalize the output path and verify that it remains inside raw/inbox/ before writing.
  8. Quote all filesystem paths and prevent overwriting existing files unless the user explicitly approves it.
  9. Restrict local-file ingestion to user-approved roots. Reject credential files, private keys, tokens, agent memory, configuration secrets, and other sensitive sources by default.
  10. Treat downloaded content strictly as untrusted data. Do not execute it or follow instructions embedded in retrieved documents.
  11. Run ingestion with minimal filesystem permissions and restricted outbound network access to reduce impact if validation fails.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises broad activation phrases like 'build me a KB about X' or 'create a knowledge base,' which can overlap with ordinary user requests and cause the agent to enter a file-writing, web-fetching workflow unexpectedly. In agent ecosystems where skills are auto-selected from natural language, ambiguous triggers can lead to unintended invocation of network access and filesystem modification without sufficiently explicit user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The QUERY trigger is defined as essentially any user question about the topic, which is too broad for routine conversation. This can cause the skill to read and potentially persist outputs to the wiki during normal dialogue, expanding data exposure and filesystem changes beyond what the user may expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The OUTPUT trigger uses generic request categories like summary, comparison, guide, presentation, or analysis, which are common in everyday interactions and may accidentally activate the skill. In practice, this could prompt broad vault reads and write generated deliverables to disk when the user only intended a transient answer.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The MAINTAIN trigger includes vague phrases such as 'maintain,' 'check inbox,' or 'what's new,' which can easily match benign conversation. Because MAINTAIN performs inbox scanning, ingestion, linting, and suggestions, accidental activation could trigger unexpected processing of local files and network-derived content paths.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

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

md
| Agent | How to Install |
|-------|---------------|
| **Claude Code** | Already installed at `~/.claude/skills/llm-kb/SKILL.md` — invoke with `/llm-kb` |
| **Codex** | Copy this file's content into the project's `AGENTS.md` |
| **Cursor** | Copy this file's content into `.cursorrules` |
| **Other agents** | Copy into whatever instruction file the agent reads |

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The Dependencies section says "No package installs, no APIs, no databases," which conveys a minimal, local tooling model, but earlier instructions explicitly require web search for initialization/research and curl fetching of URLs during INGEST. That is an active contradiction in the skill's own documentation about whether network-backed capabilities are part of operation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.