fix(dast): robots.txt is an Info finding only when it names reachable sensitive paths #1005

Merged
sharang merged 1 commits from fix/dast-robots-txt into main 2026-11-16 08:16:52 +00:00
Owner

Part of #997 (point 4).

Problem: the API fuzzer reported every robots.txt as a Medium "sensitive resource that should not be publicly accessible", including Disallow: /. A robots.txt is public by design.

Change:

  • robots.txt leaves the list of paths that should not be public.
  • A separate check reads its Disallow lines and keeps the literal paths that look sensitive (admin, backup, config, debug, .git, .env, ...). Patterns and Disallow: / name no single resource, so they are skipped.
  • Each such path counts as reachable only when it answers with its own content. What the site sends for a made-up path (a single-page app's catch-all, a login page) does not count.
  • Reachable paths make one Info finding (CWE-200) that lists them.

Tests:

  • unit: which Disallow lines count;
  • compliance-dast/tests/robots.rs against a fake site: a reachable /admin gives one Info finding, a single-page app's catch-all gives none, and Disallow: / gives none.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9

Part of #997 (point 4). **Problem:** the API fuzzer reported every robots.txt as a Medium "sensitive resource that should not be publicly accessible", including `Disallow: /`. A robots.txt is public by design. **Change:** - robots.txt leaves the list of paths that should not be public. - A separate check reads its `Disallow` lines and keeps the literal paths that look sensitive (admin, backup, config, debug, .git, .env, ...). Patterns and `Disallow: /` name no single resource, so they are skipped. - Each such path counts as reachable only when it answers with its own content. What the site sends for a made-up path (a single-page app's catch-all, a login page) does not count. - Reachable paths make one Info finding (CWE-200) that lists them. **Tests:** - unit: which `Disallow` lines count; - `compliance-dast/tests/robots.rs` against a fake site: a reachable `/admin` gives one Info finding, a single-page app's catch-all gives none, and `Disallow: /` gives none. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang added 1 commit 2026-11-16 02:32:49 +00:00
fix(dast): robots.txt is an Info finding only when it names reachable sensitive paths
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 6m4s
CI / Check (pull_request) Successful in 20m33s
55409eb930
The API fuzzer reported every robots.txt as a Medium "sensitive resource
that should not be publicly accessible", including `Disallow: /`. A
robots.txt is public by design.

- robots.txt leaves the list of paths that should not be public.
- A separate check reads its `Disallow` lines and keeps the literal paths
  that look sensitive (admin, backup, config, debug, .git, .env, ...);
  patterns and `Disallow: /` name no single resource.
- Each such path counts as reachable only when it answers with its own
  content, not with what the site sends for a made-up path (a single-page
  app's catch-all, a login page).
- Reachable paths make one Info finding (CWE-200) that lists them.

Part of #997.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang merged commit df16a49c93 into main 2026-11-16 08:16:52 +00:00
sharang deleted branch fix/dast-robots-txt 2026-11-16 08:16:52 +00:00
Sign in to join this conversation.