Back to skill

Security audit

Bright Data Best Practices

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent Bright Data scraping documentation, but its setup guidance includes unsafe remote and unpinned CLI execution patterns users should review before installing.

Install only if you are comfortable using Bright Data for web scraping and sharing requested URLs or search inputs with that service. Prefer pinned, reviewable CLI installation methods over curl-to-bash or unpinned npx, avoid hardcoding credentials in URLs or source files, and keep Bright Data API keys and browser passwords out of logs, prompts, and repositories.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/cli-setup.md:16
Finding

Remote Installer Piped Directly into Bash Without Integrity Verification

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/cli-setup.md:21
Finding

Unpinned Bright Data CLI Package Is Automatically Downloaded and Executed

Content
View full analysis
``` ``` ### Technical Analysis The command does not specify an exact version of `@brightdata/cli`. Consequently, package resolution can select a newer, mutable registry release that was not reviewed with this Skill. The `--yes` option suppresses the normal installation confirmation, reducing the opportunity for the user to inspect what will be downloaded and executed. An npm package can execute application code when the requested command starts and may also execute lifecycle scripts during installation, subject to the npm configuration in use. If the package publication account, package contents, dependency chain, or registry delivery path is compromised, invoking this instruction could execute malicious code locally. The scoped package name reduces ordinary name-confusion risk, but it does not mitigate compromise of the legitimate package, publisher account, release process, or transitive dependencies. ### Attack Path 1. An attacker compromises the package publisher, release pipeline, package registry account, or a dependency included by a future release. 2. A malicious version is published under the legitimate `@brightdata/cli` package name. 3. A user or AI agent runs the documented unversioned `npx` command. 4. npm resolves and downloads the current package version without an explicit confirmation because of `--yes`. 5. Package lifecycle code or the CLI entry point executes under the invoking user's account. 6. Malicious code can access resources available to that account and can install additional components. ### Impact Assessment Successful exploitation could result in arbitrary code execution with the invoking user's privileges. Exposed assets may include ...[truncated 538 chars]
Remediation
View remediation
``` Additional hardening should include: 1. Replace `X.Y.Z` only through a controlled dependency-update process. 2. Review package provenance, publisher identity, release signatures, and registry metadata before updating. 3. Use npm integrity metadata and a lockfile for repeatable project installations where practical. 4. Audit transitive dependencies and monitor the package for publisher or ownership changes. 5. Avoid `--yes` when interactive confirmation and inspection are feasible. 6. In CI, execute the package in an isolated, minimally privileged worker with only the credentials required for the specific task. 7. Prevent the CLI process from accessing unrelated secrets and sensitive filesystem paths. 8. Consider disabling lifecycle scripts during installation if the verified CLI supports operation under that restriction. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (88)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See **[references/browser-api.md](references/browser-api.md)** for complete reference including all CDP functions, bandwidth optimization, CAPTCHA patterns, and

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See **[references/browser-api.md](references/browser-api.md)** for complete reference including all CDP functions, bandwidth optimization, CAPTCHA patterns, and

External Script Fetching

High
Category
Supply Chain
Confidence
96% confidence
Finding

curl ... | bash executes a remote script directly with no integrity verification, pinning, or review step. If the hosting domain, network path, or served script is compromised, users could run arbitrary attacker-controlled code during setup.

Content

Scanner excerpt · references/cli-setup.md (reported line 14)May include surrounding context.

npm install -g @brightdata/cli

text

**Curl installer (macOS/Linux):**
```bash
curl -fsSL https://cli.brightdata.com/install.sh | bash

Chaining Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The | bash chain is the dangerous execution step that turns remote content retrieval into immediate code execution. In a skill intended for coding assistants and developers, this is more dangerous because it may be copied verbatim into automated or semi-automated workflows without scrutiny.

Content

Scanner excerpt · references/cli-setup.md (reported line 16)May include surrounding context.

Curl installer (macOS/Linux):

bash
curl -fsSL https://cli.brightdata.com/install.sh | bash

One-off (no install):

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/cli-setup.md (reported line 61)May include surrounding context.

md
The zones probe is the most reliable auth check: it requires valid credentials and returns quickly.

**Config file locations:**
- Linux: `~/.config/brightdata-cli/credentials.json`
- macOS: `~/Library/Application Support/brightdata-cli/credentials.json`
- Windows: `%APPDATA%\brightdata-cli\credentials.json`

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/cli-setup.md (reported line 62)May include surrounding context.

md
The zones probe is the most reliable auth check: it requires valid credentials and returns quickly.

**Config file locations:**
- Linux: `~/.config/brightdata-cli/credentials.json`
- macOS: `~/Library/Application Support/brightdata-cli/credentials.json`
- Windows: `%APPDATA%\brightdata-cli\credentials.json`

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/cli-setup.md (reported line 63)May include surrounding context.

md
The zones probe is the most reliable auth check: it requires valid credentials and returns quickly.

**Config file locations:**
- Linux: `~/.config/brightdata-cli/credentials.json`
- macOS: `~/Library/Application Support/brightdata-cli/credentials.json`
- Windows: `%APPDATA%\brightdata-cli\credentials.json`

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

python
# Submit
response = requests.post(
    "https://api.brightdata.com/request",
    params={"async": "1"},
    headers={"Authorization": f"Bearer {API_KEY}"},

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

python
# Sync (up to 20 URLs, returns immediately)
response = requests.post(
    "https://api.brightdata.com/datasets/v3/scrape",
    params={"dataset_id": "YOUR_DATASET_ID", "format": "json"},
    headers={"Authorization": f"Bearer {API_KEY}"},

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
import time

# Trigger
snapshot_id = requests.post(
    "https://api.brightdata.com/datasets/v3/trigger",
    params={"dataset_id": DATASET_ID, "format": "json"},
    headers={"Authorization": f"Bearer {API_KEY}"},

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file includes connection strings that embed ${AUTH} directly in WebSocket/HTTPS URLs, and later examples hardcode username:password values into those endpoints. While the file explains how to authenticate, it does not clearly warn readers that embedding credentials in URLs or source examples can expose secrets via logs, shell history, screenshots, or copied code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation demonstrates sending a base64-encoded client certificate and private key to Browser.addCertificate without any warning about secure key handling. In an assistant-driven coding workflow, users may copy this literally and embed private keys in code, repositories, prompts, logs, or telemetry, creating a realistic secret-exposure risk.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% 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/browser-api.md (reported line 322)May include surrounding context.

Security / Client Certificates

Browser.addCertificate

Install a client SSL/TLS certificate for authenticated domain access. Certificate is automatically removed when the session ends.

javascript
await client.send("Browser.addCertificate", {

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## REST API (Recommended)

**Endpoint:** `POST https://api.brightdata.com/request`

**Header:** `Authorization: Bearer YOUR_API_KEY`