code wiki / (root) / nx_url_safety_gate.nx

nx_url_safety_gate.nx

buildroot/runtime/nx_url_safety_gate.nx

8173 B133 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic url
docsdependenciesstructsconstsfunctions

about

nx_url_safety_gate.nx -- REFEREE for nx_url_safety_lib (the ONE SSRF URL ruler, mediaingest R11). THIS GATE IS BUILT AROUND THE ESTATE'S OWN MEASURED FAILURE. Its law: "Four SSRF deny-tests went green while the guard was wholly broken -- a url-decoder missing its SPACE terminator swallowed the request line so EVERY url refused as control bytes. A GUARD THAT REFUSES EVERYTHING PASSES EVERY NEGATIVE TEST. EVERY DENY-GUARD SHIPS WITH A POSITIVE CONTROL and every refusal test asserts WHICH RULE FIRED." So this gate does exactly two things a boolean suite cannot: 1. POSITIVE CONTROLS -- ordinary public URLs that MUST be ALLOWED. A refuse-everything regression fails here and nowhere else. 2. Every refusal asserts the REASON CODE, not merely that it was refused. A guard that refused a public CDN as IPV6_LITERAL would be broken while still "passing" any test that only asked "was it refused". No network, no disk: every input is a literal. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_url_safety_lib.nx nx_gate_verdict.nx nx_url_safety_gate.nx

imports: nx_syscalls.nxnx_url_safety_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_head gv_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ t_is us_reason sys_mmap ↻ us_host_of us_pfx_ci us_slen us_lc us_pfx_ci ↻ t_slen gv_check gv_puts ↻ us_host_of ↻ us_url_safe us_reason ↻

structs

none

consts

18const T_HOSTCAP: i64 = 512

functions

20func t_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: t_is
23func t_is(u: *u8, want: i64) -> i64
called by 1: main calls 2: us_reasont_slen
28func main() -> i64