Back to skill

Security audit

Case Echo

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear text-extraction purpose, but its documented command can let specially crafted case text run local shell commands.

Review before installing. The skill should not be used on untrusted case text through the documented shell command unless the invocation is changed to pass text as data through a structured process API, file, or standard input rather than by pasting it into shell command text.

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

Command Injection Through Unsafe Interpolation of User-Controlled Case Text

Content
View full analysis
" Replace `` with the user's original case text. ``` ### Technical Analysis The skill instructs the agent to substitute the user's original, untrusted case text directly into a shell command. Enclosing the placeholder in double quotes does not make arbitrary input safe in shell source. Shell constructs such as command substitution (`$(...)` or backticks) remain active inside double-quoted strings. An embedded double quote can also terminate the intended argument and introduce additional shell syntax. For example, if a malicious case description contains `$(id)`, direct textual substitution produces: ```bash bash scripts/run_case_echo.sh "患者,男,63岁,$(id)" ``` The shell executes `id` before invoking the script. Input containing embedded quotes and command separators could similarly escape the argument and execute independent commands. The wrapper correctly quotes `"$1"` at `scripts/run_case_echo.sh:5`, but that protection applies only after the invoking shell has already parsed and evaluated the constructed command. It therefore does not prevent this vulnerability. ### Attack Path 1. An attacker supplies a purported Chinese medical case containing shell command substitution or quote-breaking syntax. 2. The agent follows `SKILL.md` and replaces `` with the original case text in the documented shell command. 3. The command is submitted to a shell as a constructed command string. 4. The shell evaluates attacker-controlled substitutions or metacharacters before `run_case_echo.sh` starts. 5. The injected command executes with the operating-system privileges and environment of th ...[truncated 531 chars]
Remediation
View remediation
Vulnerability Patterns
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • 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 (4)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

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

md
Replace `<USER_CASE_TEXT>` with the user's original case text.

## Output rules

- Return valid JSON only.
- Do not add explanation before or after the JSON.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description and usage section repeatedly specify that the skill is for Chinese medical case descriptions only. This is a natural-language locale restriction, and the file does not offer an alternative language choice, opt-in, or a clear policy justification for limiting use to Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file content is entirely in Chinese and provides no indication that the skill offers a language choice or that Chinese is a justified locale restriction. Under the policy rule, forcing a specific language without user opt-in can be 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
83% confidence
Finding

The CLI description, help text, extraction logic, and emitted values are written for Chinese-language case descriptions only, but the file does not state this as an opt-in or user-selectable locale constraint. This can violate language/locale policy guidance because the skill implicitly forces a specific language rather than offering a choice or clearly justifying the restriction.

Content

No source excerpt is available for this finding.