T09 · Insecure Skill Coding Practices
- Location
SKILL.md:325- Finding
Command Injection Through Unquoted Watched File Path in Processing Workflow
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This workflow-automation skill is purpose-aligned, but it teaches persistent scheduled execution, file-triggered command execution, and off-host data posting without enough safety scoping.
Install only if you are comfortable reviewing each workflow before running it. Keep watched directories private and narrowly scoped, avoid sending local file contents to external APIs unless intended, do not put untrusted filenames into shell commands, and use a dedicated low-privilege environment for cron or long-running workflows.
SKILL.md:325Command Injection Through Unquoted Watched File Path in Processing Workflow
SKILL.md:388Command Injection Through Unquoted Watched File Path in Formatting Workflow
SKILL.md:429Unpinned and Unverified Python Dependency Installation
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"schedule": "0 */6 * * *"
},
"steps": [
{ "action": "fetch", "url": "https://api.example.com/data", "output": "rawData" },
{ "action": "save", "path": "./output/data.json", "input": "rawData" }
],
"errorHandling": {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"schedule": "0 */6 * * *"
},
"steps": [
{ "action": "fetch", "url": "https://api.example.com/data", "output": "rawData" },
{ "action": "save", "path": "./output/data.json", "input": "rawData" }
],
"errorHandling": {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"schedule": "0 */6 * * *"
},
"steps": [
{ "action": "fetch", "url": "https://api.example.com/data", "output": "rawData" },
{ "action": "save", "path": "./output/data.json", "input": "rawData" }
],
"errorHandling": {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"schedule": "0 */6 * * *"
},
"steps": [
{ "action": "fetch", "url": "https://api.example.com/data", "output": "rawData" },
{ "action": "save", "path": "./output/data.json", "input": "rawData" }
],
"errorHandling": {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"schedule": "0 */6 * * *"
},
"steps": [
{ "action": "fetch", "url": "https://api.example.com/data", "output": "rawData" },
{ "action": "save", "path": "./output/data.json", "input": "rawData" }
],
"errorHandling": {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"schedule": "0 */6 * * *"
},
"steps": [
{ "action": "fetch", "url": "https://api.example.com/data", "output": "rawData" },
{ "action": "save", "path": "./output/data.json", "input": "rawData" }
],
"errorHandling": {
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"schedule": "0 */6 * * *"
},
"steps": [
{ "action": "fetch", "url": "https://api.example.com/data", "output": "rawData" },
{ "action": "save", "path": "./output/data.json", "input": "rawData" }
],
"errorHandling": {
The skill explicitly documents workflows that can write and move files, execute shell commands, perform network requests, and install scheduled persistence, but it does not warn users about the risks to local data, privacy, or host integrity. In an agent-executed skill, normalizing these side effects without consent or safety guardrails increases the chance of unintended destructive actions or silent data exfiltration.
The documentation instructs users to register the workflow as a cron job, establishing persistence on the host without discussing review, revocation, or unintended repeated execution. In combination with file, network, and exec capabilities, scheduled persistence increases the blast radius of a mistaken or unsafe workflow by causing recurring actions without further user intervention.
python runner.py --workflow workflows/fetch_data.json
crontab -e
This example reads a triggered local file and POSTs its contents to an external endpoint, creating a clear data exfiltration pattern in the documentation. In a workflow-builder skill that encourages automation, showing direct transmission of file contents without consent checks, sanitization, or warnings makes accidental leakage of sensitive files more likely.
{ "action": "read", "file": "${trigger.file}", "output": "fileContent" },
// 第二步:用fileContent作为输入
{ "action": "fetch", "url": "https://api.example.com/process", "method": "POST", "body": "${fileContent}", "output": "result" },
// 第三步:用result作为输入
{ "action": "save", "path": "./output/result.json", "input": "${result}" }
The example shows a file watcher automatically reading newly created files, invoking a command with the triggered file path, and moving the file afterward, all without cautioning about accidental processing of sensitive or attacker-controlled files. In this context, automatic file-triggered execution can amplify mistakes and turn dropped files into command inputs or silent data handling events.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
{
"trigger": { "type": "manual" },
"steps": [
{ "action": "fetch", "url": "https://api.source1.com/data", "output": "data1" },
{ "action": "fetch", "url": "https://api.source2.com/data", "output": "data2" },
{ "action": "exec", "command": "python merge.py --source1 data1.json --source2 data2.json --output merged.json", "output": "mergeResult" },
{ "action": "save", "path": "./output/merged.json", "input": "${mergeResult}" }
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"trigger": { "type": "manual" },
"steps": [
{ "action": "fetch", "url": "https://api.source1.com/data", "output": "data1" },
{ "action": "fetch", "url": "https://api.source2.com/data", "output": "data2" },
{ "action": "exec", "command": "python merge.py --source1 data1.json --source2 data2.json --output merged.json", "output": "mergeResult" },
{ "action": "save", "path": "./output/merged.json", "input": "${mergeResult}" }
],
The file states '完全中文化工作流定义说明与参数文档', and the entire skill is presented only in Chinese with no opt-in, alternative locale, or justification that it is region-specific. Under SQP-3, forcing a specific language without user choice is a natural-language policy concern.