Back to skill

Security audit

Resume Tailor

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-aligned, but its shell-based curl templates create a real risk of unintended command execution if identifiers are not safely validated or encoded.

Install only if you trust the local service on 127.0.0.1:8010 and can ensure job_id and thread_id values are strictly validated. Prefer a revised skill that uses structured HTTP calls or non-shell argument arrays instead of interpolated curl command strings, and confirm every approve/export action before it runs.

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:41
Finding
Shell Command Injection Through Unsafe Parameter Interpolation in curl Templates<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 41–47 **Vulnerability Type**: Shell command injection **Risk Level**: High ### Vulnerable Code ```markdown ## Command templates (exec tool + curl) - Generate: - `curl -sS -X POST "http://127.0.0.1:8010/api/material/generate" -H "Content-Type: application/json" -d '{"job_id":"<job_id>","resume_version":"resume_v1"}'` - Review: - `curl -sS -X POST "http://127.0.0.1:8010/api/material/review" -H "Content-Type: application/json" -d '{"thread_id":"<thread_id>","decision":"approve"}'` - Export: - `curl -sS -X POST "http://127.0.0.1:8010/api/material/export" -H "Content-Type: application/json" -d '{"thread_id":"<thread_id>","format":"pdf"}'` ``` ### Technical Analysis The Skill instructs the Agent to invoke an execution tool with shell-formatted `curl` commands. The `job_id` and `thread_id` placeholders are placed directly inside single-quoted shell arguments without validation or shell-safe encoding. The `job_id` value may be supplied directly by a user. The `thread_id` value is obtained from a local API response and therefore crosses a separate trust boundary. If either value contains a single quote, it can terminate the surrounding shell argument. Additional shell operators and commands can then be introduced before the remainder of the command is neutralized, for example using a comment operator. JSON quoting does not protect values from shell interpretation. The shell parses and expands the command before `curl` receives the JSON body. Using a JSON serializer alone is also insufficient if the resulting JSON is subsequently concatenated into a shell command string. The vulnerability is exploitable when the Agent follows these templates by replacing placeholders in a command string and passes that string to a shell-based execution tool. ### Attack Path 1. An attacker supplies a crafted `job_id` containing a single quote followed by shell syntax. Alternatively, a compromised or ...[truncated 1470 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Avoid shell command construction** - Use a structured HTTP client tool that accepts the URL, headers, and JSON body as separate typed fields. - Prefer a process API that accepts an argument array and does not invoke a shell. 2. **Serialize JSON safely** - Build request bodies using a proper JSON serializer rather than textual placeholder replacement. - If command-line `curl` is unavoidable, write serialized JSON to standard input and invoke `curl` through an argument-array API with `--data-binary @-`. 3. **Do not evaluate generated command strings** - Never pass interpolated values to `sh -c`, `bash -c`, `eval`, or an equivalent shell execution mechanism. - Do not rely solely on backslash escaping because correct escaping depends on the shell and execution context. 4. **Validate identifiers** - Enforce a strict allowlist for `job_id` and `thread_id`, based on their documented formats. - If identifiers are intended to be simple opaque tokens, reject values that do not match a restrictive expression such as `^[A-Za-z0-9_-]+$`. - Apply length limits and reject control characters, quotes, whitespace, and shell metacharacters. 5. **Treat API responses as untrusted** - Validate `thread_id` and all other response fields before displaying or reusing them. - Do not assume that a loopback service is inherently trustworthy, because another local process may be able to replace, compromise, or influence it. 6. **Reduce execution privileges** - Run the Agent and HTTP workflow in a sandbox with minimal filesystem and network access. - Prevent access to unrelated credentials and sensitive directories. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrase 'Help me create application materials' is broad enough to match many ordinary resume or writing requests without clearly scoping when this skill should activate. Over-broad activation can cause the agent to invoke internal APIs and process/export sensitive applicant data in situations where the user did not explicitly ask for this workflow.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger 'Approve/reject this material draft' is ambiguous because it does not constrain what 'material' refers to or ensure the draft originated from this skill's review flow. That ambiguity could let unrelated user content be routed into approve/reject actions, increasing the risk of unintended state changes or exports through the local review API.

External Transmission

Medium
Category
Data Exfiltration
Content
## Command templates (exec tool + curl)

- Generate:
  - `curl -sS -X POST "http://127.0.0.1:8010/api/material/generate" -H "Content-Type: application/json" -d '{"job_id":"<job_id>","resume_version":"resume_v1"}'`
- Review:
  - `curl -sS -X POST "http://127.0.0.1:8010/api/material/review" -H "Content-Type: application/json" -d '{"thread_id":"<thread_id>","decision":"approve"}'`
- Export:
Confidence
96% confidence
Finding
The skill instructs use of curl via an exec tool to POST user-related resume and application data to a local HTTP service. Even though the destination is localhost, this is still an external transmission path from the agent runtime to another service, and using shell command templates increases risk if untrusted fields like job_id or thread_id are interpolated unsafely.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The example feedback text uses Chinese ("强调可量化结果") without indicating that language choice depends on user preference. This can imply a default language/locale behavior rather than offering the user a choice.

Static analysis

No suspicious patterns detected.