code wiki / (root) / nx_sovereign_deps_gate.nx

nx_sovereign_deps_gate.nx

buildroot/runtime/nx_sovereign_deps_gate.nx

4972 B93 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind gate/prooftopic sovereign
docsdependenciesstructsconstsfunctions

about

nx_sovereign_deps_gate.nx -- SOVEREIGN replacement for bench/gate_nx_sovereign_deps.sh (which uses grep + file + readelf under /bin/bash). Enforces the operator's sovereignty cardinal by construction: (1) SOURCE: the primary netscope module must contain NO C-FFI / external-library reference (dlopen / #include / __attribute__ / openssl / libpcap / .so), scanned in-organ (no grep). (2) ARTIFACT: build nx_netscope_heal_test through the sovereign lane and prove the shipped ELF is STATIC with 0 dynamic dependencies -- via nx_elf_inspect (no file/readelf). This is the machine-enforced core: any smuggled C-lib that produced a runtime dep shows up as DT_NEEDED > 0. Composes _offc/nx_sov_build_run.elf (--build-only) + _offc/nx_elf_inspect.elf. Sovereign (syscalls only). Run from the nxc2 root. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_sovereign_deps_gate.nx

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

main sd_puts sys_write sys_mmap sd_read_file sys_openat_rd sys_read sys_close sys_exit sd_contains sd_run sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve sys_exit ↻ sys_wait4

structs

none

consts

12const SD_NETSCOPE_SRC: *u8 = "runtime/nx_netscope_heal_test.nx\x00"
13const SD_ORGAN: *u8 = "nx_netscope_heal_test\x00"
14const SD_ELF: *u8 = "/tmp/nx_netscope_heal_test.sov.elf\x00"

functions

16func sd_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
18func sd_read_file(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
33func sd_contains(buf: *u8, n: i64, pat: *u8) -> i64
called by 1: main
47func sd_run(path: *u8, a1: *u8, a2: *u8) -> i64
68func main() -> i64