Back to skill

Security audit

交易记录生成

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent local accounting tool, but it silently rewrites source financial CSV data and can carry untrusted spreadsheet formulas into generated workbooks.

Review this skill before installing if you rely on the original bank exports as audit records. Run it on copies of your source files, keep backups, and inspect generated workbooks before opening or sharing them, especially if any input file could contain formula-like text beginning with '='. Prefer adding dependency pinning and formula sanitization before routine use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/交易记录.py:121
Finding

Untrusted spreadsheet data is written as executable formulas

Content
View full analysis
2 else None, # 收入(贷方) convert_value(row[1]) if len(row) > 1 else None, # 支出(借方) convert_value(row[3]) if len(row) > 3 else None, # 余额 row[6] if len(row) > 6 else '' # 账号/摘要 ]) ``` ```python # scripts/交易记录.py:342-346 else: for j, val in enumerate(row, 1): # 把 0 改为 None(显示为空) if val == 0: val = None cell = ws_print.cell(row=i, column=j, value=val) ``` ```python # scripts/生成账目.py:405-426 row_num = ws.max_row + 1 if row_data['balance_formula']: balance_val = row_data['balance_formula'] else: # 所有行都用公式:=上期 + 本行收入 - 本行支出 balance_val = f'=A{row_num-1}+F{row_num}-G{row_num}' row = [ balance_val, # A 列:余额 row_data['date'], # B 列:发生日期 row_data['cat1'], # C 列:分类 1 row_data['cat2'], # D 列:分类 2 row_data['cat3'], # E 列:分类 3 row_data['income'], # F 列:收入金额 row_data['expense'], # G 列:支出金额 h_value, # H 列:应付/应收/预收 row_data['note'], # I 列:备注 row_data['student'], # J 列:学员/单位 row_data['acco ...[truncated 2515 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:43
Finding

Third-party dependencies are installed without version or integrity pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script rewrites the source CSV in place, deleting comment lines and blank lines without creating a backup or requiring user confirmation. In a financial-record processing context, destructive modification of original input data can cause irreversible loss of audit information and can be abused by supplying a path to sensitive or canonical source files that the operator did not intend to alter.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The docstring at L038 says the function will '统一逗号格式', implying delimiter normalization, but L043 replaces ',' with ',' which is a no-op. The function also writes the cleaned content back to the original file at L049-L050, which is a more significant side effect than the misleading normalization comment suggests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python file contains user-facing CLI descriptions and runtime messages entirely in Chinese, such as the argparse help text and printed status/output lines. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation unless the tool documents a justified region-specific constraint or offers a choice.

Content

No source excerpt is available for this finding.