code wiki / _hdl_build / nx_clean_serve_gate.nx
nx_clean_serve_gate.nx
buildroot/runtime/_hdl_build/nx_clean_serve_gate.nx
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
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
structs
| none |
consts
| none |
functions
| 14 | func g_has(hay: *u8, hl: i64, needle: *u8) -> i64 |
| 23 | func g_check(label: *u8, ok: i64, pt: *i64) -> i64 |
| 32 | func g_absent(out: *u8, len: i64, needle: *u8, label: *u8, pt: *i64) -> i64 |
| 37 | func g_present(out: *u8, len: i64, needle: *u8, label: *u8, pt: *i64) -> i64 |
| 41 | func 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 } |
| 42 | func 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 } |
| 44 | func main(argc: i64, argv: *i64) -> i64 |