T09 · Insecure Skill Coding Practices
- Location
SKILL.md:24- Finding
Shell Command Injection Through User-Controlled Search Parameters
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for academic research and writing help, but it gives shell command templates that can include user-controlled text and uses a predictable temporary essay file path.
Review before installing. Use this skill only in an isolated environment, avoid pasting sensitive or private essay text unless you understand your agent's LLM data flow, and do not let an agent interpolate raw topics or DOI strings into shell commands. Prefer stdin or safely constructed argument arrays for local analysis instead of /tmp/essay.txt.
SKILL.md:24Shell Command Injection Through User-Controlled Search Parameters
SKILL.md:51Predictable Shared Temporary File Exposes Essay Content to Symlink and Race Attacks
requirements.txt:1Unpinned Third-Party Package and Model Installation Creates Supply-Chain Exposure
The skill’s activation criteria are broad enough to trigger on routine academic-help requests such as essays, drafts, citations, and source finding, without requiring checks for institutional policy compliance or stronger gating around misuse scenarios. In context, this increases the chance the agent will assist with producing submission-ready academic work that can facilitate plagiarism or circumvention of academic integrity rules despite the disclaimer text.
The activation logic is broad enough to trigger on many ordinary academic-help requests, including generic citation or paper-writing queries. Because the skill has both shell and network permissions and can autonomously search sources or process content, unintended invocation could cause unnecessary external lookups, unexpected tool use, or generation of high-risk academic-assistance output in contexts where the user did not explicitly request this skill.
The trigger list contains many generic phrases like 'write essay,' 'research paper,' 'academic writing,' and citation-related terms that are common in benign conversation. This raises the chance of accidental activation, which is more concerning here because the skill can use network and shell capabilities and may steer the interaction into full essay generation, source retrieval, or plagiarism-adjacent assistance without sufficiently explicit user consent.
The invocation cues are broad enough to trigger on common academic-writing requests such as essays, citations, and drafts without clearly constraining appropriate use cases. That increases the chance the skill will activate in contexts involving plagiarism, policy evasion, or ghostwriting, especially because it offers end-to-end essay generation rather than narrowly scoped research assistance.
The code explicitly loads the spaCy model "en_core_web_sm", which constrains analysis to English. This is a natural-language policy concern because the skill enforces a specific language/locale behavior without offering the user a choice or documenting that the tool is intentionally English-only.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
f"measure.py not found at {_MEASURE_SCRIPT}. "
"Ensure the academic-composer skill is installed correctly."
)
result = subprocess.run(
[sys.executable, str(_MEASURE_SCRIPT), "--stdin", "--json"],
input=essay_text,
capture_output=True,
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
import urllib.request
from typing import Any, Dict, List, Optional
API_BASE = "https://api.semanticscholar.org/graph/v1"
PAPER_FIELDS = "title,authors,year,abstract,externalIds,venue,referenceCount,citationCount,journal,publicationTypes"
The trigger list includes very broad phrases such as 'write essay', 'research assistant', and 'academic writing' that are common user intents and may activate the skill in contexts where the user did not explicitly ask for this specific capability. Over-broad activation increases the chance of unintended routing, inappropriate invocation, or the skill being used in contexts with stricter policy requirements around academic integrity or source handling.
The dependency is specified with a lower bound only (spacy>=3.7.0), which allows installation of any newer release, including versions with breaking changes or newly introduced supply-chain risk. While this is not an immediately exploitable flaw by itself, unpinned dependencies reduce build reproducibility and can expose the skill to unexpected or malicious upstream package changes.
spacy>=3.7.0
The file mixes English and Chinese trigger phrases, which may impose language-specific activation behavior without stating whether users can opt in or select their preferred language. Under the language/locale policy, multilingual behavior should be clearly optional or justified rather than silently enabled.
No suspicious patterns detected.