Back to skill

Security audit

Deep Research

Security checks for vulnerabilities and agentic risk

Overview

The skill is a legitimate research helper, but its standalone script gives Gemini broad unattended authority and has an unsafe background-mode command handling bug.

Install only if you are comfortable using Gemini CLI for research and reviewing the script first. Avoid background mode with untrusted or free-form task names, do not run the Docker fallback unless you explicitly want a local SearXNG container, and prefer configurations that keep tool approval interactive or tightly scoped.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/search.sh:199
Finding

Shell Command Injection Through Background Task Name

Content
View full analysis
"$OUTPUT_DIR/${TASK_NAME}.log" 2>&1 & ``` ### Technical Analysis The `--task-name` argument is accepted as unrestricted user-controlled text and appended to a timestamp. In background mode, this value is interpolated directly into dynamically generated Bash source code: ```bash TASK_NAME='$TASK_NAME' ``` Although the generated command is enclosed in double quotes at the outer level, the task name is placed inside a single-quoted assignment within the generated `bash -c` program. An embedded single quote can terminate that assignment and introduce arbitrary shell syntax. For example, a task name resembling the following can alter the generated command: ```text x'; touch /tmp/pwned; # ``` The later timestamp does not neutralize the payload. The semicolon introduces another command, while the comment marker can suppress the remainder of the generated shell line. The new Bash process then parses and executes the injected command. This issue is specifically reachable when `--background` is used because the foreground path invokes `run_research` directly without reconstructing its variables as shell source. ### Attack Path 1. An attacker influences the arguments used to invoke `search.sh`, includi ...[truncated 1260 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/search.sh:160
Finding

Gemini CLI Runs With Unrestricted Automatic Tool Approval

Content
View full analysis
/dev/null | tee "$OUTPUT_FILE"; then ``` ### Technical Analysis The script unconditionally starts Gemini CLI with: ```text --approval-mode yolo ``` This mode removes interactive approval requirements for tool actions. The legitimate purpose of the project is web research, which principally requires search and page-fetch capabilities; unrestricted automatic approval is broader than that purpose requires. The model processes both a user-controlled research prompt and untrusted content retrieved from external websites. Such content can include prompt-injection instructions designed to convince an agent to invoke local tools or perform actions unrelated to research. Without an approval boundary or a restrictive tool allowlist, a successful injection may cause an enabled tool to execute automatically. The actual actions available depend on the installed Gemini CLI version, its configuration, enabled extensions, sandbox settings, and the permissions of the invoking user. The project does not itself contain a malicious web payload, so this finding represents an unsafe privilege configuration rather than evidence of intentional malicious behavior. ### Attack Path 1. A user invokes the script for a research topic that leads Gemini to attacker-controlled or compromised web content. 2. The external page includes instructions crafted to target the agent rather than provide research data. 3. Gemini retrieves and processes the page content as part of the methodology defined in `SKILL.md`. 4. The model interprets the embedded instructions as actionable and attempts to invoke an available local or network tool. 5. Because ...[truncated 972 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (13)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · scripts/search.sh (reported line 40)May include surrounding context.

sh
Options:
  -n, --task-name     Task name (default: timestamp)
  -o, --output-dir    Output directory (default: ~/gemini-research/)
  -m, --model         Gemini model (default: gemini-2.5-pro)
      --timeout       Timeout in seconds (default: 600)
  -b, --background    Run in background
      --notify        Notification: auto | none (default: auto)

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · scripts/search.sh (reported line 49)May include surrounding context.

sh
Examples:
  search.sh -p "Latest developments in RISC-V consumer products 2026"
  search.sh -p "AI Agent 框架现状分析" -n "ai-agents" --background
  search.sh -p "Compare React vs Vue vs Svelte" -m gemini-2.5-flash
USAGE
    exit 0
}

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented trigger list includes very broad activators such as 'deep thinking' and especially 'deep learning', which commonly appear in ordinary user requests unrelated to this skill. In platforms that auto-route skills by trigger phrase, this can cause unintended invocation, unexpected web access, and delivery of a research workflow when the user intended a normal conversation or a machine-learning topic.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list contains broad phrases such as 'deep thinking' and 'deep learning,' which are likely to match unrelated user requests and cause unintended activation of the skill. Over-broad invocation increases the chance that the skill's riskier instructions, including out-of-scope fallback setup steps, are surfaced in inappropriate contexts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This web-research skill goes beyond passive search/fetch guidance and includes instructions to self-host SearXNG via Docker and invoke it with curl. That expands the skill's capability into system modification and external service setup, which can induce unintended command execution and infrastructure changes in environments where skills should remain informational only.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The skill instructs users or agents to run a Docker container using an unpinned image reference (docker run -d -p 8080:8080 searxng/searxng). Without a tag or digest, the image resolved at execution time can change unexpectedly or be replaced upstream, undermining reproducibility and creating a supply-chain risk if a compromised image is pulled.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/research-methodology.md (reported line 79)May include surrounding context.

md
- **Confirmation Bias**: Searching only for evidence that supports a hypothesis
- **Recency Bias**: Overweighting the latest news vs established fundamentals
- **Authority Bias**: Accepting claims from "experts" without verification
- **Survivorship Bias**: Focusing on successful cases while ignoring failures
- **Translation Errors**: Misinterpreting content in a non-native language

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script sends the full assembled prompt, including the user research query and the contents of SKILL.md, to the external gemini CLI without any explicit privacy warning or consent flow. If users include sensitive data in prompts or if SKILL.md contains internal instructions, that data may be transmitted to a third-party service unexpectedly.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/search.sh (reported line 205)May include surrounding context.

sh
# Execute
if [[ "$BACKGROUND" == true ]]; then
    log_info "Running in background..."
    nohup bash -c "$(declare -f run_research send_notification send_system_notification log_info log_ok log_warn log_error); \
        TASK_NAME='$TASK_NAME' MODEL='$MODEL' OUTPUT_FILE='$OUTPUT_FILE' TIMEOUT='$TIMEOUT' \
        NOTIFY='$NOTIFY' \
        FULL_PROMPT=$(printf '%q' "$FULL_PROMPT") \

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The usage section prescribes a fixed set of trigger phrases spanning English and Chinese, but does not explain whether users may choose their own language or whether locale-specific activation is required. This can create a language-policy concern because the documented invocation behavior is tied to specific languages without explicit opt-in or rationale.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill claims to enforce a tool-only boundary ('never launch a browser') but then provides command-based fallback paths that bypass that restriction through local service deployment and alternate fetch mechanisms. This inconsistency can normalize policy circumvention and make operators more likely to execute out-of-scope commands under the guise of complying with the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The guidance says to search in 'the language most likely to have expert content,' which encourages a language/locale shift without mentioning user preference or consent. This can conflict with organizational language-choice policies because the document does not offer an opt-in or note any user-controlled language selection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The script creates an output directory and writes report and PID files under the user's home directory, but there is no warning in the usage text or comments that running the skill will create persistent files. While the script later logs the output path, that disclosure happens after the write target is already established rather than as an upfront warning about filesystem side effects.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.