T09 · Insecure Skill Coding Practices
- Location
scripts/analyze_journal.py:463- Finding
Untrusted Journal Title Enables Output Path Traversal
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for CNKI journal analysis, but its report script can write generated files outside the intended output folder if a crafted journal title is supplied.
Install only if you are comfortable with the agent browsing CNKI, using browser tooling, creating local JSON/chart/DOCX files, and installing Python dependencies. Run it in a dedicated project folder or virtual environment, and avoid processing JSON from untrusted sources until the journal-title output path is sanitized.
scripts/analyze_journal.py:463Untrusted Journal Title Enables Output Path Traversal
SKILL.md:135Third-Party Dependencies Are Installed Without Version or Integrity Pinning
The declared description emphasizes an end-to-end CNKI-powered journal analysis skill: user provides a journal name, the skill automatically retrieves the last five years of article metadata from CNKI, then produces a comprehensive report. The supplied code does only the downstream analysis and report generation portion. It expects a local JSON file already populated with journal_info and articles, and contains no network access, no CNKI scraping/API usage, no journal-name lookup, and no logic ensuring the data covers the most recent five years. While many report elements align partially with the description (keyword trends, methods, authors, sections, Word report generation), the primary advertised capability—automatic CNKI retrieval based on a journal name—is missing. In addition, the 'research gaps/submission advice' output is merely a generic placeholder rather than the full-dimensional expert analysis described. Therefore this is a material description-behavior mismatch.
The skill instructs reading a local reference file (references/journal_codes.md) but declares no explicit tool scope or permissions boundary. In an agent environment, undeclared file-read capability weakens least-privilege controls and can enable broader-than-expected local file access if the runtime infers or grants filesystem tools implicitly.
Overly broad trigger conditions can cause the skill to activate on ambiguous user requests, leading to unintended browsing, data collection, file generation, or dependency-related actions. In an agentic environment, accidental invocation increases the chance of unnecessary external access and execution of higher-risk workflow steps.
The skill tells the agent/user to run pip3 install for multiple packages, which modifies the execution environment beyond the core analysis task. Environment-changing instructions can introduce supply-chain risk, break reproducibility, or be abused to install unexpected packages if the instruction path is generalized or tampered with.
The manifest frames the skill as analyzing a specified C journal by querying CNKI for recent issues and article metadata. This line expands capability to search the broader web for individual article abstracts, which is a separate retrieval mode not clearly justified by the stated journal-level macro-analysis purpose.
No suspicious patterns detected.