Back to skill

Security audit

九赋产品溯源评级

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent product-verification purpose, but it asks for broad shell execution to send user-supplied product data to a third-party API without enough scoping or safe handling.

Review before installing. Use it only if you are comfortable sending product and brand query details to jiufu-trace.cn, and prefer a safer implementation that uses a constrained HTTP client or JSON serializer instead of raw shell curl. Avoid entering sensitive business, purchase, or investigation context unless the data handling of the third-party API is acceptable.

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:29
Finding
Shell Command Injection Through Unescaped User-Controlled API Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 29–37 **Vulnerability Type**: Shell command injection caused by unsafe interpolation of user-controlled data **Risk Level**: High ### Vulnerable Code ```bash curl -s -X POST https://jiufu-trace.cn/api/cti/verify \ -H 'Content-Type: application/json' \ -d '{ "product_name": "用户提到的产品名称", "brand": "品牌名称", "category": "产品品类(如:饮料/化妆品/电子产品/宠物食品)" }' ``` ### Technical Analysis The skill requires access to the `exec` tool and directs the agent to place user-provided product, brand, and category values inside a single-quoted shell argument. The instructions do not require validation, shell escaping, or JSON serialization. In POSIX-compatible shells, a single quote contained in an interpolated value terminates the surrounding quoted argument. An attacker can therefore supply a product or brand value containing a quote followed by shell operators and an additional command. If the agent performs direct textual substitution and passes the resulting command to a shell, the appended command is interpreted locally rather than being included only as API data. JSON escaping alone would not address this vulnerability because shell parsing occurs independently of JSON parsing. The values must be serialized and passed without unsafe shell evaluation. ### Attack Path 1. An attacker asks the agent to verify a product or brand whose supplied name contains a single quote, shell control operators, and an additional command. 2. The agent follows `SKILL.md` and substitutes that value into the single-quoted `curl -d` template. 3. The attacker-controlled quote closes the intended shell argument. 4. The shell interprets the subsequent operators and command as executable syntax. 5. The injected command runs with the operating-system privileges and environment available to the agent's `exec` tool. 6. Depending on those privileges, the command can read accessible files, alter project data, inspect ...[truncated 721 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid shell-based HTTP invocation. Use a structured HTTP tool or language API that accepts the endpoint, headers, and JSON body as separate typed parameters. 2. Serialize the request body with a trusted JSON encoder rather than interpolating values into a JSON string. 3. If `curl` is unavoidable, construct the payload with a serializer such as `jq` using separately supplied arguments, and invoke the process through an argument-array API without a shell. 4. Explicitly prohibit direct concatenation of user-controlled product, brand, category, or depth values into shell commands. 5. Validate input length and expected character ranges as defense in depth. Validation must not replace safe process invocation and serialization. 6. Run the network request with least privilege, a restricted environment, and no unnecessary access to secrets or writable sensitive paths. 7. Add tests covering quotes, command separators, substitutions, newlines, and other shell metacharacters to verify that every supplied value remains inert request data. ]]>
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)

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
L004 的描述全文以中文限定技能使用与输出语境,文件中未说明是否支持用户选择其他语言,也未给出必须使用中文的合规或地域性理由。按规则,若技能强制特定语言而无用户选择或明确正当说明,应视为自然语言政策风险。

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger guidance includes very broad everyday phrasing like '这个品牌怎么样' and '靠不靠谱', which can cause the skill to activate in loosely related conversations. Over-broad invocation increases the chance that user-provided product or brand details are sent to the external service without sufficiently clear user intent for third-party lookup.

External Transmission

Medium
Category
Data Exfiltration
Content
## 调用方法

使用 curl 调用九赋溯源API:

```bash
curl -s -X POST https://jiufu-trace.cn/api/cti/verify \
Confidence
96% confidence
Finding
The skill explicitly requires the exec tool and provides a curl command that transmits user-influenced data to an external API endpoint. External transmission is not inherently malicious in this context, but it is a real security/privacy risk because unvalidated user content is sent off-platform and the skill provides no authentication, trust validation, minimization, or consent controls.

Missing User Warnings

Low
Confidence
94% confidence
Finding
The skill instructs the agent to send user-supplied product, brand, and category information to an external domain but does not clearly disclose that this information will leave the local system. This creates a transparency and privacy risk, especially if users provide sensitive business, purchase, or investigation context alongside the product details.

Static analysis

No suspicious patterns detected.