Back to skill

Security audit

奶茶店老板专属的收支流水分析工具,只需要上传流水记录(文字/图片/Excel),自动帮你算出现金利润、成本结构、经营分析报告,零学习成本。

Security checks for vulnerabilities and agentic risk

Overview

This is a purpose-aligned bookkeeping helper that processes user-provided shop transaction text locally, with privacy and robustness caveats but no hidden persistence, exfiltration, or privilege behavior found.

Before using this skill, provide only the minimum transaction details needed for analysis and redact account numbers, customer names, employee identifiers, supplier secrets, and other unnecessary sensitive information. Expect Chinese-language output and be aware that incomplete or uncategorized records may cause the analysis to fail rather than return a graceful report.

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

Warning
Location
main.py:62
Finding

Unrecognized Expense Records Cause an Unhandled KeyError

Content
View full analysis
Tuple[str, float]: """Classify an expense.""" amount = self.extract_amount(text) if amount == 0: return ('', 0) for keyword, expense_type in self.expense_keywords['type_map'].items(): if keyword in text: return (expense_type, amount) return ('其他支出', amount) ``` ```python expense = { '原材料成本': 0.0, '房租成本': 0.0, '人工成本': 0.0, '水电杂费': 0.0, '其他成本': 0.0, '总支出': 0.0 } for line in lines: # Determine whether the record is income or expense. is_income = any(keyword in line for keyword in self.income_keywords['income']) is_expense = any(keyword in line for keyword in self.expense_keywords['expense']) if is_income: inc_type, amount = self.classify_income(line) if inc_type: income[inc_type] += amount income['总收入'] += amount elif is_expense: exp_type, amount = self.classify_expense(line) if exp_type: expense[exp_type] += amount expense['总支出'] += amount ``` ```python elif '付' in line or '花' in line or '出' in line: expense['其他支出'] += amount expense['总支出'] += amount ``` ### Technical Analysis The initialized `expense` dictionary defines the catch-all category `其他成本`, but both uncategorized-expense paths use the different key `其他支出`. When an expense record contains a general expense indicator but does not contain a subtype represented by `expense_keywords['type_map']`, `classify_expense()` returns `('其他支出', amount)`. The subsequent statement `expense[exp_type] += amount` accesses a key that does not exist and raises an unhandled `KeyError`. The heuristic fallback branch contains the same invalid dictionary a ...[truncated 1284 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
main.py:146
Finding

Zero Income or Expense Totals Cause Division-by-Zero Denial of Service

Content
View full analysis
Remediation
View remediation
float: return (part / total * 100) if total else 0.0 ``` Use the helper for every percentage displayed in the report: ```python - Income category: {percentage(income_category, income['总收入']):.1f}% - Expense category: {percentage(expense_category, expense['总支出']):.1f}% ``` Further hardening should include: 1. Validate `flow_content` and return a clear message when it is empty or contains no recognized transactions. 2. Decide explicitly how reports should represent periods with no income or no expenses, such as displaying `0.0%` or `N/A`. 3. Add tests for empty input, whitespace-only input, unrecognized text, income-only data, expense-only data, and zero-value transactions. 4. Add top-level exception handling that converts unexpected parser or formatter failures into controlled error responses without exposing internal stack traces. 5. Apply the same centralized helper to gross margin and future ratio calculations to prevent inconsistent safeguards. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly encourages users to paste or upload financial transaction records, which are sensitive business data, but provides no warning about privacy, data minimization, or safe handling. In a skill that processes revenue, expenses, and profit data, this omission increases the risk that users will disclose confidential commercial or personal information without understanding the exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly asks users to upload or paste financial transaction records, which are sensitive business data, but provides no warning about privacy, minimization, or safe handling. This can lead users to disclose revenue, costs, payroll, supplier, or account-related information unnecessarily, increasing confidentiality and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code uses Chinese-only keywords, category labels, comments, and report text throughout the skill, which effectively forces a specific language/locale. The policy allows locale constraints only when they are clearly documented and justified or when the user is given a choice, neither of which is present in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly asks users to upload business transaction records, including OCR text and Excel-derived content, which commonly contain sensitive financial, personal, and operational data. There is no notice about data minimization, privacy handling, retention, redaction, or consent, creating a realistic risk of exposing confidential business information through oversharing or improper downstream processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The README presents the skill entirely in Chinese, with no indication that users can choose another language or that the locale restriction is intentional and justified. The policy requires flagging language or locale constraints when a specific language is effectively forced without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file’s natural-language instructions and UI text are entirely in Chinese, which can amount to a language-policy issue when no user opt-in or alternative language option is provided. There is no indication that the skill is intentionally limited to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.