Back to skill

Security audit

Finance Tools

Security checks for vulnerabilities and agentic risk

Overview

This is a local finance CSV tool with no evidence of data theft, but it needs review because malicious CSV content can manipulate the terminal output users rely on.

Use this only on CSV files you trust or sanitize first, because crafted CSV values could make the terminal display misleading financial results. The tool otherwise appears local and read-only, with no external dependencies or telemetry found, but users should also be comfortable with a Chinese-first interface.

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

Warning
Location
scripts/finance_tools.py:270
Finding

Unsanitized CSV Content Allows Terminal Escape-Sequence Injection

Content
View full analysis
12,.2f}") # Line 201: attacker-controlled CSV column name print(f" {col}: 合计={sums[col]:>12,.2f} 平均={avg:>10,.2f}") # Line 270: attacker-controlled category value print(f" {bar} {cat:<20} {val:>12,.2f} ({pct:5.1f}%)") # Line 398: attacker-controlled date or month value print(f" {m:<10} {val:>10,.2f} {mom_str:>9} {yoy_str:>9}") # Line 420: attacker-controlled year derived from a date value print(f" {y}: {by_year[y]:>12,.2f} (同比 {growth:+.1f}%)") # Line 508: attacker-controlled date or month value print(f" {m}: {v:>12,.2f} {change:<10}") ``` ### Technical Analysis The application reads CSV headers and field values and writes them directly to an interactive terminal. Values used as column names, category labels, dates, months, and years are not sanitized before being passed to `print()`. Terminal emulators interpret certain control characters as commands rather than visible text. In particular, attacker-controlled ANSI CSI and OSC sequences can alter colors, move the cursor, erase or overwrite previously displayed output, change terminal titles, create deceptive hyperlinks, or perform other terminal-dependent actions. Some terminal configurations may also permit clipboard operations through OSC sequences. This issue does not constitute shell-command injection: the values are not passed to a shell, `eval`, `exec`, or a subprocess. Exploitation is limited to capabilities exposed by the terminal emulator and its configuration. ### Attack Path 1. An attacker creates or modifies a CSV file that the victim is expected to analyze. 2. The attacker embeds terminal control sequences in a supported field, such ...[truncated 1361 chars]
Remediation
View remediation
12,.2f} ({pct:5.1f}%)") ``` The production sanitizer should be tested against complete multi-character terminal escape sequences and all supported output paths. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description is presented as a Chinese-language tool description and the document provides no indication that another language is supported or that Chinese is an opt-in choice. Under the policy, forcing a specific language without user choice is a natural-language locale violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises local CSV analysis and therefore necessarily reads user-supplied files, but it does not declare an explicit permission or allowed-tools scope. Missing scope is a real security weakness because it prevents clear least-privilege enforcement and can cause the platform or reviewer to infer capabilities incorrectly, even if the current documentation claims the behavior is read-only.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructions, trigger keywords, and usage guidance are primarily presented in Chinese, while not indicating that users may choose another language or locale. This can violate a language/locale policy when a skill effectively forces one language without explicit opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python skill presents its description, usage text, help strings, and runtime messages in Chinese, which imposes a specific language on users by default. The policy for this audit flags language or locale restrictions when the skill does not provide opt-in language selection or clearly justify the constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file title uses Chinese ("更新日志") and the changelog content is written in Chinese throughout, which indicates a language-specific presentation. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy violation unless the locale restriction is documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description is written entirely in Chinese, which can constitute a language/locale policy issue when the skill is marked for global use. There is no indication that users can choose another language or that the Chinese-only presentation is a documented regional constraint.

Content

No source excerpt is available for this finding.