code wiki / _hdl_build / nx_clean_serve_gate.nx

nx_clean_serve_gate.nx

buildroot/runtime/_hdl_build/nx_clean_serve_gate.nx

7992 B112 linesdepth 5pulls 5 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 3 imports · 0 importers

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

imports: nx_syscalls.nxnx_web_filter.nxnx_clean_serve.nx

imported by: nobody (leaf or entry point)

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

main wf_new sys_mmap wf_seed wf_addc wf_add wf_slen wf_add_list wf_add ↻ sys_mmap ↻ g_present g_has cs_slen cs_ci_at cs_lc g_check sys_mmap ↻ cs_put 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 wf_should_block xt_find cs_clean_into sys_mmap ↻ cs_ci_at ↻ cs_skip_block cs_ci_at ↻ cs_tag_end cs_within cs_ci_at ↻

structs

none

consts

none

functions

14func g_has(hay: *u8, hl: i64, needle: *u8) -> i64
called by 2: g_absentg_present calls 2: cs_slencs_ci_at
23func g_check(label: *u8, ok: i64, pt: *i64) -> i64
32func g_absent(out: *u8, len: i64, needle: *u8, label: *u8, pt: *i64) -> i64
called by 1: main calls 2: g_hasg_check
37func g_present(out: *u8, len: i64, needle: *u8, label: *u8, pt: *i64) -> i64
called by 1: main calls 2: g_hasg_check
41func 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
42func 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
44func main(argc: i64, argv: *i64) -> i64