Back to skill

Security audit

deep-research skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent research workflow, but it requires broad automatic shell-script execution and has a real command-injection risk in its state-management fallback.

Review this skill before installing. It is not evidently malicious, but only use it if you are comfortable with a research skill that automatically runs a local bash orchestrator, writes checkpoint/report files, performs web searches and full-text fetches, and currently contains an argument-handling bug that should be fixed before use in environments where prompts or users can influence --complete or --next values.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
orchestrator.sh:342
Finding

Arbitrary Python Code Execution Through Unsanitized Workflow Arguments

Content
View full analysis
/dev/null; then jq --arg s "$step" '.completed_steps += [$s] | .current_step = ""' "$state_file" > "${state_file}.tmp" && mv "${state_file}.tmp" "$state_file" elif command -v python3 &>/dev/null; then python3 -c " import json with open('$state_file') as f: state = json.load(f) state['completed_steps'].append('$step') state['current_step'] = '' with open('$state_file', 'w') as f: json.dump(state, f, indent=2) " else echo -e "${RED}⛔ 需要 jq 或 python3 来管理状态${NC}" exit 1 fi } advance_step() { local next_step="$1" local state_file="${CHECKPOINT_DIR}/session.json" if command -v jq &>/dev/null; then jq --arg s "$next_step" '.current_step = $s' "$state_file" > "${state_file}.tmp" && mv "${state_file}.tmp" "$state_file" elif command -v python3 &>/dev/null; then python3 -c " import json with open('$state_file') as f: state = json.load(f) state['current_step'] = '$next_step' with open('$state_file', 'w') as f: json.dump(state, f, indent=2) " fi } ``` ### Technical Analysis The `--complete` and `--next` command-line values are assigned to `step` and `next_step`, then directly interpolated into source code passed to `python3 -c`. Shell quoting does not make these values safe inside the generated Python program. A value containing a single quote can terminate the intended Python string literal and inject additional Python statements. For example, a value shaped like: ```text x'); __import__("os").system("id"); # ``` would transform the relevant generated statement into code equivalent to: ```python state['completed_steps'].append( ...[truncated 2464 chars]
Remediation
View remediation
&2 exit 2 ;; esac } ``` 2. Parse and validate the `--next` option explicitly rather than assuming that the fourth positional argument contains its value. 3. Verify that transitions follow the expected sequence instead of allowing arbitrary steps to be marked complete. 4. Use one safe state-update implementation consistently rather than maintaining separate security behavior for `jq` and Python environments. 5. Add regression tests containing quotes, newlines, semicolons, comment markers, and Python expressions in both arguments. Confirm that invalid values are rejected and never interpreted as code. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (23)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · orchestrator.sh (reported line 524)May include surrounding context.

sh
echo -e "${YELLOW}  ⚠️ 交付前请执行最终自检:${NC}"
                    echo -e "${YELLOW}     bash orchestrator.sh --self-check${NC}"
                    # 清理状态文件
                    rm -f "${CHECKPOINT_DIR}/session.json"
                else
                    show_step "$NEXT_STEP"
                fi

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · orchestrator.sh (reported line 538)May include surrounding context.

sh
echo -e "${YELLOW}  ⚠️ 交付前请执行最终自检:${NC}"
                    echo -e "${YELLOW}     bash orchestrator.sh --self-check${NC}"
                    # 清理状态文件
                    rm -f "${CHECKPOINT_DIR}/session.json"
                else
                    show_step "$NEXT_STEP"
                fi

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README content is effectively Chinese-only, including core usage and behavior instructions, with no indication that users may choose another language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README instructs users to run bash orchestrator.sh "调研主题" and states the agent may auto-trigger the skill, but it does not clearly warn that a shell script will execute and write output files. In an agent-skill context, normalizing automatic shell execution without explicit consent increases the risk of unintended command execution, filesystem writes, and misuse if the script later gains broader side effects.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to run a local shell script and implies file/state creation, but it does not declare any explicit tool scope or permissions. That creates an authorization ambiguity where an agent may perform file writes or command execution beyond what a user reasonably expects, increasing the risk of unintended side effects or abuse through hidden script behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger conditions are very broad, covering common requests like research, industry analysis, market research, and competitor analysis. This makes accidental activation likely, causing the agent to follow strong operational instructions—including shell execution—when the user may have only wanted normal conversational help.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The visible natural-language description is written entirely in Chinese and presents the skill as operating in that language, without offering a user language choice or documenting a justified locale restriction. Under the stated policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly tells the agent that its first action must be bash orchestrator.sh "[调研主题]", and repeatedly insists this cannot be bypassed. Because the skill content is untrusted and the script contents are not shown here, this is dangerous: it can execute arbitrary local commands, write files, read sensitive data, or alter the environment without any warning, review gate, or user consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file’s title, usage, and operational guidance are all presented in Chinese, and the embedded agent instructions throughout the script assume Chinese-language interaction. This imposes a specific language/locale on users without offering a choice or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

SQP-3 applies to all file types and covers natural-language policy violations such as forcing a specific language or locale. This markdown file contains only Chinese instructions and examples, with no indication that users may choose another language or that the locale is intentionally restricted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The title and all guidance prescribe a single Chinese writing style for reports, and there is no indication that users may opt into another language or locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains user-facing operational instructions exclusively in Chinese, including required outputs and workflow steps. Under the language/locale policy rule, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly requires bilingual Chinese/English keyword generation and table output without any indication that the user's preferred language, locale, or accessibility needs were checked first. This can override user intent, introduce unnecessary data transformation, and cause the agent to issue searches in languages the user did not request, which may alter retrieval behavior and expose content from unintended jurisdictions or contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill file is written in Chinese and provides no indication that the user can choose another language or locale. Under the policy criteria, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly instructs agents to perform full-text scraping of multiple URLs at scale, but provides no safeguards around privacy-sensitive content, copyright restrictions, robots/terms-of-service compliance, or safe handling of untrusted remote content. In an agentic workflow, this can lead to collection of protected or sensitive data and increases exposure to hostile webpages that may attempt prompt injection or trigger unsafe downstream processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file uses Chinese throughout for its title, instructions, and checklists, which effectively imposes a specific language on users. Under the stated policy, forcing a language without offering the user a language or locale choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file presents all operational instructions, safety rules, and validation criteria exclusively in Chinese. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file is entirely written as mandatory Chinese drafting guidance, including required output structure and wording conventions, with no indication that the user may choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The step file instructs the agent to execute a shell command (bash orchestrator.sh --complete s7 --next s8) even though this stage is a writing/analysis step, not an operational one requiring subprocess execution. Allowing instruction content to trigger shell execution increases the attack surface for command execution and workflow abuse, especially in agent systems where step files are treated as trusted automation directives.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The entire skill instruction set is written as a required Chinese-language workflow, and the output template also fixes Chinese section labels such as '交汇洞察', '分析', and '判断'. There is no indication that the user may choose another language or that the skill is intentionally limited to a Chinese-only regional/compliance context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The template title and all section headings are written in Chinese, which establishes a fixed output language for the skill. Under the language/locale policy, forcing a specific language without user choice or an explicit justified regional scope is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The header and manifest-facing comments describe "12 项质量自检", and the step instructions in s9 also require 12 checks, but run_self_check implements 6 automatic plus 10 manual checks for a total of 16. This is an active contradiction between the documented intent and the actual behavior of the script's self-check flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documented subprocess execution occurs without any user-facing notice that a shell command will be run. In agent environments, hidden or undisclosed execution reduces transparency and can normalize unsafe command invocation, making it easier for users or downstream systems to miss that the skill performs system-level actions.

Content

No source excerpt is available for this finding.