T09 · Insecure Skill Coding Practices
- Location
scripts/verify-answer.py:42- Finding
Unsafe SymPy Expression Parsing in Answer Verification
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a legitimate Vietnamese education helper, but it needs Review because its setup and math-expression workflows can affect the local environment and may execute unsafe input.
Install only in an isolated project environment or container. Avoid the documented global npm install and --break-system-packages pip command; use pinned dependencies and a virtual environment instead. Do not pass formulas or graph expressions from untrusted prompts directly into the scripts, and confirm before web searching private exams, teacher materials, or student-related context.
scripts/verify-answer.py:42Unsafe SymPy Expression Parsing in Answer Verification
scripts/draw-figure.py:101Unsafe SymPy Expression Parsing in Graph Rendering
SKILL.md:56Unpinned Global and System Python Dependency Installation
There is a material description-behavior mismatch. While one part of the declared purpose mentions a script that creates .docx exam files in CV 7991 format, the overall description presents a much broader skill: generating giáo án/kế hoạch bài dạy/phiếu học tập and exam materials across all grade levels and subjects, with a three-layer verification system involving web search, SymPy, and Matplotlib. The actual code only implements local document generation for a predefined Grade 10 Math exam set. It contains hardcoded topics, questions, and answers, and outputs three .docx files with formatting and pagination. This partially matches the narrow claim about a .docx exam-generation script, but it does not implement the major advertised capabilities, especially verification, plotting, broad subject coverage, or lesson/worksheet generation. Therefore the description significantly overstates what this code chunk actually does.
The description presents a broad pedagogical authoring and verification skill with multiple major capabilities: creating educational documents, verifying answers via web/SymPy, and producing formatted .docx exam files. The supplied code chunk only implements one narrow subset: drawing figures and charts with matplotlib, plus parsing a math expression for graph plotting. While Matplotlib-based figure drawing is mentioned in the description, this chunk alone does not substantiate the skill’s primary declared purpose. Therefore the description materially overstates what this code chunk actually does.
There is a clear description-behavior mismatch. The description presents a comprehensive curriculum-aligned educational authoring skill with multiple verification layers and document-generation features across all school levels. The actual code chunk is much narrower: a local command-line verifier focused on symbolic math/calculation tasks, basic geometry formulas, and limited chemistry equation balancing. The script does not access the web, does not render plots, does not create Word documents, and does not produce lesson plans, tests, or worksheets. While the SymPy-based verification aspect partially matches the declared VERIFY layer, the primary declared purpose and several major capabilities are absent from this code.
Referenced artifact was not completely inspected
Script `scripts/create-exam.js` tạo file .docx hoàn chỉnh, chuẩn format CV 7991.
Referenced artifact was not completely inspected
Script `scripts/create-exam.js` tạo file .docx hoàn chỉnh, chuẩn format CV 7991.
The trigger phrases are extremely broad and likely to match ordinary educational conversations, which can cause the skill to activate unexpectedly. In agent environments, overbroad activation increases the chance of unintended tool use, file generation, package-install guidance, or external lookups when the user did not explicitly request this skill.
The skill mandates web searches for all subjects without warning that user-provided prompts, exam questions, or curricular content may be sent to third-party services. In educational settings this can expose proprietary teacher materials, unpublished exams, or student-related context to external systems without informed consent.
This JavaScript file contains natural-language instructions and operational output entirely in Vietnamese, beginning in the top-level docstring and continuing throughout the script. Because the skill forces a specific language for usage instructions rather than offering a locale choice or documenting a justified locale restriction, it violates the language/locale policy criteria.
The file’s natural-language docstring and usage/help text are entirely in Vietnamese, and there is no indication that the skill is region-specific or that users may select another language. This can violate language/locale policy when the skill is used in broader contexts because it imposes a language constraint without opt-in.
The argparse description, argument help strings, dependency message, and completion message are all presented only in Vietnamese. Because no language selection or locale justification is provided, the skill effectively forces a specific language on all users.
The module docstring claims support for physics verification and chemical balancing, including examples like --physics, but the command-line interface never defines a --physics option and chemistry handling is only a hardcoded lookup table rather than general verification. This creates a meaningful mismatch between the documented capability and what users can actually do with the script.
The usage examples explicitly tell users to invoke --expr and --physics, but the argument parser only defines --equation, --calc, --quadratic, --geometry, --params, and --chem. This is an active contradiction between the script's documentation and its actual interface, not merely omitted detail.
The skill promotes one-command .docx generation but does not clearly disclose that it writes files to disk. Hidden or insufficiently disclosed file writes can surprise users, overwrite files, or create artifacts in sensitive working directories, especially in automated agent contexts.
This markdown file is natural-language guidance, and all user-facing content is presented only in Vietnamese. Under the policy-violation category, forcing a specific language without user opt-in can be a locale policy issue when no language choice or justification is provided.
Natural-language policy issues apply to all file types, including code comments, docstrings, and user-facing strings. This file presents its purpose and usage entirely in Vietnamese, and later CLI descriptions are also Vietnamese-only, with no opt-in or indication that the skill is intentionally region-specific.
The parser description and help strings are user-facing natural language, and they require Vietnamese comprehension to use the script effectively. Because no language choice or locale justification is provided, this is a language/locale policy concern under SQP-3.
No suspicious patterns detected.