Back to skill

Security audit

赛博功德箱 (Cyber TipJar)

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent local reward tracker, but its instructions create a real command-injection risk when handling user names or reward items.

Review before installing. The skill appears intended to keep a local tip ledger, not to exfiltrate data, but it should be updated to avoid shell command construction, validate names/items/counts, and document where records are stored plus how users can view or delete them.

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

Shell Command Injection Through Sender-Controlled Command Arguments

Content
View full analysis
/scripts/tracker.py --user "发送者名字" --item "鸡腿" --count 1 ``` Associated parameter instructions: ```markdown - `--user`: 必填。从上下文(Sender Name)中提取。如果用户自称“老哥”,则记为“老哥”。 - `--item`: 选填,默认为“鸡腿”。用户如果说喝咖啡,可改为“咖啡”。 - `--count`: 选填,默认为 1。如果用户说“加 10 个鸡腿”,则设为 10。 ``` ### Technical Analysis The skill instructs the agent to extract a sender name from conversation context and interpolate it into a command executed through the `exec` tool. The value is placed inside double quotes, but double quotes do not prevent shell evaluation of command substitutions such as `$(...)` or backticks. Consequently, if `exec` invokes a shell, a crafted sender name can cause the shell to execute embedded commands before `tracker.py` starts. The Python script does not invoke a shell itself; the vulnerability originates from the execution procedure defined in `SKILL.md`. The `--item` value may present the same risk if it is populated directly from user language rather than selected from a trusted fixed mapping. ### Attack Path 1. An attacker supplies or claims a crafted sender name containing shell command-substitution syntax, such as `$(attacker-command)`. 2. The agent follows the skill instructions and extracts that value as the sender name. 3. The agent constructs the documented command: ```bash python3 .../tracker.py --user "$(attacker-command)" --item "鸡腿" --count 1 ``` 4. The `exec` tool passes the command to a shell. 5. The shell evaluates the command substitution before launching Python. 6. The injected command executes with the permissions and environment of the agent process. 7. Its output is then passed to `tracker.py` as the apparent username, potentially concealing the preceding command execution. Exploitation requires the ...[truncated 1032 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly states that user-specific reward records are written to the local workspace and retained across sessions, but it does not clearly warn users about retention, visibility to operators, or deletion controls. Even though the data seems low sensitivity, it still creates a persistent interaction history tied to user identity, which can surprise users and expose behavioral metadata on shared or monitored systems.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill instructs use of local script capabilities that imply file read/write behavior, but it does not declare any explicit tool scope or permissions boundary. This weakens auditability and least-privilege controls, making it easier for a skill to gain broader execution or persistence behavior than reviewers or users would expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill tells the agent to execute a Python script that stores user-linked reward data by username, but it provides no user-facing notice, consent flow, or retention policy. Recording identifiable user interaction data to local storage without transparency can create privacy, compliance, and data-handling risks, especially if users do not expect persistence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The response specification and all required example replies are in Chinese, and the instruction says the agent 'must' reply in that style, with no opt-in or alternative language path. This can violate language/locale policy because it imposes a specific language on users regardless of their preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The natural-language instructions, trigger phrases, and example queries are entirely in Chinese, implying the skill is intended to operate in that language only. The file does not state that the skill is China/Chinese-specific nor offer users an explicit language choice, which can conflict with language/locale flexibility expectations.

Content

No source excerpt is available for this finding.