Back to skill

Security audit

Init Kb

Security checks for vulnerabilities and agentic risk

Overview

The skill has a legitimate knowledge-base purpose, but it handles API keys and persistent agent files in ways users should review carefully before installing.

Review this skill before installing. It is not clearly malicious, but you should avoid pasting API keys into chat, prefer environment variables or a secret manager, keep .firecrawl out of version control, review any AGENTS.md changes before accepting them, and only scrape public URLs you are comfortable sending to Firecrawl and storing locally.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:139
Finding
Shell Command Injection Through Unsanitized User-Controlled Values<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 139-178 **Vulnerability Type**: Shell command injection through unsafe interpolation **Risk Level**: High ### Vulnerable Code ```bash curl -s -X POST "https://api.firecrawl.dev/v1/map" \ -H "Authorization: Bearer $FIRECRAWL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "<website-url>", "limit": 500}' \ -o .firecrawl/<project-slug>/map-result.json ``` ```bash curl -s -X POST "https://api.firecrawl.dev/v1/crawl" \ -H "Authorization: Bearer $FIRECRAWL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "<website-url>", "limit": <N>, "scrapeOptions": {"formats": ["markdown"]}}' \ -o .firecrawl/<project-slug>/crawl-job.json ``` ```bash curl -s -X POST "https://api.firecrawl.dev/v1/scrape" \ -H "Authorization: Bearer $FIRECRAWL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "<url>", "formats": ["markdown"]}' \ -o .firecrawl/<project-slug>/social/<platform>.json ``` ### Technical Analysis The skill instructs the agent to place user-provided URLs, project-derived slugs, page limits, and platform names directly into shell commands. It does not define validation, safe shell quoting, canonical path checks, or JSON serialization requirements. A URL containing a single quote can terminate the single-quoted JSON argument. Shell metacharacters appended after that point can introduce an additional command. The unquoted output paths create a second injection surface because shell metacharacters, substitutions, whitespace, or traversal sequences in a project slug or platform name can change command behavior or redirect output outside the intended cache directory. Although these examples are instructional templates rather than packaged executable scripts, agents following the skill are explicitly directed to execute the constructed commands. Therefore, unsafe interpolation can become command execution at runtime. ### Attack Path 1. An atta ...[truncated 1308 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not construct shell commands by interpolating user-controlled values. 2. Prefer a native HTTP client that accepts the URL, headers, request body, and output path as separate structured arguments. 3. If `curl` must be used, create JSON with a serializer such as: ```bash payload="$(jq -n --arg url "$website_url" --argjson limit "$limit" \ '{url: $url, limit: $limit}')" curl --data-binary "$payload" ... ``` 4. Normalize project and platform identifiers to a strict allowlist, such as `^[A-Za-z0-9_-]+$`. 5. Parse page limits as bounded integers rather than inserting arbitrary text. 6. Resolve and canonicalize every output path, then verify that it remains under the expected `.firecrawl/` directory. 7. Quote every filesystem path passed to the shell. 8. Reject URLs containing unsupported schemes and allow only `https://` or explicitly approved `http://` destinations. 9. Add tests with quotes, command substitutions, semicolons, newlines, whitespace, and traversal sequences. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:88
Finding
Firecrawl API Key Exposed Through Chat and Plaintext Workspace Storage<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 88-102 **Vulnerability Type**: Insecure secret collection and storage **Risk Level**: Medium ### Vulnerable Code ```text Option 3 — Just paste it here: Paste your key directly in this chat and I'll save it to .firecrawl/api-key.txt. Only do this if you're the only one with access to your server and Discord channel. Never paste API keys in shared or public channels. After they paste the key, save it to `.firecrawl/api-key.txt` and confirm: "Got it. Key saved." ``` The storage guidance is reinforced later in the file: ```text - API key stored in `.firecrawl/api-key.txt` ``` ### Technical Analysis The skill explicitly asks users to transmit an API credential through a chat interface and then stores that credential in a plaintext file. It does not require restrictive file permissions, encryption, secret-manager integration, exclusion from version control, retention limits, or redaction from logs and transcripts. Advising users to paste the key only in a private channel reduces exposure but does not eliminate it. Chat transcripts may be retained by the service, included in diagnostic logs, viewed by workspace administrators, or exported. The workspace file may be readable by other local processes and can be committed or included in backups accidentally. ### Attack Path 1. The user follows the onboarding instructions and pastes a Firecrawl API key into chat. 2. The key becomes part of the retained conversation or associated logs. 3. The agent writes the same key to `.firecrawl/api-key.txt` as plaintext. 4. Another user, process, backup operator, repository collaborator, or compromised tool gains access to the transcript or workspace. 5. The exposed credential is used to make Firecrawl API requests under the victim's account. ### Impact Assessment An exposed key can allow unauthorized consumption of Firecrawl API credits and access to capabilities authorized for that credential. It may ...[truncated 355 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all instructions asking users to paste API keys into chat. 2. Instruct users to configure the credential through a local secret manager or environment variable outside the conversation. 3. Prefer platform-native secret storage where available. 4. If file-based fallback storage is unavoidable: - Create the file with mode `0600`. - Verify that the parent directory is not shared. - Add `.firecrawl/` to `.gitignore`. - Prevent the file from being included in diagnostics and backups where practical. 5. Never print, echo, summarize, or return the key after receipt. 6. Add credential-pattern redaction to logs and generated output. 7. Document key rotation and revocation procedures. 8. Warn users to rotate any credential previously pasted into chat or committed to a repository. ]]>

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:182
Finding
Persistent Agent Memory Poisoning Through Untrusted Scraped Content<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 182-183 and 472-498 **Vulnerability Type**: Persistent prompt injection and memory poisoning **Risk Level**: High ### Vulnerable Code The skill directs the agent to treat all remote content as analysis input: ```text Read through every scraped page and social profile. Build a complete mental model of the business. Do not skim. Do not sample. Read it all. ``` It subsequently directs the agent to persist generated knowledge and integrate it with future agent operation: ```text ### Phase 7: Integration After generating all files, do this automatically: 1. Check if an AGENTS.md file exists in the workspace root. 2. If AGENTS.md exists, append this KB section (CRITICAL: on-demand loading only, never auto-load at boot): ```markdown ## Knowledge Base: <project-name> **When working on <project-name> content**, read these files in order: 1. KNOWLEDGE BASE/<project-name>/PERSONA.md 2. KNOWLEDGE BASE/<project-name>/CONTEXT.md 3. KNOWLEDGE BASE/<project-name>/VOICE.md 4. KNOWLEDGE BASE/<project-name>/GUARDRAILS.md 5. KNOWLEDGE BASE/<project-name>/BUSINESS-INTEL.md Read USER.md, SITEMAP.md, and OPPORTUNITIES.md only on demand when needed. **Do not load on every session** — context bloat kills productivity. ``` ``` ### Technical Analysis Websites and social profiles are attacker-influenceable inputs. They may contain text designed to look like instructions to an AI agent, including directives to disregard existing rules, disclose secrets, alter generated persona files, or insert new operational instructions. The skill requires the agent to read every scraped source but does not explicitly require it to: - Treat remote text solely as untrusted data. - Ignore instructions embedded in scraped content. - Separate quoted source material from executable agent instructions. - Track provenance for generated behavioral rules. - Detect prompt-injection patterns. - Prevent remotely sourced text from en ...[truncated 2224 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add an explicit trust-boundary rule stating that all scraped pages, profiles, and documents are untrusted data, never authoritative agent instructions. 2. Require the agent to ignore any remote text that asks it to change goals, reveal data, execute tools, modify files, or override higher-level instructions. 3. Keep source content in clearly delimited data blocks and do not copy it directly into instruction-bearing files. 4. Record provenance for every derived fact and behavioral rule, including its source URL. 5. Scan fetched content for prompt-injection indicators before analysis. 6. Prevent remotely derived content from modifying `PERSONA.md`, `GUARDRAILS.md`, `AGENTS.md`, or `CLAUDE.md` without explicit, itemized user approval. 7. Present a source-attributed diff of all proposed persistent instructions before writing them. 8. Restrict automatic integration to factual reference files. Require manual approval for files that govern agent behavior. 9. Sanitize generated Markdown to prevent hidden instructions in comments, links, encoded blocks, or misleading quoted sections. 10. Provide a rollback mechanism and preserve a known-good version of all knowledge-base and agent instruction files. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (20)

