T09 · Insecure Skill Coding Practices
- Location
scripts/crs_generator.py:64- Finding
Unnecessary Extraction and Unredacted Output of Personal Financial Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does not show malware behavior, but it needs review because it handles sensitive financial statements and its tax calculations and raw outputs are not safely scoped enough for reliable tax use.
Install only if you are comfortable reviewing the code and limiting inputs to local, redacted copies of the minimum brokerage statements needed. Do not rely on its tax number without manual verification, especially for mixed years, mixed currencies, partial records, non-HTSC brokers, or bank statements. Treat CLI JSON output as sensitive because it can include names, full account identifiers, addresses, holdings, balances, and transactions.
scripts/crs_generator.py:64Unnecessary Extraction and Unredacted Output of Personal Financial Data
scripts/offset.py:4Annual Tax Aggregation Does Not Enforce Year Boundaries
scripts/matching.py:20Partially Unmatched Sales Are Incorrectly Included in the Tax Basis
scripts/matching.py:7Trade Matching and Tax Aggregation Combine Incompatible Currencies
scripts/matching.py:20Missing Numeric Validation Allows Calculation Failure and Negative Tax Results
The declared description promises a tax-focused workflow: estimating China IIT, preparing documents for the tax bureau, and offsetting gains/losses based on overseas brokerage or bank statements and local chat inputs. The supplied code does something narrower and different: it parses local PDF brokerage statements into structured JSON. It extracts fields such as client/account info, holdings, balances, transactions, and margin interest, and only for supported broker formats detected in the PDF text. There is no tax calculation logic, no tax-form/document generation, no gain/loss aggregation or offset engine, no bank statement parser, and no integration with WorkBuddy or 豆包 Work. While statement parsing could be a supporting component for a tax tool, this code chunk by itself materially underdelivers relative to the declared primary purpose, so it is a clear description-behavior mismatch.
The file pins pytest==8.3.5, which is reported as affected by a tmpdir-handling vulnerability. Even though pytest is typically a development/test dependency rather than a production runtime component, keeping a known-vulnerable version can still expose developer or CI environments if untrusted tests, plugins, or filesystem interactions are involved. In this skill context, the dependency appears unrelated to the core tax-report functionality, which makes the issue less dangerous than a vulnerable runtime package but still a real supply-chain hygiene problem.
The entire document is written only in Chinese and does not indicate that the skill is region-specific or that users may choose another language. Under the language/locale policy rule, this can be a natural-language policy violation when a specific language is imposed without user opt-in or justification.
The entire interview script is written as mandatory Chinese-language instructions and does not indicate that users may choose another language or locale. This is a natural-language policy concern because it imposes a specific language experience without documented opt-in or justification.
Line L6 states that the default result shown to customers is a 'plain-language number' using Chinese phrasing, and the entire document is written only in Chinese with no indication that users may choose another language or locale. This can violate a language/locale policy when the skill implicitly enforces one language without user opt-in.
The file docstring narrows the script's behavior to parsing broker statement PDFs and explicitly says not to generate official tax filings. In contrast, the manifest presents the skill as a CRS/report generator used to prepare tax-bureau documents and support gain/loss offset workflows, which this code does not implement.
This is an active contradiction between inline documentation and the declared skill intent. The code itself only parses PDF content into JSON, and the docstring warns against official filing generation despite the skill being positioned for tax-report preparation.
SQP-3 applies to all file types and covers language or locale policy violations. All user-facing prompts are written only in Chinese, which forces a specific language experience without any indication that the user can choose another language or has opted in to Chinese.
The workflow explicitly asks users to upload monthly and annual brokerage statements, which commonly contain highly sensitive financial and personal information. Without a user-facing warning, minimization guidance, or clear indication of what is necessary, users may overshare confidential data and increase privacy and data-handling risk.
The report section titles and user-facing report strings are hard-coded in Chinese, which imposes a specific language on users. The file does not indicate any user opt-in, language selection, or documented region-specific requirement that would justify the locale restriction.
No suspicious patterns detected.