Back to skill

Security audit

Gemini Deep Research (J-claw)

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its research purpose, but it runs mutable third-party code with broad local environment and file-write access that users should review before installing.

Review this skill before installing. Use it only if you are comfortable sending research topics and report parameters to Gemini, running the third-party gemini-deep-research extension locally, and saving reports on disk. Prefer pinning the extension to a reviewed version, disabling auto-update, restricting output to a dedicated reports folder, and avoiding sensitive topics or secrets unless your organization permits that data flow.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:34
Finding

Shell Command Injection Through Unescaped User-Controlled Arguments

Content
View full analysis
/scripts/dr-client.js \ --input "" \ --output "" \ --format "" \ --timeout 900000 ``` ### Technical Analysis The documented workflow places the user-controlled research topic and save path directly into a shell command enclosed only by double quotation marks. Double quotes do not provide a safe security boundary when the interpolated value itself contains a quotation mark, command substitution, or other shell syntax. If the sub-agent follows this instruction by constructing and executing a shell command string, an attacker can terminate the quoted argument and append additional commands. The JavaScript argument parser does not cause this vulnerability because shell parsing occurs before Node.js receives the arguments. For example, a malicious topic could be structured conceptually as: ```text legitimate topic"; attacker-command; # ``` The precise payload depends on the shell and execution environment. The unsafe construction also affects the user-controlled output path. ### Attack Path 1. An attacker supplies a malicious research topic or save path containing a closing quotation mark and shell metacharacters. 2. The Agent inserts the value into the command template described in `SKILL.md`. 3. A sub-agent or command-execution tool runs the resulting value through a shell. 4. The shell interprets the injected text as syntax rather than as a single argument. 5. The injected command executes with the same operating-system privileges and environment access as the Agent or sub-agent. Exploitation is conditional on the documented command being assembled as a shell command string. Passing arguments directly as an array without a shell would prevent this attack. ### Impact Assessment Successful exploitation could ...[truncated 629 chars]
Remediation
View remediation

T08 · Insecure Dependencies

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

Unpinned Third-Party Extension Installed With Automatic Updates

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

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 invoke code and interact with environment-dependent tooling, but it does not declare an explicit tool scope such as allowed-tools or permissions. That increases the chance of overbroad execution or unintended access because the runtime boundaries are not clearly constrained for a skill that spawns a sub-agent and runs a local Node script.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill sends the user's research topic to the Gemini API, but it does not provide a clear privacy notice before doing so. Users may include confidential business plans, personal data, or regulated information without realizing it will be transmitted to a third-party service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow writes research output to a local file by default, but the skill description does not clearly warn users of this behavior upfront. This can lead to unintended persistence of sensitive prompts, proprietary topics, or generated reports on disk, especially when a default path is used automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The code reads EXT_PATH/.env and merges its contents into the environment of the spawned MCP server, which is a sensitive operation because .env files commonly contain API keys or credentials. Although the script is a research client, there is no visible disclosure in the code comments or usage text that local secrets may be accessed and passed to another process.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The client accepts an arbitrary --output path, creates parent directories, and asks the MCP server to save a report there without constraining the destination or warning about overwrite/file-write side effects. In an agent skill context, this can be abused to write attacker-influenced content to unintended filesystem locations, especially if the agent can be induced to choose sensitive paths.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest description hard-codes both English and Chinese trigger phrases, but does not explain language selection, opt-in, or whether the skill is intended to operate bilingually by default. This can create a language/locale policy issue because activation behavior is tied to a specific language set without documented user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

Line L22 includes Chinese text ('free_tier够用') inside otherwise English instructions. This creates an implicit language inconsistency in user-facing guidance without opt-in, which can violate language/locale expectations for organizational documentation.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/dr-client.js:131