Ssd 3

High
Confidence
99% confidence
Finding
Accepting API keys via chat and then storing them for future reuse creates a natural-language secret collection and retention channel. Secrets pasted into chat may be logged, retained by platforms, exposed to workspace participants, or later surfaced in model context, making compromise more likely.

Hidden Instructions

High
Category
Prompt Injection
Content
1. **One question per message.** Never stack multiple questions. People freeze when they see three at once.
2. **Show before ask.** If Firecrawl pulled data, show what you found and ask to confirm before asking more questions.
3. **Progress tracking.** After each phase, tell the user where they are: "That's the personal stuff done. 2 of 4 sections complete. Next up: your business."
4. **Skip-friendly.** If someone says "I don't know" or "skip", mark it as `<!-- TODO: fill in later -->` in the output and move on. Never pressure.
5. **Accept file imports.** If the user drops a brand guide, doc path, or existing content, read it and extract relevant info instead of asking questions the doc already answers.
6. **No em dashes.** Never use them in generated files or responses. Use commas, periods, or restructure.
7. **Concise output.** Each file should be scannable. No novels. Strong opinions over vague guidelines. Actionable rules, not suggestions.
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Content
.zshrc with .bashrc

Then paste your key here and I'll also save it to .firecrawl/api-key.txt as a backup.
```

**If VPS/server:**

Three ways to add it:

**Option 1 — Hostinger (GUI):**
```
Log into Hostinger, go to Catalogue, click Manage on your VPS, scroll down to Environment Variables, and add:
  Key: FIRECRAWL_API_KEY
  Value: your-key-here
