T09 · Insecure Skill Coding Practices
- Location
scripts/search-content.js:149- Finding
Shell Command Injection Through User-Controlled Search Queries
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This article-generation skill is coherent overall, but it needs Review because normal user input can reach unsafe shell execution and the generated posts can include unsupported giveaway claims.
Review this skill before installing. It should be fixed to call Tavily with an argument-array API instead of shell command strings, pin or verify the Tavily dependency and npm packages, make raw-data saving opt-in, and remove giveaway or health-effect claims unless explicitly authorized and reviewed.
scripts/search-content.js:149Shell Command Injection Through User-Controlled Search Queries
scripts/search-content.js:149Execution of an Unpinned External Skill Outside the Audited Project
scripts/format-article.js:389Unconditional Fabricated Giveaway and Promotional Content in Generated Posts
Referenced artifact was not completely inspected
### `scripts/search-content.js`
Referenced artifact was not completely inspected
### `scripts/format-article.js`
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
'转发给朋友,一起打卡美食!👯♀️'
];
return prompts[Math.floor(Math.random() * prompts.length)];
}
/**
The code builds a shell command string and interpolates user-influenced query text into it before passing it to execSync. Because the query is wrapped only in double quotes and not safely escaped for the shell, an attacker can inject shell metacharacters such as command substitution to execute arbitrary commands on the host running the skill.
The skill explicitly describes automatic web searching and saving generated output to local files, but it does not disclose that user-provided topics/keywords may be transmitted to an external service (Tavily) or that content will be written to disk. This can create privacy, compliance, and data handling risks if users supply sensitive prompts or run the skill in environments where local writes are restricted or monitored.
The keyword list includes explicit therapeutic or medical-effect claims such as '补肾', '壮阳', '清热解毒', '止咳', '助眠', '抗衰老', '增强免疫力', and '控制血糖'. In a content-generation skill, these terms can cause the model to produce health advice or disease-related claims without evidence, disclaimers, or user opt-in, creating regulatory, trust, and safety risk.
The package description is entirely in Chinese and describes the skill as generating platform content in that locale, but there is no indication of user opt-in, language selection, or a documented region-specific justification in this file. This creates a natural-language locale policy concern because the skill appears tailored to a single language by default.
This JavaScript skill generates all user-facing content, comments, headings, and call-to-action strings in Chinese only, including titles, hashtags, and article bodies. The file does not offer any language selection or opt-in mechanism, which matches the policy category for forcing a specific language without user choice.
The generic formatter emits authoritative-sounding source-count and relevance-score text even though this module only formats data and does not verify how those metrics were produced. If upstream data is missing, untrusted, or incorrect, the module still presents it as factual support, which can facilitate deceptive or unverifiable content generation.
The formatter injects a giveaway claim ('抽3位送美食代金券') that is not derived from input data and may represent a fabricated promotion. This can mislead users, create compliance/legal issues, and cause the agent to publish commitments the operator cannot honor.
The file's description, CLI option text, and runtime messages are all written in Chinese, with no indication that users can select another language. This creates a natural-language locale constraint that is not presented as optional or justified as region-specific.
The script writes raw search results and extracted data to disk by default, which can persist third-party content, metadata, and potentially sensitive information derived from searches. In a content-generation skill that automatically fetches external sources, silent retention increases privacy and data-handling risk, especially on shared systems or when operators do not realize debug-style artifacts are being saved.
The manifest describes a skill for searching, summarizing, and generating social-media articles, which makes web access expected. However, importing child_process and later invoking a shell command introduces code-execution capability that is broader than the stated purpose and not obviously required for article generation itself.
This code builds a shell command from the topic-derived query and executes it via execSync, causing user-provided content to be sent to the external Tavily search skill. While there is internal logging on failure, there is no user-facing disclosure, confirmation, or comment warning that search terms will be transmitted externally via subprocess execution.
The manifest description and the rest of the skill documentation consistently assume Chinese-language use cases and Chinese social platforms, but they do not state that this is an optional locale choice. Under the language/locale policy, forcing or implicitly requiring a specific language without opt-in can be a policy concern unless clearly justified as region-specific.
The entire skill content is presented only in Chinese, with no indication that the user can choose another language or that the locale restriction is intentional. Under the policy, a fixed language without user opt-in can be a natural-language policy violation.
This markdown file presents all instructions and descriptive content exclusively in Chinese. Under the policy scope provided, forcing a specific language without offering the user a language or locale choice can be a natural-language policy violation.
Using caret ranges for runtime dependencies means builds may resolve to different package versions over time, which weakens supply-chain reproducibility and can unexpectedly introduce vulnerable or malicious releases. In a skill that performs web fetching and content generation, dependency compromise could affect network access, scraped content handling, or output generation.
"author": "飞云儿",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",
"cheerio": "^1.0.0",
"marked": "^12.0.0",
"yargs": "^17.7.0"
Axios has multiple known advisories, and because the manifest uses a non-exact version, it is impossible to verify from this file alone whether the resolved package is affected. This matters more in this skill context because axios is likely used for outbound requests to search or fetch content, so vulnerable HTTP client behavior could enable SSRF, credential leakage, or response tampering depending on the affected version.
The cheerio dependency is specified with a caret range, allowing unreviewed minor/patch updates at install time. This creates supply-chain uncertainty and can expose the skill to newly introduced vulnerable code paths in HTML parsing or scraping logic.
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",
"cheerio": "^1.0.0",
"marked": "^12.0.0",
"yargs": "^17.7.0"
},
The marked package is not pinned to an exact version, so installations may pull different releases over time. Because marked processes text/markdown-like content, an unexpected vulnerable release could enable denial of service or unsafe parsing behavior in downstream usage.
"dependencies": {
"axios": "^1.6.0",
"cheerio": "^1.0.0",
"marked": "^12.0.0",
"yargs": "^17.7.0"
},
"devDependencies": {
Marked has a history of advisories including denial-of-service issues, and the non-pinned manifest prevents verification that an installed version is safe. In a content-generation skill that may process externally sourced text or markdown, a vulnerable parser version can increase risk of resource exhaustion or unsafe rendering behavior.
An unpinned yargs dependency reduces build determinism and increases exposure to supply-chain issues, even if the direct impact is usually limited to CLI parsing behavior. While lower risk than network-facing libraries, it still permits unnoticed version drift.
"axios": "^1.6.0",
"cheerio": "^1.0.0",
"marked": "^12.0.0",
"yargs": "^17.7.0"
},
"devDependencies": {
"@types/node": "^20.0.0"
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"yargs": "^17.7.0"
},
"devDependencies": {
"@types/node": "^20.0.0"
},
"engines": {
"node": ">=18.0.0"
This JavaScript file uses Chinese for module documentation and console output, including user-visible messages, but provides no indication that the skill is region-specific or that users can opt into another language. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.
Detected: suspicious.dangerous_exec