test(gateway): require URI path-segment route boundaries - #181
test(gateway): require URI path-segment route boundaries#181seonghobae wants to merge 9 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Writer repair note (exact-head evidence): two attempted causal GREEN writes ( |
Security finding
Refs #180. Protected
main@a52ccd0a24a727d9349bb32def7713882d8cad1eselects routes with raw lexical prefix matching. That lets/apicapture/apixand lets/api/admincapture/api/administrator, binding a request to the wrong Wardnet route/enforcement/upstream authority before later controls execute.Hostile RED — executed
Exact RED head
93d097626d96f9adaffc267f47be162c397355f3changes onlycrates/waf-ids-core/tests/route_path_segment_boundary.rs; production code remains untouched.CI run
34129793580, rust job101766902311, executed on a GitHub-hosted Ubuntu runner and failed in the new integration test after checkout/toolchain/fmt and the pre-existing crate tests had passed. The hostile boundary suite ran 3 tests: 1 passed and 2 failed exactly on the vulnerable lexical-prefix behavior:/apiincorrectly selected a route for lexical siblings such as/apix//api-v2rather than returning no route;/api/administratorincorrectly selected the narroweradminroute instead of the valid/apiparent (left: Some("admin"),right: Some("api")).The root/trailing-slash compatibility case passed. This is the required realistic RED against unchanged production behavior; no no-op commit, predecessor result, duplicate verifier, or retry was used to manufacture it. Fuzz
34129793534also completed successfully on this RED head.RFC 3986 §3.3 is the path-segment authority.
Minimal causal GREEN
Exact current head is
fc5645bb2e661f9af63d84b1d08e939b3d7ab3fe. Production change is limited tocrates/waf-ids-core/src/lib.rs::select_route: an enabled route now matches only an exact configured path or a slash-delimited descendant. Prefixes ending in/retain their existing descendant behavior, root/remains catch-all, disabled routes remain ignored, and longest valid match remains unchanged.Fresh compare against protected
main@a52ccd0...isbehind_by=0; the effective delta is exactly two files: the 77-line hostile regression and the 8-line route-predicate change.RouteConfigwire shape and EgressWeave-owned destination/DNS/redirect/proxy/TLS/resource authorization are untouched. The downstream suffix strip is reached only after this segment-safe route selection and therefore does not require a second routing authority or refactor.Current exact gate — 2026-09-08 KST
The unchanged exact head has terminal repository/security execution; the earlier incomplete Security/SAST queue snapshot is superseded.
34141693656— SUCCESS. Rust job101804880009acquired GitHub-hosted runner1001746000, checked out exactfc5645..., and passedcargo fmt --check, locked workspace tests, and Clippy.34141693771— SUCCESS on the unchanged exact head.34141693787— SUCCESS on the unchanged exact head.34141693672— SUCCESS on the unchanged exact head.34141693695— FAILURE at the central delegated current-head verdict boundary, not in Wardnet route source. Detect job101804881432checked out exactfc5645...and succeeded. Compatibility job101811024526acquired hostedubuntu-24.04, read the current-head dispatch verdict, and failed closed atRelease runner or enforce current-head CodeQL verdict. The separate dispatch job101815255279subsequently acquired a hosted runner and successfully dispatched the exact current-head scan. This is a central producer/terminal-verdict sequencing/publication specimen under.github#1929; no leaf rerun/source churn converts it to GREEN.Hosted acquisition across CI/Security/SAST/CodeQL also remains an exact
.github#712canary:ubuntu-24.04is dispatchable, so queue delay is not a reason for a runner-label workaround.Current inline review-thread and submitted-review inventories are empty. Keep Draft until the delegated exact-head CodeQL verdict is terminal-valid and the central solo-maintainer ruleset is ordinarily satisfiable. Live ruleset
18156473still requires one approval with no named/code-owner/last-push reviewer and exposes routineOrganizationAdmin/alwaysbypass;.github#772owns that repair. Do not use this product PR as a merge-policy probe.No force push/destructive rebase, self/model approval, routine administrator bypass, gate weakening, mutable foreign dependency, or predecessor evidence reuse.