code wiki / _hdl_build / nx_sov_import_lint.nx
nx_sov_import_lint.nx
buildroot/runtime/_hdl_build/nx_sov_import_lint.nx
about
nx_sovereignty_audit.nx -- MECHANICAL "no python/sh/java/qemu on the program path" checker. Given a list of
.nx source files, it reads each and flags two kinds of sovereignty leaks:
(1) any import whose target is NOT a .nx module (a non-sovereign dependency)
(2) any exec-target STRING LITERAL naming a third-party interpreter/tool -- "/bin/sh, "/bin/bash, "python,
"qemu, "perl, "node, "ruby, "javac, ".jar, "/usr/bin/env (anchored on the opening quote so prose /
comments mentioning incumbents do NOT false-positive; only actual string literals are caught)
Exit 0 iff EVERY file is sovereign; 1 if any is flagged. This turns "we don't ship non-sovereign deps" from a
promise into a repeatable gate (the gate's neg-control proves it actually detects a real leak = liar-kill).
nx_sovereignty_audit <file1.nx> [file2.nx ...]
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_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
| none |
functions
| 13 | func sa_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 14 | func sa_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: sa_find |
| 15 | func sa_num(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=(48 as u8);k=1}; while m>0{t[k]=((48+(m%10)) as u8);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } |
| 16 | func sa_find(buf: *u8, n: i64, pat: *u8, start: i64) -> i64 |
| 24 | func sa_audit(path: *u8) -> i64 |
| 70 | func main(argc: i64, argv: *i64) -> i64 |