Problem: the crawler (compliance-dast/src/crawler) follows links in the HTML the server sends (scraper). On our own services:
Agent API: 1 endpoint found (the base URL). It never sees the API routes, so the injection, XSS, SSRF and fuzzing agents have nothing to test.
Dashboard (Dioxus): only the links in the server-rendered shell; no parameters, no forms, nothing the client renders.
False positives:
auth-bypass compares status codes only; a single-page app answers 200 on every route;
robots.txt with Disallow: / is reported as a Medium "sensitive resource".
Change:
API endpoints from a spec: seed them from an OpenAPI document when the target has one (URL in the target settings, or well-known paths); openapi_parser already exists in the pentest tools.
Browser crawl: crawl through the browser for web apps (render, then collect links, forms and the XHR/fetch requests the page makes) on top of the HTML crawl.
Auth bypass: compare the unauthenticated response with the authenticated one (body/redirect/JSON shape), not just status 200.
robots.txt: info at most, and only when it names paths that are reachable and sensitive.
Acceptance: against a local agent with its API described, the crawl finds the API routes. Against the dashboard it finds the client-rendered pages and forms. Neither produces an auth-bypass or robots.txt finding.
Part of the DAST/pentest dogfooding work.
**Problem:** the crawler (`compliance-dast/src/crawler`) follows links in the HTML the server sends (`scraper`). On our own services:
- **Agent API:** 1 endpoint found (the base URL). It never sees the API routes, so the injection, XSS, SSRF and fuzzing agents have nothing to test.
- **Dashboard (Dioxus):** only the links in the server-rendered shell; no parameters, no forms, nothing the client renders.
- **False positives:**
- auth-bypass compares status codes only; a single-page app answers 200 on every route;
- `robots.txt` with `Disallow: /` is reported as a Medium "sensitive resource".
**Change:**
1. **API endpoints from a spec:** seed them from an OpenAPI document when the target has one (URL in the target settings, or well-known paths); `openapi_parser` already exists in the pentest tools.
2. **Browser crawl:** crawl through the browser for web apps (render, then collect links, forms and the XHR/fetch requests the page makes) on top of the HTML crawl.
3. **Auth bypass:** compare the unauthenticated response with the authenticated one (body/redirect/JSON shape), not just status 200.
4. **robots.txt:** info at most, and only when it names paths that are reachable and sensitive.
**Acceptance:** against a local agent with its API described, the crawl finds the API routes. Against the dashboard it finds the client-rendered pages and forms. Neither produces an auth-bypass or robots.txt finding.
Status: point 4 (robots.txt) is done in #1005, on stage. Points 1–3 are open for someone to pick up.
Point 1 (API endpoints from a spec): suggested design, not started
DastTarget gets an optional openapi_url, set through POST /api/v1/dast/targets (and the target's web settings, if the pipeline should provision it). The URL is checked with NetGuard::check_url like the base URL.
No URL: try the well-known paths on the target's origin. The list is in compliance-dast/src/tools/openapi_parser.rs (common_spec_paths).
Reuse OpenApiParserTool::parse_spec (make it pub(crate)) instead of a second parser. JSON only; YAML needs a dependency.
Each operation becomes a DiscoveredEndpoint on the target's origin:
servers[0].url / basePath are joined onto the base URL, and anything that ends up on another origin is dropped;
path parameters get a placeholder value;
requires_auth comes from the operation's security.
PUT/PATCH/DELETE operations only when the target allows destructive tests.
The scan adds them to the crawl's endpoints, without duplicates, so endpoints_discovered counts both.
Test: a fake site serving a small spec. Its routes show up as endpoints, and an operation on another server does not.
Acceptance needs a spec of our own: our agent does not publish an OpenAPI description, so "against a local agent with its API described" cannot be run yet. Follow-up: #1006.
**Status:** point 4 (robots.txt) is done in #1005, on stage. Points 1–3 are open for someone to pick up.
**Point 1 (API endpoints from a spec): suggested design, not started**
- `DastTarget` gets an optional `openapi_url`, set through `POST /api/v1/dast/targets` (and the target's web settings, if the pipeline should provision it). The URL is checked with `NetGuard::check_url` like the base URL.
- No URL: try the well-known paths on the target's origin. The list is in `compliance-dast/src/tools/openapi_parser.rs` (`common_spec_paths`).
- Reuse `OpenApiParserTool::parse_spec` (make it `pub(crate)`) instead of a second parser. JSON only; YAML needs a dependency.
- Each operation becomes a `DiscoveredEndpoint` on the target's origin:
- `servers[0].url` / `basePath` are joined onto the base URL, and anything that ends up on another origin is dropped;
- path parameters get a placeholder value;
- `requires_auth` comes from the operation's `security`.
- `PUT`/`PATCH`/`DELETE` operations only when the target allows destructive tests.
- The scan adds them to the crawl's endpoints, without duplicates, so `endpoints_discovered` counts both.
- Test: a fake site serving a small spec. Its routes show up as endpoints, and an operation on another server does not.
**Acceptance needs a spec of our own:** our agent does not publish an OpenAPI description, so "against a local agent with its API described" cannot be run yet. Follow-up: #1006.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of the DAST/pentest dogfooding work.
Problem: the crawler (
compliance-dast/src/crawler) follows links in the HTML the server sends (scraper). On our own services:robots.txtwithDisallow: /is reported as a Medium "sensitive resource".Change:
openapi_parseralready exists in the pentest tools.Acceptance: against a local agent with its API described, the crawl finds the API routes. Against the dashboard it finds the client-rendered pages and forms. Neither produces an auth-bypass or robots.txt finding.
Status: point 4 (robots.txt) is done in #1005, on stage. Points 1–3 are open for someone to pick up.
Point 1 (API endpoints from a spec): suggested design, not started
DastTargetgets an optionalopenapi_url, set throughPOST /api/v1/dast/targets(and the target's web settings, if the pipeline should provision it). The URL is checked withNetGuard::check_urllike the base URL.compliance-dast/src/tools/openapi_parser.rs(common_spec_paths).OpenApiParserTool::parse_spec(make itpub(crate)) instead of a second parser. JSON only; YAML needs a dependency.DiscoveredEndpointon the target's origin:servers[0].url/basePathare joined onto the base URL, and anything that ends up on another origin is dropped;requires_authcomes from the operation'ssecurity.PUT/PATCH/DELETEoperations only when the target allows destructive tests.endpoints_discoveredcounts both.Acceptance needs a spec of our own: our agent does not publish an OpenAPI description, so "against a local agent with its API described" cannot be run yet. Follow-up: #1006.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9