T09 · Insecure Skill Coding Practices
- Location
src/db.py:70- Finding
Spreadsheet Formula Injection in Receipt Exports
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but it can persist and export sensitive financial records with weak safeguards.
Install only in an isolated virtual environment, review and pin dependencies first, and treat receipt exports as sensitive files. Before letting an agent add receipts or set a budget, require explicit confirmation because those actions persist local financial records.
src/db.py:70Spreadsheet Formula Injection in Receipt Exports
requirements.txt:1Unpinned and Unnecessary Third-Party Dependencies
The skill instructs the agent to run commands that add receipts and potentially alter budget-related records, but it does not explicitly warn that these operations persistently modify the user's financial data. In an agent setting, this can lead to unintended state changes if the user expected analysis or extraction only, especially because financial records are sensitive and cumulative.
The budget --set <Amount> workflow overwrites the user's existing monthly budget, but the skill does not clearly warn that this replaces prior stored configuration. Without a confirmation step, an agent could irreversibly change budgeting state based on an ambiguous or misheard request, affecting future financial tracking and alerts.
This code presents command descriptions and help text in Thai and Chinese string literals, which imposes a specific language/locale on users with no opt-in or alternative. The policy for natural-language violations applies to all file types, including code string literals, so forcing localized UX without choice is in scope.
The export_to_csv and export_to_excel functions write receipt data to whatever filename is provided, with no path validation, directory restriction, or overwrite protection. If an attacker or untrusted caller controls the filename, they could overwrite arbitrary files accessible to the process or place sensitive financial data in unintended locations, which is more concerning in a skill that handles receipts and budget data.
This code presents key status and spending information only in Thai, and similar Thai-only strings appear in notifications elsewhere in the file. That creates a language/locale policy issue because the skill forces a specific language without user opt-in or an explicitly documented regional justification.
The refresh and export success messages are shown only in Thai, which enforces a specific locale in user-facing interactions. Under the policy, this should not be forced unless the skill offers a choice or clearly documents a justified region-specific scope.
The markdown file states that the skill exports receipt data to CSV or Excel, which can affect user data privacy and persistence, but it does not include any caution about sensitive financial information being written to files. Under the markdown-specific warning criteria, data-affecting behavior should be disclosed to users.
The README uses Thai-specific examples such as '5,000 Baht' and a Thai category value 'อาหาร', which suggests a locale-specific workflow, but it does not clearly state that the skill is region-specific or that users may choose their own language/locale conventions. This can violate the language/locale policy when a specific locale is implied without opt-in or justification.
The dependency 'textual' is unpinned, so builds may resolve to different versions over time. This increases supply-chain risk and can unexpectedly introduce breaking changes or newly vulnerable releases into the environment.
textual
rich
pandas
openpyxl
The dependency 'rich' is unpinned, which makes installations non-reproducible and exposes the skill to accidental adoption of malicious or vulnerable upstream releases. Even if 'rich' is commonly safe, leaving it unconstrained is still a supply-chain weakness.
textual
rich
pandas
openpyxl
pydantic
The dependency 'pandas' is unpinned, so the installed version is uncontrolled and may drift into vulnerable or incompatible releases. Because this skill processes financial receipt data, dependency unpredictability raises operational and supply-chain risk.
textual
rich
pandas
openpyxl
pydantic
pillow
Because 'pandas' is not version-pinned, it is impossible to verify whether the deployed version includes fixes for known advisories. This is not proof that the package is vulnerable, but it is a real security weakness because vulnerable versions could be installed unnoticed.
The dependency 'openpyxl' is unpinned, which is risky because spreadsheet-processing libraries have historically had parser-related issues. Uncontrolled upgrades can expose the skill to vulnerable versions or unexpected parser behavior when handling untrusted files.
textual
rich
pandas
openpyxl
pydantic
pillow
python-dotenv
Because 'openpyxl' is unpinned, the project may resolve to versions affected by historical XML entity and parser-related issues. In a receipt-management context that may import spreadsheet files, this makes the dependency ambiguity more dangerous than a purely theoretical concern.
The dependency 'pydantic' is unpinned, allowing different installations to pull different releases with different security characteristics. Since this library often handles validation logic, version drift can affect both safety and correctness.
rich
pandas
openpyxl
pydantic
pillow
python-dotenv
Because 'pydantic' is not pinned, the application may install a release affected by known denial-of-service or parsing issues without any visibility. This weakens assurance around input validation, which is a core security control.
The dependency 'pillow' is unpinned, which is more concerning because image parsing libraries frequently receive security fixes for crafted-file attacks. This receipt-processing skill likely handles user-supplied images, so an unsafe Pillow release could increase exposure to denial-of-service or worse parser exploits.
pandas
openpyxl
pydantic
pillow
python-dotenv
Because 'pillow' is unpinned and has a long history of image-parsing vulnerabilities, the skill may install a version susceptible to crafted-image attacks. This is especially relevant here because receipt extraction likely processes untrusted image inputs, increasing the chance of denial-of-service or potentially code-execution exposure depending on the version.
The dependency 'python-dotenv' is unpinned, making the environment setup behavior dependent on whichever release is installed at runtime. This creates avoidable supply-chain and configuration-handling risk, especially for tools that may manage local files or secrets.
openpyxl
pydantic
pillow
python-dotenv
Because 'python-dotenv' is unpinned, the project may consume a release with known file-handling weaknesses, including advisory-relevant unsafe overwrite behavior. In tools that may run locally with user permissions, this could enable harmful file modifications if vulnerable functionality is used.
No suspicious patterns detected.