Back to skill

Security audit

个人记账

Security checks for vulnerabilities and agentic risk

Overview

This is a local personal accounting skill, but it has unsafe command-invocation guidance and can automatically persist sensitive finance records from broad triggers such as image-only messages.

Review before installing. Use only for deliberate personal bookkeeping, avoid image-only auto-recording unless you want receipts stored locally, and require the agent to call record_bill.py with structured arguments rather than constructing a shell command string. Treat the bills directory as sensitive personal financial data.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:79
Finding

Command Injection Through User-Controlled Accounting Fields

Content
View full analysis
\ --type \ --category <分类> \ --note "<备注>" \ --date # 可选,默认今天 ``` ### Technical Analysis The skill instructs the Agent to construct and execute a shell command by interpolating transaction fields derived from user input. The `category` value is not quoted, while the `note` value is only enclosed in double quotes. Manual double quoting is insufficient when the value itself can contain quotation marks, command substitutions, backticks, or other shell metacharacters. Shell interpretation occurs before `record_bill.py` starts. Consequently, the Python `argparse` declarations and type checks cannot prevent this issue. A maliciously crafted category or note could terminate the intended argument and append another shell command. This vulnerability applies when the Agent follows the documented command template through a shell and performs direct textual substitution. Structured process invocation with a separate argument array would not have this weakness. ### Attack Path 1. An attacker submits an accounting request containing a crafted note or category with shell syntax. 2. The Agent extracts that attacker-controlled value as the transaction note or category. 3. The Agent substitutes the value into the command documented in `SKILL.md`. 4. The command is passed to a shell for execution. 5. The shell interprets injected separators, substitutions, or redirections instead of treating the entire value as inert data. 6. The injected command executes with the same operating-system privileges and filesystem access as the Agent process. ### Impact Assessment Successful exploitation can provide arbitrary command execution under the Agent's operating-system account. The ...[truncated 431 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/record_bill.py:111
Finding

Markdown Ledger Injection Through Unescaped Category and Note Fields

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The code substantially matches the bookkeeping/storage aspects of the description: it records income/expense entries, lists bills, computes monthly statistics, and stores daily bills in bills/YYYY-MM-DD.md with same-day accumulation. However, the declared description explicitly claims support for 图片账单识别, including mandatory triggering on image-only input and directly determining the amount from the image. The supplied code has no image processing, OCR, upload handling, or multimodal input support at all. Its actual behavior is limited to text/argument-driven bookkeeping operations. This is a material description-to-behavior mismatch because a prominent declared capability is absent.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger rules are overly broad and force activation for common finance-related phrases and even any image-only message, causing the skill to process and store data without sufficient intent confirmation. In this context, that is more dangerous because the skill handles sensitive financial information and may analyze unrelated images or create unwanted persistent records.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says this skill supports 图片账单识别 and should be triggered when the user sends only an image, directly reading the amount from the picture and recording it. This file only implements a CLI for manual structured inputs such as --amount, --type, --category, plus listing and monthly summaries; there is no image input handling, OCR, or image parsing logic anywhere in the executable path.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill can read and write local files (bills/ and supporting files) but does not declare any explicit tool scope or permission boundaries. This increases the risk of unintended file access or persistence because the runtime and users are not clearly informed what filesystem capabilities the skill requires.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the system to analyze uploaded bill images and persist extracted financial records to local files, but it does not warn users about this collection and storage of sensitive personal financial data. This reduces informed consent and can expose private spending details if users do not realize their images and parsed data will be retained.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language description and examples are entirely Chinese and the skill prescribes fixed Chinese phrasing and labels without indicating that users may choose another language. Under the policy, forcing a specific language or locale without opt-in is a violation unless the regional constraint is explicit and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language content and instruction at L29 direct the assistant to operate in Chinese when parsing and responding, with no indication that the user may choose another language or locale. This can violate language/locale policy when a skill imposes a language without explicit opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

All natural-language user-facing text in the file, including the description, usage examples, argument help, and error messages, is exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in or documented locale justification is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This Python file performs a file write to persist potentially sensitive personal finance data into the bills directory. Although the module docstring describes the behavior, the runtime code provides no confirmation prompt or user-facing warning at the point of write, and there is no indication of any privacy or persistence warning beyond basic usage notes.

Content

No source excerpt is available for this finding.