T09 · Insecure Skill Coding Practices
- Location
scripts/scan.sh:37- Finding
Command Injection Through an Unquoted Repository Path in CodeQL Build Commands
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This CodeQL skill is mostly coherent, but its scan mode can execute repository build commands and has an unsafe command-construction issue that users should review before installing.
Review this skill before installing. Use scan mode only on trusted repositories or inside a disposable sandbox with no secrets in the environment, avoid repository paths containing shell metacharacters, and treat generated Markdown reports as containing untrusted SARIF evidence rather than trusted instructions.
scripts/scan.sh:37Command Injection Through an Unquoted Repository Path in CodeQL Build Commands
scripts/audit.py:68Untrusted SARIF Content Is Rendered as Active Markdown
The code is clearly focused on one narrow function: analyzing the text of a provided .ql query file and producing a checklist-based optimization report. This partially matches the declared 'QL query optimization' aspect, but the declared purpose substantially overstates functionality by claiming a full CodeQL security audit pipeline with static scanning and SARIF triage. There is no code to invoke CodeQL, scan codebases, parse SARIF, interact with LGTM/GitHub Code Scanning, or analyze vulnerabilities beyond simple regex/substring checks inside a query file. Thus the description does not accurately represent the actual behavior.
The skill advertises and invokes scripts that read from repositories and write outputs (for example SARIF and reports), but it does not declare any explicit tool scope or permissions boundaries. In an agent environment, missing scope metadata can allow the skill to be invoked without adequate user awareness or policy enforcement around filesystem access.
The trigger phrases include broad requests such as "scan this repo" and "analyze this vulnerability," which can cause the skill to activate outside a clearly bounded CodeQL context. Because the skill can launch scripts that perform scanning and write artifacts, overbroad routing increases the chance of unintended execution on sensitive repositories or files.
The scan mode states it performs language detection, build command selection, database creation, scanning, and SARIF generation, but it does not warn users that this executes build/scan operations and writes artifacts in the target repository context. Running builds on untrusted code and creating outputs can have security and operational consequences, especially in a security-audit skill likely to be pointed at arbitrary repositories.
The module docstring, CLI description, and generated report content are written entirely in Chinese, and the script emits Chinese-only user-facing messages and report headings. This imposes a specific language/locale on all users without offering an opt-in choice or documenting a justified region-specific constraint.
The report renderer hard-codes all section titles, labels, warnings, and remediation placeholders in Chinese. Because these strings are part of the skill's user-facing behavior and no alternative locale is offered, the file forces a language choice without user opt-in.
This code file contains user-facing natural-language documentation and output strings exclusively in Chinese. The policy requires flagging language or locale constraints when the skill forces a specific language without user opt-in, and no alternative language or justification is provided here.
This shell script's natural-language comments, usage text, and runtime messages are entirely in Chinese, which can constitute a language/locale policy violation when no user opt-in or alternative language is offered. The policy applies to natural-language content in code files, including comments and string literals.
No suspicious patterns detected.