T09 · Insecure Skill Coding Practices
- Location
scripts/nb_helpers.py:348- Finding
Arbitrary Python Code Injection Through Quiz Cell Generation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This notebook-building skill mostly does what it claims, but its quiz-generation code can turn untrusted quiz text into executable Python inside generated notebooks.
Review generated notebooks before running quiz cells, especially when quiz questions, hints, or IDs come from untrusted sources. Use the skill only on intended project files, specify output paths clearly, and do not rely on its local hash quiz system for secure exams or certification grading.
scripts/nb_helpers.py:348Arbitrary Python Code Injection Through Quiz Cell Generation
scripts/nb_helpers.py:417Arbitrary Python Code Injection Through Quiz Summary Generation
scripts/nb_helpers.py:303Quiz Answers Are Recoverable Due to a Public Fixed Salt and Truncated Fast Hash
The skill clearly enables local file reads and writes by instructing the agent to load, modify, merge, and save notebooks, but it does not declare any explicit tool scope or permission boundaries. That creates an authorization gap where an agent may perform filesystem operations beyond what a reviewer or platform policy expects, increasing the risk of unintended file modification.
The skill repeatedly instructs the agent to execute Python via a terminal and save notebooks, while framing this as mandatory behavior, but it does not prominently warn that these actions will create or overwrite local files. This can lead to silent filesystem changes and makes it easier for a prompt-injected or mistaken workflow to modify user data without sufficiently informed consent.
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
1. 此 SKILL.md 文件所在目录的同级 `scripts/` 子目录
2. 即 SKILL.md 的父目录 + `/scripts`
例如如果此 SKILL.md 位于 `/home/user/.codebuddy/skills/notebook-builder/SKILL.md`,则 `<技能脚本目录>` 应替换为 `/home/user/.codebuddy/skills/notebook-builder/scripts`。
## 辅助脚本
This Python file contains user-facing natural-language documentation and command-line messages exclusively in Chinese, starting with the module docstring and continuing throughout the file. Because the skill does not offer an opt-in language choice or document a justified locale restriction, it conflicts with the language/locale policy for natural-language content.
The README uses Chinese throughout and does not indicate that users may choose another language or locale. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy concern.
No suspicious patterns detected.