code wiki / _hdl_build / nx_input_scan.nx

nx_input_scan.nx

buildroot/runtime/_hdl_build/nx_input_scan.nx

6145 B146 linesdepth 6pulls 7 transitivereach 0 importersview sourcekind tooltopic input
docsdependenciesstructsconstsfunctions

about

nx_input_scan.nx -- INPUT-INTEGRITY scanner (first control of the 3-stage untrusted-input fence, seq497). PRE-submit + POST-audit: reads a plane's text column, scans each value (case-insensitive) for prompt-injection / malicious markers, and emits findings (id TAB pattern TAB value-excerpt) to an out plane. verdict=GREEN (clean) or RED (>=1 finding). Generic (any plane/col). Deny-by-default posture: a RED here BLOCKS admission. SUBCLASS of nx_ingest_base. No hw writes (Rule 26). expect_exit: 0 argv: <plane> <col> <out-findings-plane>

dependencies 3 imports · 0 importers

nx_ingest_base.nx nx_store_seed_lib.nx nx_syscalls.nx nx_input_scan.nx

imports: nx_ingest_base.nxnx_store_seed_lib.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main ib_refuse ib_werr ib_wr ib_slen sys_write sys_exit is_atoi sys_mmap sts_load ss_open_cached ssc_init sys_mmap ↻ ssc_sig_of ss_cat sys_fstatat ssc_streq ss_open ss_open2 sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_cat ↻ ss_loadfile sys_map_file ss_readall ss_load_aux2 sys_mmap ↻ ss_cat ↻ ss_loadfile ↻ ss_r32 sys_munmap ssl_total_keys ss_r32 ↻ ssl_pow2 ssl_build ss_r32 ↻ ssl_hash_entry ssl_key_eq ss_r32 ↻

structs

none

consts

11const IS_CAP: i64 = 4194304
12const IS_OCAP: i64 = 262144
13const IS_TAB: i64 = 9
14const IS_NL: i64 = 10
15const IS_STDERR: i64 = 2
16const IS_MAXCOL: i64 = 16
17const IS_PAIR: i64 = 2
18const IS_SPB: i64 = 256
19const IS_VCAP: i64 = 4096
20const IS_UA: i64 = 65
21const IS_UZ: i64 = 90
22const IS_CASE: i64 = 32
23const IS_ARGC_MIN: i64 = 4
24const IS_D0: i64 = 48
25const IS_D9: i64 = 57

functions

31func is_atoi(s: *u8) -> i64
called by 1: main
37func is_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64
called by 1: main
52func is_lower(dst: *u8, q: *u8, a: i64, b: i64) -> i64
called by 1: main
59func is_emit(s: *u8) -> i64 { var j: i64 = 0; while s[j] != (0 as u8) { if g_o < IS_OCAP - 2 { g_out[g_o] = s[j]; g_o = g_o + 1 } j = j + 1 } return 0 }
called by 1: is_check
60func is_emitc(c: i64) -> i64 { if g_o < IS_OCAP - 2 { g_out[g_o] = c as u8; g_o = g_o + 1 } return 0 }
called by 1: is_check
61func is_emit_slice(q: *u8, a: i64, b: i64) -> i64 { var i: i64 = a; while i < b { if g_o < IS_OCAP - 2 { g_out[g_o] = q[i]; g_o = g_o + 1 } i = i + 1 } return 0 }
called by 1: is_check
63func is_check(lval: *u8, ln: i64, pat: *u8, plane: *u8, ids: i64, ide: i64, vs: i64, ve: i64) -> i64
79func main(argc: i64, argv: *i64) -> i64