# firecrawl/firecrawl — AlpLab Radar Static Code Audit

- Ring: `adopt`
- Category: `dev`
- Overall score: `4.4/5`
- Implementation check: `verified`
- Maturity: `mature`
- Audited commit: `bdb4b8769a14` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-01T20:26:55Z
- Repository: https://github.com/firecrawl/firecrawl
- Radar entry: https://radar.alplab.co/#repo/firecrawl/firecrawl
- License: `AGPL-3.0`
- CI workflows: `.github/workflows`
- Tags: `web-scraping`, `crawling`, `markdown`, `agents`, `self-hosted`, `mcp`

## Summary

A mature web-scraping/crawling platform: a self-hostable Express 5 API server (apps/api) with Redis/RabbitMQ/NuQ-Postgres queues and a shared Rust core, a standalone Rust binary (apps/local) that scrapes/crawls/maps locally and serves the Firecrawl v2 API on localhost as MCP/server, plus SDKs in nine languages.

## Implementation Check

Every README claim I traced exists in working code: apps/local/src/serve.rs implements the documented localhost API (loopback bind, token + Host allowlist, FIRECRAWL_CLOUD modes matching apps/local/src/cloud.rs CloudMode), apps/api/src/routes/v2.ts implements the v2 scrape/crawl/map/search/parse routes SELF_HOST.md and docker-compose.yaml describe, and robots.txt respect is real in apps/api/src/lib/robots-txt.ts and apps/api/src/scraper/scrapeURL/index.ts.

## When to Use

Use it when you need websites as clean markdown or structured data for agents or apps — via the one-binary Firecrawl Local, the SDKs against Firecrawl Cloud, or a full self-hosted Compose/K8s stack. Not for Alexandria data providers, Agent, or Interact: those run only on Firecrawl Cloud, and the self-hosted server is a demanding multi-service stack that ships unauthenticated by default.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 5.0/5 |
| usability | 4.5/5 |
| reliability | 3.0/5 |
| security | 4.5/5 |
| integration | 5.0/5 |

## Code Evidence

Core pipeline is substantive: apps/api/src/scraper/scrapeURL/index.ts scrapeURL/scrapeURLLoop runs an engine waterfall with abort tiers, retry limits and robots.txt enforcement; apps/api/src/scraper/scrapeURL/engines/utils/safeFetch.ts getSecureDispatcher composes rejectPrivateIPLiteralTargets (private-IP/localhost refusal on every redirect hop) plus an agent.on('connect') socket remoteAddress check (DNS-rebinding defense); SSRF coverage continues in apps/playwright-service-ts/helpers/ssrf.ts (resolvePublicAddresses + pinnedLookup so the socket dials the checked address) and apps/local/src/guard.rs check_url/check_ip (metadata IPs 169.254.169.254 and 100.100.100.200 blocked in every mode, IPv4-mapped/NAT64 IPv6 unwrapped), with apps/local/src/netguard.rs forcing Chrome through a loopback SOCKS5 policy proxy for all subresources. Admin auth in apps/api/src/lib/admin-auth.ts uses crypto.timingSafeEqual with key redaction (redactAdminKey) and bounded metric labels; apps/local/src/serve.rs gate does constant-time token compare, Host allowlist, JSON-only bodies and refuses browser-origin forwards. Tests are real and colocated: Rust #[cfg(test)] modules in serve.rs/netguard.rs/guard.rs/cloud.rs/scrape.rs cover the security behaviors, vitest suites run in .github/workflows/test-api-core.yml (typecheck, lint, pnpm test:core) and .github/workflows/test-server.yml boots the actual self-hosted stack (SearXNG, Postgres, FoundationDB, Playwright) to run pnpm test:snips plus SSRF regression files. SDKs (apps/python-sdk/firecrawl/client.py Firecrawl/V2Proxy, apps/rust-sdk, apps/go-sdk with *_test.go files) match the documented API surface.

## Issues Found

apps/api defaults to an unauthenticated API when deployed with USE_DB_AUTHENTICATION=false (documented in SELF_HOST.md, but a real footgun if published without an auth design); the ADMIN_INTERNAL_PORT listener in apps/api/src/index.ts startAdminInternalServer serves queue UI and metrics with no key by design and must never be published; apps/playwright-service-ts/api.ts initializeBrowser launches Chromium with --no-sandbox (container-standard but weakens the browser service if run bare-metal).

## Key Risks

The full self-hosted server needs Redis, RabbitMQ, NuQ PostgreSQL and optionally FoundationDB per docker-compose.yaml — heavyweight for casual use, and SELF_HOST.md correctly warns the default API is unauthenticated with no persistent volumes defined. Cloud-only features (search index, Alexandria, Agent, Interact, structured JSON/summary formats locally) are not implementable from this repo alone; Firecrawl Local sends a random install ID header (apps/local/src/cloud.rs load_install_id) on cloud calls, documented but worth knowing. Lockfiles are per-app (apps/api/pnpm-lock.yaml, Cargo.lock) rather than at the root. Nothing was executed: all statements are from reading code, and CI outcomes were inferred from workflow definitions, not observed runs.

## Reviewed Files

- `README.md`
- `SELF_HOST.md`
- `apps/local/README.md`
- `docker-compose.yaml`
- `apps/api/package.json`
- `apps/api/.env.example`
- `apps/api/src/index.ts`
- `apps/api/src/harness.ts`
- `apps/api/src/routes/v2.ts`
- `apps/api/src/routes/shared.ts`
- `apps/api/src/lib/admin-auth.ts`
- `apps/api/src/lib/secret-compare.ts`
- `apps/api/src/lib/validateUrl.ts`
- `apps/api/src/lib/robots-txt.ts`
- `apps/api/src/scraper/scrapeURL/index.ts`
- `apps/api/src/scraper/scrapeURL/engines/utils/safeFetch.ts`
- `apps/playwright-service-ts/api.ts`
- `apps/playwright-service-ts/helpers/ssrf.ts`
- `apps/local/src/serve.rs`
- `apps/local/src/guard.rs`
- `apps/local/src/netguard.rs`
- `apps/local/src/cloud.rs`
- `apps/local/src/scrape.rs`
- `apps/python-sdk/firecrawl/client.py`
- `.github/workflows/test-api-core.yml`
- `.github/workflows/test-server.yml`
