Back to skill

Security audit

Deep Research via Gemini CLI Extension

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it relies on auto-updating third-party code and detached background jobs that can access local files and Google research data with limited containment.

Install only if you are comfortable running a third-party Gemini extension that can auto-update and execute locally with your user permissions. Pin and review the extension version, disable auto-update, avoid sensitive research topics, choose a dedicated report directory, and avoid using this on shared machines until task files and output paths are better constrained.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

T08 · Insecure Dependencies

Error
Location
references/setup-guide.md:24
Finding

Unpinned Auto-Updating Third-Party Extension Is Executed with the Agent's Permissions

Content
View full analysis
{ const server = spawn('node', ['dist/index.js'], { cwd: EXT_PATH, stdio: ['pipe', 'pipe', 'pipe'] }); ``` The same execution pattern is present in `scripts/poll-research.js:31-35` and `scripts/save-report.js:21-25`. ### Technical Analysis The setup procedure installs executable code directly from a mutable GitHub repository. It does not select an immutable commit or verified release and does not verify a checksum or cryptographic signature. The `--auto-update` option further permits the installed code to change after the Skill itself has been aud ...[truncated 2096 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/dr-client.js:270
Finding

Unrestricted Report Paths Permit Arbitrary User-Level File Writes

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:56
Finding

Predictable Shared Temporary Directories Expose Mutable Task Control Data

Content
View full analysis
_/ ``` Write `task.json`: ```json { "input": "研究主题", "format": "Comprehensive Research Report", "outputPath": "/home/node/ObsidianVault/Default/DeepResearch/-.md", "pollIntervalSeconds": 300, "maxPolls": 8, "createdAt": "" } ``` ``` `scripts/start-research.js:45-46`: ```js const taskFile = join(TASK_DIR, 'task.json'); const task = JSON.parse(readFileSync(taskFile, 'utf8')); ``` `scripts/start-research.js:65-69`: ```js task.researchId = researchId; task.startedAt = new Date().toISOString(); task.status = 'in_progress'; writeFileSync(taskFile, JSON.stringify(task, null, 2)); ``` `scripts/poll-research.js:57-60`: ```js const taskFile = join(TASK_DIR, 'task.json'); const task = JSON.parse(readFileSync(taskFile, 'utf8')); if (!task.researchId) throw new Error('No researchId in task.json — run start-research.js first'); ``` `scripts/poll-research.js:99-110`: ```js // Save progress task.pollCount = poll; task.lastPoll = new Date().toISOString(); writeFileSync(taskFile, JSON.stringify(task, null, 2)); if (poll < MAX_POLLS) { log(`Still in_progress. Sleeping ${INTERVAL}s...`); await new Promise(r => setTimeout(r, INTERVAL * 1000)); } log('TIMEOUT after ' + MAX_POLLS + ' polls'); task.status = 'timeout'; writeFileSync(taskFile, JSON.stringify(task, null, 2)); ``` `scripts/save-report.js:46-50`: ```js const taskFile = join(TASK_DIR, 'task.json'); const task = JSON.parse(readFileSync(taskFile, 'utf8')); if (!task.researchId) throw new Error('No researchId'); if (!t ...[truncated 2594 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill is presented as a research workflow, but it also writes arbitrary local files, reads task metadata from disk, spawns local Node processes, and persists a background polling process. This mismatch hides materially sensitive behavior from reviewers and users, making data exfiltration, unintended local writes, and unsafe execution patterns easier to smuggle into normal usage.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/dr-client.js (reported line 103)May include surrounding context.

js
});
}

// ─── Load .env for MCP server ───────────────────────────────────────────────

function loadEnv(envPath) {
  const env = {};

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/dr-client.js (reported line 122)May include surrounding context.

js
return env;
}

const envPath = join(EXT_PATH, '.env');
const extEnv = loadEnv(envPath);

// ─── Spawn MCP Server ─────────────────────────────────────────────────────────

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill instructs the agent to create files, run Node scripts, launch background jobs, and rely on environment-based API configuration, yet it declares no explicit tool scope or permission boundaries. This increases the chance of unintended code execution or file access because operators and users are not clearly informed what capabilities the skill requires.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include broad patterns like 'research X thoroughly' and multilingual variants that can match ordinary user requests. This can cause the skill to activate unexpectedly and send sensitive prompts to an external service or create background tasks when the user did not intend to invoke this higher-risk workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill omits a clear warning that user-provided research topics are transmitted to an external Google service and that resulting content is automatically written to local disk. This undermines informed consent and can expose confidential, regulated, or proprietary information through unexpected third-party sharing and persistent local storage.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Line 36 says to write in the user's current session language, but the provided confirmation template is entirely in Chinese, and later success/timeout/failure notification templates are also fixed in Chinese. This creates a language-policy inconsistency by effectively forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The documented workflow explicitly includes launching a background process, indicating session persistence as a design feature rather than an incidental behavior. In this context, persistence is risky because the task continues operating on local files and external services outside the normal interactive approval flow.

Content

Scanner excerpt · SKILL.md (reported line 118)May include surrounding context.

fi

text

### Step 5 — Launch Background Process

```bash
cd /tmp/gemini-deep-research/<task-dir>/

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

Using 'nohup ... &' launches a detached background process that persists beyond the active session and continues polling and potentially saving data without ongoing user visibility. Persistence materially raises risk because it allows continued external service interaction and local file writes after the initiating context has ended.

Content

Scanner excerpt · SKILL.md (reported line 122)May include surrounding context.

bash
cd /tmp/gemini-deep-research/<task-dir>/
nohup bash poll.sh > /dev/null 2>&1 &
echo "Background PID: $!"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The notify-user, success, timeout, and failure messages are written in Chinese, even though the workflow earlier instructs the agent to use the user's current session language. Hard-coding these messages in one language can violate language/locale policy for users in other locales.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code spawns a separate Node process to run dist/index.js, which is a safety-relevant operation under the code-file warning criteria. Although the file header explains the script polls research status, it does not explicitly disclose that it will execute another local program, and there is no confirmation prompt beyond internal logging.

Content

No source excerpt is available for this finding.