Back to skill

Security audit

Brave Api Setup

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but it handles a live Brave API key in ways that can expose or persist the credential without strong user controls.

Review this carefully before installing. It is intended to configure Brave Search for OpenClaw, but it asks an agent to reveal and handle your API key. Prefer using a flow that takes the key through a protected secret input or stdin-only path, avoid putting the key in shell commands, and rotate the key if it may have appeared in logs, transcripts, or process monitoring.

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

Warning
Location
scripts/apply-api-key.js:45
Finding

Brave API Key Exposed Through Process Command-Line Arguments

Content
View full analysis
/scripts/apply-api-key.js "" ``` `scripts/apply-api-key.js:4-7`: ```javascript * Usage: * node apply-api-key.js * echo "BSA9..." | node apply-api-key.js --stdin ``` `scripts/apply-api-key.js:45`: ```javascript const args = process.argv.slice(2); ``` `scripts/apply-api-key.js:64-65`: ```javascript } else if (args[0]) { applyApiKey(args[0]); ``` ### Technical Analysis The documented default workflow passes the Brave API key as a positional command-line argument. The script then retrieves that credential from `process.argv`. Command-line arguments are not an appropriate secret-transfer mechanism. Depending on the host and execution environment, they may be observable through process inspection facilities, command auditing, shell history, Agent execution transcripts, monitoring software, or centralized logs. The secret must also be inserted into an Agent-generated command, contradicting the documentation's assertion that it does not pass through LLM text generation. Although the script supports standard-input ingestion through `--stdin`, the Skill documentation recommends the less secure positional-argument form, and the implementation continues to accept it. ### Attack Path 1. A user invokes the Skill while authenticated to the Brave Search API dashboard. 2. The Skill reveals and extracts the user's Brave API key. 3. Following the documented workflow, the Agent constructs a command containing the complete key as a positional argument. 4. The command is executed, placing the key in the process argument vector. 5. A local user, process-monitoring service, command-auditing system, transcript reader, or log collector with access to that data observes and records the ...[truncated 825 chars]
Remediation
View remediation
data += chunk); process.stdin.on('end', () => applyApiKey(data.trim())); ``` The calling workflow should use a protected stdin or secret-injection facility that does not embed the credential in shell source, shell history, environment-variable listings, or Agent-visible command text. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs the agent to reveal a user's Brave API key from the dashboard, extract it via browser JavaScript, and reuse it in local configuration. This creates a direct secret-handling risk: the agent is accessing a credential from a user account page, transforming it, and persisting it, which can expose the key through tool outputs, logs, snapshots, or misuse by a compromised or over-privileged agent workflow.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest trigger list includes "search API", which is not specific to Brave Search or OpenClaw configuration. Because it lacks context or exclusions, it could overlap with unrelated discussions about search APIs and cause unintended skill activation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill walks the agent through revealing, extracting, and applying a live API key without clear warnings about handling sensitive credentials or obtaining explicit user consent before modifying configuration. Even if intended for setup, this normalizes secret exposure in the browser context and increases the chance of accidental leakage, logging, or unauthorized persistence of credentials.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The feedback section switches to Korean for user-facing instructions, which can impose a language preference without opt-in. Under the language policy, user-facing natural language should not force a specific language unless the locale constraint is explicit and justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.