```

**Option 2 — Any VPS via terminal:**
```
echo 'export FIRECRAWL_API_KEY=your-key-here' >> ~/.bashrc && source ~/.bashrc
```
(Replace .bashrc with .zshrc if you use zsh.)

**Option 3 — Just paste it here:**
Paste your key directly in this chat and I'll save it to .firecrawl/api-key.txt. Only do this if you're the only one with access to your server and Discord channel. Never paste API keys in shared or public channels.

After they paste the key, save it to `.firecrawl/api-key.txt` and confirm: "Got it. Key saved."

Then proceed:

**Question 1:** "What's the project or business name? This becomes the folder name."

**Question 2:** "G
Confidence
75% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Ssd 3

High
Confidence
99% confidence
Finding
The skill explicitly encourages users to paste an API key directly into chat and promises to save it to disk. Even with a warning about shared channels, this normalizes insecure secret handling and materially increases the chance of credential leakage through logs, transcripts, screenshots, or retained context.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The trigger phrases are broad and common enough that the skill could activate unintentionally during ordinary conversation. Unintended activation is risky here because the skill initiates website scraping, credential handling, and file-writing workflows that can persist data or send content to external services.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The standalone trigger list includes ambiguous phrases like "new kb" and "set up kb" without scope boundaries or disambiguation. In this skill's context, accidental triggering can lead to collection of URLs, prompts for API keys, persistence of secrets, and external transmission to Firecrawl.

Session Persistence

Medium
Category
Rogue Agent
Content
## Triggers

**Init triggers:** "init kb", "build kb", "create kb for X", "set up kb", "new kb"

**Update triggers:** "update kb", "refresh kb", "re-scrape kb", "kb update"
Confidence
84% confidence
Finding
The update flow and trigger design encourage persistent state across sessions by reusing stored KBs, caches, and credentials based on broad trigger phrases. Session persistence becomes risky here because stored data includes scraped content and an API key, so unintended invocation can operate on previously retained sensitive state.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill directs the agent to save a user-provided API key to disk for future reuse, but does not provide a strong default warning about local secret storage risks, file permissions, rotation, or multi-user exposure. This creates a durable credential at rest that may be readable by other users, processes, backups, or future agents in the workspace.

External Transmission

Medium
Category
Data Exfiltration
Content
#### Stage 1: Discover URLs (Map API)

```bash
curl -s -X POST "https://api.firecrawl.dev/v1/map" \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "<website-url>", "limit": 500}' \
Confidence
90% confidence
Finding
This step sends user-supplied website data to an external third-party service, Firecrawl. External transmission is expected for a scraping skill, but it remains security-relevant because it may expose internal, sensitive, or mistaken URLs to a vendor and initiate paid operations.

