spectrawl icon indicating copy to clipboard operation
spectrawl copied to clipboard

Server hardening request: auth guard + safer CORS defaults for /search, /browse, /act

Open DeadlySilent opened this issue 8 months ago • 0 comments

Thanks for the project — we tested in a local docker sandbox and found security defaults that are risky if exposed beyond localhost.

Observed

  • src/server.js sets:
    • Access-Control-Allow-Origin: *
  • No built-in auth token/API key gate for HTTP endpoints.

Risk

If user accidentally binds publicly, endpoints can be abused (especially /act).

Request

Please add:

  1. Optional required auth token mode (e.g. SPECTRAWL_SERVER_TOKEN)
  2. Safer CORS defaults:
    • default localhost-only origin policy
    • explicit allowlist config for non-local deployments
  3. Startup warning when binding non-local without auth enabled

Environment

  • spectrawl v0.3.20
  • tested via localhost docker mapping (127.0.0.1:43900->3900)

DeadlySilent avatar Mar 10 '26 21:03 DeadlySilent