Back to skill

Security audit

ScrapingBee CLI

Security checks for vulnerabilities and agentic risk

Overview

The skill coherently documents ScrapingBee web-retrieval tools, with disclosed credential storage and user-controlled automation that warrant normal privacy and cost precautions.

Use public or approved inputs: ScrapingBee receives submitted URLs, queries, prompts, and any supplied cookies or headers. Protect the stored API key, bound crawl size and spending, and request recurring jobs or shell hooks deliberately. The external CLI code was not included, and the missing optional pipeline-agent file should be reviewed before copying any replacement into your project.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied chunk performs a standalone authentication-state change that is not described in the declared purpose. It contains no fetching, searching, crawling, or extraction behavior. Unlike authentication used to support a retrieval request, this command explicitly ends authentication.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The supplied command performs local agent installation rather than web retrieval or extraction. Writing an agent definition into .claude/agents/ is a configuration change not disclosed by the declared purpose, rather than merely an internal detail of fetching a webpage. The copied file's contents are not provided, so no further behavior can be established.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Install / first-time setup | — | [rules/install.md](rules/install.md) |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Security (API key, credits, output) | — | [rules/security.md](rules/security.md) |

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 · reference/auth/overview.md (reported line 25)May include surrounding context.

md
**2. Environment:** `export SCRAPINGBEE_API_KEY=your_key`

**3. .env file:** `SCRAPINGBEE_API_KEY=your_key` in cwd or `~/.config/scrapingbee-cli/.env`. Cwd loaded first; env not overwritten.

**Resolution order** (which key is used): env → `.env` in cwd → `.env` in `~/.config/scrapingbee-cli/.env` (stored by `scrapingbee auth`). Existing env is not overwritten by .env (setdefault).

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 · reference/auth/overview.md (reported line 27)May include surrounding context.

md
**3. .env file:** `SCRAPINGBEE_API_KEY=your_key` in cwd or `~/.config/scrapingbee-cli/.env`. Cwd loaded first; env not overwritten.

**Resolution order** (which key is used): env → `.env` in cwd → `.env` in `~/.config/scrapingbee-cli/.env` (stored by `scrapingbee auth`). Existing env is not overwritten by .env (setdefault).

## Remove stored key

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 · rules/install.md (reported line 34)May include surrounding context.

md
**Resolution order** (where the CLI gets the API key):

1. **Environment** – `SCRAPINGBEE_API_KEY` in the shell.
2. **.env in current directory** – `SCRAPINGBEE_API_KEY` in a `.env` file in the project/cwd.
3. **.env in config** – `~/.config/scrapingbee-cli/.env`. `scrapingbee auth` writes the key to this file only (not to project `.env`). Load order: env wins, then cwd `.env`, then that file (load_dotenv uses setdefault).

**Store API key (recommended):**

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 · rules/install.md (reported line 35)May include surrounding context.

md
1. **Environment** – `SCRAPINGBEE_API_KEY` in the shell.
2. **.env in current directory** – `SCRAPINGBEE_API_KEY` in a `.env` file in the project/cwd.
3. **.env in config** – `~/.config/scrapingbee-cli/.env`. `scrapingbee auth` writes the key to this file only (not to project `.env`). Load order: env wins, then cwd `.env`, then that file (load_dotenv uses setdefault).

**Store API key (recommended):**

Broad routing through ScrapingBee lacks a privacy warning about transmitting requested URLs and queries to a third party.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The blanket instruction to route any real web page through ScrapingBee does not distinguish public URLs from private or token-bearing URLs. An agent following it could disclose sensitive URL paths, query parameters, or search terms to a third party without informed authorization.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% 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 · SKILL.md (reported line 28)May include surrounding context.

md
## Execution path: CLI by default

Prefer the **CLI**. It is the only path that can write to disk, process many URLs, crawl a site,
schedule a recurring job, or keep a large page out of your context window.

| Need | CLI | MCP |
|------|-----|-----|

Prompt-submission instructions omit a confidentiality warning.

Medium
Category
Output Handling
Confidence
87% confidence
Finding

This file instructs the agent to send prompts to the ScrapingBee ChatGPT endpoint and provides commands for doing so. Although it names the destination, it does not warn that including user conversation content or private task context discloses that information to an external service.

Content

No source excerpt is available for this finding.

Gemini prompt-submission instructions omit a confidentiality warning.

Medium
Category
Output Handling
Confidence
87% confidence
Finding

The file instructs the agent to send prompts to the ScrapingBee Gemini endpoint, including through a documented batch workflow. It does not warn that user information incorporated into those prompts is transmitted to an external service or advise against sending confidential context without approval.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
85% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · reference/scrape/js-scenario.md (reported line 22)May include surrounding context.

md
| wait_for | selector | Wait until element appears. |
| wait_for_and_click | selector | Wait then click. |
| scroll_x / scroll_y | px | Scroll. |
| fill | [selector, value] | Fill input. |
| evaluate | JS code | Run JS; result in evaluate_results when json_response true. |
| infinite_scroll | object | max_count, delay, optional end_click. **Not with stealth proxy.** |

The browser-action example accepts cookies without warning that this can change the site's privacy-consent state.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The example performs a click on #accept-cookies, rather than merely listing the click capability. Following it can grant cookie consent in the browsing session, but the document does not warn about that privacy effect or distinguish consent actions from ordinary navigation.

Content

No source excerpt is available for this finding.

The instruction to route all real web pages through ScrapingBee lacks a third-party data-disclosure warning.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The unconditional preference for ScrapingBee applies even when a page URL contains confidential identifiers or access tokens. Without a sensitivity check or informed authorization, this routing policy can disclose private request information to the scraping provider.

Content

No source excerpt is available for this finding.