code wiki / _hdl_build / nx_input_scan.nx
nx_input_scan.nx
buildroot/runtime/_hdl_build/nx_input_scan.nx
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
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
structs
| none |
consts
| 11 | const IS_CAP: i64 = 4194304 |
| 12 | const IS_OCAP: i64 = 262144 |
| 13 | const IS_TAB: i64 = 9 |
| 14 | const IS_NL: i64 = 10 |
| 15 | const IS_STDERR: i64 = 2 |
| 16 | const IS_MAXCOL: i64 = 16 |
| 17 | const IS_PAIR: i64 = 2 |
| 18 | const IS_SPB: i64 = 256 |
| 19 | const IS_VCAP: i64 = 4096 |
| 20 | const IS_UA: i64 = 65 |
| 21 | const IS_UZ: i64 = 90 |
| 22 | const IS_CASE: i64 = 32 |
| 23 | const IS_ARGC_MIN: i64 = 4 |
| 24 | const IS_D0: i64 = 48 |
| 25 | const IS_D9: i64 = 57 |
functions
| 31 | func is_atoi(s: *u8) -> i64 called by 1: main |
| 37 | func is_cols(q: *u8, ls: i64, le: i64, sp: *i64) -> i64 called by 1: main |
| 52 | func is_lower(dst: *u8, q: *u8, a: i64, b: i64) -> i64 called by 1: main |
| 59 | func 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 |
| 60 | func 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 |
| 61 | func 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 |
| 63 | func is_check(lval: *u8, ln: i64, pat: *u8, plane: *u8, ids: i64, ide: i64, vs: i64, ve: i64) -> i64 |
| 79 | func main(argc: i64, argv: *i64) -> i64 |