Back to skill

Security audit

graph-search

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent code-search purpose, but it tells the agent to place a user-provided search term directly into a shell command, which could let a crafted query run unintended commands.

Review before installing. Use this only if your agent or runtime passes the search term as a single structured argument to the Python script, not by text-substituting into a shell command. The skill should ideally be updated to require non-shell invocation and stricter trigger wording.

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:24
Finding

Shell Command Injection Through Unsanitized Search Query

Content
View full analysis
" --limit 20 ``` ### Technical Analysis The skill instructs the agent to obtain a user-controlled search term and insert it into a shell command. If the agent performs direct textual substitution before invoking a shell, the double quotes around `""` do not provide adequate protection. An attacker can supply a query containing a closing quotation mark followed by shell operators, command substitutions such as `$()`, or backticks. The shell may then interpret part of the query as a command rather than as one argument to `graph_query.py`. The `${CLAUDE_PLUGIN_ROOT}` expansion is also unquoted. A plugin-root value containing whitespace or shell wildcard characters could cause argument splitting or pathname expansion, although this variable is less directly exposed to the requesting user. Exploitation depends on the agent constructing the displayed command through textual interpolation and executing it via a shell. Invocation through a structured argument array with shell parsing disabled would prevent this vulnerability. ### Attack Path 1. An attacker requests a graph search and supplies a crafted term containing shell metacharacters, such as a quotation mark that terminates the intended query argument followed by a command substitution. 2. The agent replaces `` directly with the attacker-controlled value. 3. The agent submits the resulting command to a shell. 4. The shell parses the injected syntax separately from the intended `--query` argument. 5. The injected operating-system command executes with the same identity and permissions as the agent process. ### Impact Assessment Successful exploitation permits arbitrary command execution within the privileges of the agent or automat ...[truncated 512 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest trigger "locating code entities by name or qualified path" describes a general intent rather than a specific invocation phrase or constrained context. It does not clarify what exact requests should activate the skill or provide exclusions, which can increase unintended matches with ordinary code-navigation requests.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.