External Transmission

Medium
Category
Data Exfiltration
Content
#### Stage 1: Discover URLs (Map API)

```bash
curl -s -X POST "https://api.firecrawl.dev/v1/map" \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "<website-url>", "limit": 500}' \
Confidence
90% confidence
Finding
This step sends user-supplied website data to an external third-party service, Firecrawl. External transmission is expected for a scraping skill, but it remains security-relevant because it may expose internal, sensitive, or mistaken URLs to a vendor and initiate paid operations.

External Transmission

Medium
Category
Data Exfiltration
Content
#### Stage 2: Crawl Full Site (Crawl API)

```bash
curl -s -X POST "https://api.firecrawl.dev/v1/crawl" \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "<website-url>", "limit": <N>, "scrapeOptions": {"formats": ["markdown"]}}' \
Confidence
90% confidence
Finding
The crawl stage transmits a target URL and instructs the third-party service to fetch up to N pages, potentially including sensitive or unintended content if the URL scope is wrong. Because this also incurs ongoing asynchronous processing and storage of crawl results, unintended scope can amplify privacy and data-exposure risk.

External Transmission

Medium
Category
Data Exfiltration
Content
This returns a job ID. Poll for completion:
```bash
curl -s -X GET "https://api.firecrawl.dev/v1/crawl/<job-id>" \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -o .firecrawl/<project-slug>/crawl-raw.json
```
Confidence
86% confidence
Finding
Polling the external crawl job continues the data exchange with the third-party service and retrieves potentially large result sets for local storage. While operationally necessary, it compounds the privacy and retention footprint of the scraping process.

External Transmission

Medium
Category
Data Exfiltration
Content
For each social profile and important link, scrape individually:
```bash
curl -s -X POST "https://api.firecrawl.dev/v1/scrape" \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "<url>", "formats": ["markdown"]}' \
Confidence
94% confidence
Finding
The scrape stage sends arbitrary user-provided social or supplementary URLs to Firecrawl. Without URL validation, this could be used to transmit private links, internal documentation URLs, or otherwise sensitive resources to a third party.

External Transmission

Medium
Category
Data Exfiltration
Content
## Firecrawl REST API Reference

All scraping uses the Firecrawl REST API (`https://api.firecrawl.dev/v1/`). The API key is passed via the `Authorization: Bearer` header.

| Endpoint | Method | What it does | Cost |
|----------|--------|-------------|------|
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest says the skill generates 9 structured KB files, but this walkthrough repeatedly describes the result as 7 structured markdown files and enumerates only those 7 outputs. This is a clear description-level mismatch about the skill's core behavior and deliverables.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The walkthrough describes scraping websites and social profiles and building persistent knowledge-base files, but it does not clearly warn users that third-party content and profile data may be collected, stored locally, and reused later. This creates privacy and compliance risk because users may provide targets or accept scraping without understanding retention, sensitivity, or ownership implications.

Vague Triggers

Medium
Confidence
94% confidence
Finding
Broad trigger phrases like 'build kb' or 'set up kb' create an ambiguous invocation boundary, increasing the chance the skill activates unintentionally during ordinary conversation. In this skill, unintended activation is more dangerous because it can lead to scraping external sites, collecting profile data, prompting for API keys, and persisting data to disk.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill states that it may ask for a Firecrawl API key and save it for next time, but gives no security warning about local secret storage, access controls, or safer alternatives. Persisting API credentials without clear disclosure or protection guidance can expose the key to other local users, tools, repositories, backups, or accidental commits.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The manifest states KB files load on-demand and explicitly not at boot to avoid context bloat, but the walkthrough says the OpenClaw config snippet adds a boot sequence so agents load the KB at session start. This is an active contradiction in stated intent about how the generated KB should be consumed.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documented storage layout persists scraped pages, social profile content, crawl caches, and related metadata to local disk without an explicit warning that this data will remain after the session. That increases the risk of unintentionally retaining personal data, copyrighted content, or sensitive business information in workspaces, backups, and shared environments.

Static analysis

No suspicious patterns detected.