T09 · Insecure Skill Coding Practices
- Location
scripts/mood_diary.py:51- Finding
Child Mood Records Stored Without Enforced Access Restrictions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent local emotion-education skill for children, but its mood diary stores sensitive entries on disk and should be treated as private data.
Install only if you are comfortable with mood diary entries being saved locally at ~/.bookshelf-plus/kids/mood_diary.json. On shared or backed-up devices, treat that file as sensitive: review local permissions, delete it when no longer needed, and avoid entering identifying or highly private details.
scripts/mood_diary.py:51Child Mood Records Stored Without Enforced Access Restrictions
The stated purpose and the detected behavior do not align: the metadata describes a child-facing emotion tool, while the implementation appears narrower and partly parent-oriented, with several declared features missing. This mismatch is dangerous because reviewers and users may trust the description and grant access or use the skill under false assumptions, especially given the sensitive context of children's emotional data and guidance.
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
def clear_screen():
os.system("cls" if os.name == "nt" else "clear")
# ── Emotion mapping ────────────────────────────────────────────────────
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
def clear_screen():
os.system("cls" if os.name == "nt" else "clear")
# ── Emotion mapping ────────────────────────────────────────────────────
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
def clear_screen():
os.system("cls" if os.name == "nt" else "clear")
# ── Emotion mapping ────────────────────────────────────────────────────
os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.
def clear_screen():
os.system("cls" if os.name == "nt" else "clear")
# ── Emotion mapping ────────────────────────────────────────────────────
The README states that a child's mood diary is stored on disk at a predictable local path but provides no privacy notice, retention guidance, or warning about sensitive data handling. Because the data concerns young children and emotional state, disclosure to other local users, backups, screenshots, or shared machines could expose sensitive behavioral information even without network exfiltration.
The README explicitly states '全繁體中文' as part of the language style, which imposes a specific language/locale. There is no indication that users can opt into another language, nor is there a documented region-specific justification for this constraint.
The skill advertises capabilities that imply file read/write and shell use, but the manifest does not declare any tool scope or permissions boundaries. This creates an authorization and review gap: operators and users cannot easily tell what the skill is allowed to access, increasing the risk of unintended filesystem access or command execution if the implementation is invoked.
The trigger keywords include very broad, everyday emotional terms that are likely to match ordinary conversation. Overbroad activation can cause the skill to trigger unintentionally in unrelated contexts, leading to surprise execution, unwanted data collection, or interference with other safer handlers.
The skill states that a child's mood diary is persisted to a local file, but it provides no clear privacy notice, retention policy, consent flow, or data handling disclosure. Because the data concerns young children and emotional state, undisclosed storage materially increases privacy risk, including unauthorized access by other local users, backup systems, or downstream tooling.
This Python file contains user-facing prompts, labels, and messages almost entirely in Chinese, and there is no visible opt-in, fallback, or explanation that the skill is intended only for Chinese-speaking users. Under the policy, forcing a specific language without user choice is a natural-language locale violation.
This code file contains user-facing natural-language content almost entirely in Traditional Chinese, including the title, prompts, and coaching output. Under the policy rule for language or locale constraints, this is a violation because the skill does not provide any opt-in, language selection, or justification for restricting interaction to a specific language.
Nearly all user-facing strings in the program are in Traditional Chinese, which imposes a specific language/locale on users. The policy allows locale constraints only when users are given a choice or when the restriction is clearly documented and justified, neither of which appears here.
This skill stores sensitive emotional diary entries for young children in a predictable file under the user's home directory without any user-facing disclosure, consent, retention notice, or access-control hardening. Because the content includes mood, triggers, timestamps, and notes about minors, local storage can expose private information to other local users, backup systems, synced folders, or anyone with access to the account.
This code presents its title and interactive content primarily in Traditional Chinese, while also including English in the header, but there is no indication that the user can choose their preferred language or locale. The policy specifically calls for flagging language or locale constraints when a skill effectively forces a specific language without user opt-in.
This skill is described as an interactive tool for helping young children recognize and express emotions, but clear_screen() invokes os.system to run cls or clear. Terminal clearing is not a core emotional-coaching capability, and spawning shell commands is an unnecessary execution capability for the stated purpose.