T09 · Insecure Skill Coding Practices
- Location
scripts/nutrition_init.sh:42- Finding
Arbitrary Python Code Injection Through Profile Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This nutrition tracker is purpose-aligned, but its scripts contain input-handling flaws that could execute local code or write outside the intended Obsidian folder.
Review before installing. Use only with trusted inputs and a controlled Obsidian vault until the scripts quote heredocs, validate language/date/numeric fields, and ensure output paths stay inside the intended vault. Be aware that profile and meal data are stored persistently and may sync if your Obsidian vault syncs.
scripts/nutrition_init.sh:42Arbitrary Python Code Injection Through Profile Arguments
scripts/nutrition_check_today.sh:20Python Code Injection Through the Language Argument
scripts/nutrition_log.sh:39Path Traversal Through an Unvalidated Date Value
The documented behavior claims profile initialization, persistence, and goal-based target computation, but the detected implementation appears narrower and inconsistent. Security-relevant mismatches like this can mislead users and agent orchestrators about what data is stored and what actions occur, undermining informed consent and safe tool invocation.
The skill advertises shell scripts that read environment state and write persistent files in an Obsidian vault, but it declares no explicit tool scope or permissions. This increases the chance that an agent invokes file/system-capable actions without clear user visibility or policy boundaries, especially because the writes involve persistent health data.
The skill handles sensitive health-related information and persists it to a local vault and profile file, but the description does not clearly warn users about this storage behavior. Because health data is sensitive and persistent local writes can surprise users, inadequate disclosure materially increases privacy and consent risk.
This file defines all user-facing messages exclusively in Simplified Chinese, which can constitute a language/locale policy violation when there is no indication that the user selected this locale or that the skill is region-specific. The policy allows locale constraints only when they are explicitly optional or justified, neither of which is visible in this file.
The code defaults NUTRITION_LANG to zh-CN when no language is provided and also falls back to zh-CN.json if the requested locale file does not exist. This enforces a specific language choice without explicit user opt-in or a documented justification, which is a natural-language locale policy violation.
LANG_OPT is initialized to "zh-CN", which makes the skill use a specific language by default unless the user explicitly overrides it. This is a natural-language policy concern because the skill does not first offer a language choice or document a justified region-specific constraint.
The script persists sensitive health-related profile data, including sex, height, weight, activity, goal, and calorie/macro targets, to a predictable file path on disk without any explicit notice, consent flow, retention policy, or permission hardening. In the context of an Obsidian vault, this may sync to cloud services or be exposed to other local users/processes, creating a real privacy and data-handling risk even though it is not code-execution related.
The script sets LANG_OPT to zh-CN by default, which forces a specific language unless the caller explicitly overrides it. This is a natural-language locale policy concern because the default behavior imposes a language choice without prior opt-in or negotiation.
The description says to use the skill when the user 'logs meals, asks if targets are met, or wants to set/remember nutrition profile,' but it does not define explicit trigger phrases, scope limits, or exclusion cases. This can create ambiguity about when the skill should activate versus when a general nutrition conversation should remain informational only.
No suspicious patterns detected.