code wiki / _hdl_build / nx_clean_serve_gate.nx

nx_clean_serve_gate.nx

buildroot/runtime/_hdl_build/nx_clean_serve_gate.nx

15429 B172 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic clean
docsdependenciesstructsconstsfunctions

about

nx_clean_serve_gate.nx -- ADVERSARY + CRITIC gate for the ethical clean-serve engine (the win-win-win proof). ADVERSARY: a synthetic hostile page carrying every attack class a malvertising/pirate/adult site throws at a user -- cryptominer, popunder window.open, reverse-tabnab link, meta-refresh malvertising, tracker beacon, inline on*= handler, javascript: URI -- PLUS a benign static banner ad and the real video content. CRITIC: after cs_clean_page, assert (a) EVERY attack is neutralized (nothing executable survives), (b) the benign ad's creative + click SURVIVE (the site still monetizes), (c) the content + native media survive, (d) the safety receipt counts are correct. NEGATIVE CONTROLS: a clean page must report ZERO attacks (no false positive), and a miner-only page must NOT count the miner as a preserved ad. No fabricated greens. ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_web_filter.nx nx_clean_serve.nx nx_gate_verdict.nx nx_clean_serve_gate.nx

imports: nx_syscalls.nxnx_web_filter.nxnx_clean_serve.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 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 ↻ gv_ctr sys_mmap ↻ g_present g_has cs_slen cs_ci_at cs_lc g_check gv_check gv_puts sys_write ↻ g_ge g_check ↻ cs_slen ↻ cs_rc_new sys_mmap ↻ cs_clean_page cs_scan_urls sys_mmap ↻ cs_ci_at ↻ cs_url_delim cs_verdict cs_clean_into sys_mmap ↻

structs

none

consts

none

functions

15func g_has(hay: *u8, hl: i64, needle: *u8) -> i64
called by 2: g_absentg_present calls 2: cs_slencs_ci_at
24func g_check(label: *u8, ok: i64, pt: *i64) -> i64 { gv_check(label, ok, pt); return 0 }
called by 4: g_absentg_presentg_geg_eq calls 1: gv_check
26func g_absent(out: *u8, len: i64, needle: *u8, label: *u8, pt: *i64) -> i64
called by 1: main calls 2: g_hasg_check
31func g_present(out: *u8, len: i64, needle: *u8, label: *u8, pt: *i64) -> i64
called by 1: main calls 2: g_hasg_check
35func g_ge(v: i64, min: i64, label: *u8, pt: *i64) -> i64 { var ok: i64=0; if v>=min { ok=1 } g_check(label, ok, pt); return 0 }
called by 1: main calls 1: g_check
36func g_eq(v: i64, want: i64, label: *u8, pt: *i64) -> i64 { var ok: i64=0; if v==want { ok=1 } g_check(label, ok, pt); return 0 }
called by 1: main calls 1: g_check
38func main(argc: i64, argv: *i64) -> i64