feat(security): refuse scans aimed at our own network (#256) (#293)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m23s
CI / Deploy Agent (push) Successful in 11m3s
CI / Deploy MCP (push) Successful in 3m12s
CI / Deploy Dashboard (push) Successful in 11m34s

This commit was merged in pull request #293.
This commit is contained in:
sharang committed 2026-09-20 21:59:50 +00:00
1 parent aa64e2b25a
commit eef3ccdf43
8 files changed
+693 -17

No files matched your search

+23
View File
@@ -59,6 +59,29 @@ A full scan runs multiple analysis engines, each producing different types of fi
| **Secrets** | Hardcoded credentials, API keys, tokens in source code | Custom rules |
| **Code Review** | Architecture and security patterns reviewed by AI | LLM-powered |
## Where a scan may connect
Git URLs, live URLs, DAST base URLs, pentest app URLs and PLC endpoints all say
where the scanner should connect, so they decide what the agent talks to. A
cloud deployment therefore accepts **publicly routable addresses only**, and
refuses:
- loopback, private (`10/8`, `172.16/12`, `192.168/16`), carrier-NAT and
link-local addresses, including the cloud-metadata address `169.254.169.254`;
- names that only resolve inside a private network — single-label hosts such as
`mongo`, anything ending in `.internal` or `.local`, and `localhost`;
- `file://`, `git://` and bare filesystem paths as a git remote;
- blob artifacts that point at a server path instead of an uploaded file.
Hostnames are re-checked and resolved when the scan actually runs, not only when
the target is saved, and a name that resolves to both a public and a private
address is refused.
**On-premise runners are different.** A Werkbank runner inside a plant network is
aimed at `10.x` PLCs on purpose, so it sets `PW_ALLOW_PRIVATE_TARGETS=1`. A
hardened cloud deployment ignores that variable — it shares a network with the
platform's own services.
## Deduplication and Fingerprinting
Findings are deduplicated using a fingerprint hash based on the scanner, file path, line number, and vulnerability type. This means: