T09 · Insecure Skill Coding Practices
- Location
SKILL.md:100- Finding
Shell Command Injection Through User-Controlled CLI Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent bathroom tracker, but it needs review because it stores sensitive health data and gives unsafe command templates for user-provided text.
Review before installing, especially on a shared machine. This skill records private bathroom and symptom details in a local plaintext database and may create image files with those details if cards are enabled. Use it only if you are comfortable with that local persistence, and prefer a version that enforces private file permissions, documents deletion and retention, and invokes the CLI without shell interpolation.
SKILL.md:100Shell Command Injection Through User-Controlled CLI Arguments
scripts/excretion.py:29Sensitive Health Database Created Without Explicitly Restrictive Permissions
The skill’s declared behavior does not accurately match what it instructs the agent to do, especially around collecting additional sensitive health data and using a local CLI-backed workflow. In a health-tracking context, undocumented data collection and misleading claims about reminders or interaction mode can undermine informed consent, cause unexpected retention of highly sensitive medical information, and lead users to rely on features that may not exist.
The trigger keywords are broad enough to activate on ordinary conversation about bowel, urine, constipation, or symptoms, which risks invoking the skill when the user is seeking general discussion rather than consenting to log health events. Because the subject matter is highly sensitive medical data, accidental activation can lead to over-collection, unnecessary prompting, or unintended storage of private information.
The skill handles highly sensitive health information but does not provide an upfront warning in the description that these details are stored locally through CLI logging. Users may disclose intimate medical data without understanding that it will be persisted, which creates a meaningful privacy and consent failure even if storage is only local.
The instruction says to ask for missing required fields "in the user's language (Chinese)," which effectively forces Chinese output rather than detecting or offering the user's preferred language. This is a language-policy issue because the skill imposes a specific locale without opt-in or a documented region-specific justification.
The natural-language prompt explicitly forces Chinese text such as "厕所记录" and Chinese label translations on the generated card. This is a language/locale policy issue because the file does not offer the user a language choice or explain why Chinese output is required.
The SOP instructs creating a persistent local directory and saving generated image files containing bathroom-event metadata such as time, duration, color, pain, and Bristol scale. Because this is sensitive health-adjacent information, persistent storage can create a privacy risk if the user is not clearly informed, if files accumulate indefinitely, or if local access by other software/users is possible.
mkdir -p ~/.openclaw/media/excretion-cards
uv run /Users/herve.clawd/.openclaw/workspace/skills/nano-banana-pro/scripts/generate_image.py \
--prompt "<PROMPT>" \
--filename "$HOME/.openclaw/media/excretion-cards/excretion-card-YYYY-MM-DD-HH-MM-SS.png" \
Hard-coding DEFAULT_TZ = 'Asia/Shanghai' for sensitive health-event records can silently mislabel timestamps and distort time-based analysis such as nocturia counts, weekly windows, and interval calculations for users in other regions. In this context the issue is mainly data-integrity and privacy-context risk rather than direct compromise, but incorrect timing can still produce misleading health reminders and summaries.
The weekly summary treats every non-pee event as poop, so 'attempt' events are counted as bowel movements and included in poop pain/interval statistics. In a health-tracking skill, this creates materially incorrect summaries that can mislead users about constipation, bowel frequency, and symptom trends, which is a real integrity issue even though it is not code-execution related.
This markdown file instructs the skill to produce a PNG in a local directory and later shows commands that create that directory and write an output file. Under the markdown-file criteria for missing user warnings, there is no explicit warning that the skill may create local files or invoke an installed external generator to process user-provided event data.
The top-level docstring presents the tool as a local pee/poop tracker, yet the documented usage and implementation also support an 'attempt' event type for unsuccessful bathroom attempts. That is an intent/documentation mismatch because the code's supported domain is broader than the headline description suggests.