Skip to content

Harden launch server: bind 127.0.0.1 only + validate scan targets #20

Description

@jaurakunal

Context

Two CodeQL alerts were dismissed as by-design because isitsecure is a local, user-directed CLI — the operator supplies both the scan target URL and the repo path, so there is no trust boundary crossed:

  • py/full-ssrf in engine/shared/rate_limited_client.py — the DAST HTTP client requests the user's own target URL; that's its core function.
  • py/path-injection in engine/code_analysis/repo_ingestion.py — the path comes from the user's own --repo argument.

The one scenario where they would matter

Both become real if the launch server is ever bound beyond localhost or run multi-user, letting a remote party direct scans at arbitrary internal hosts/paths.

Defense-in-depth to add

  • Bind the launch server to 127.0.0.1 by default; require an explicit opt-in flag to bind any other interface.
  • When a scan is triggered over HTTP (not the CLI), validate targets: reject link-local / metadata (169.254.0.0/16), loopback-to-internal pivots, and non-file:// local paths outside an allowed root.
  • Document the local-only threat model in the README/SECURITY.md.

Not a blocker for single-user local use (the supported mode today); tracked so the dismissals stay honest.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    roadmapLarger direction / not a quick fix

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions