code wiki / _hdl_build / nx_security_status.nx

nx_security_status.nx

buildroot/runtime/_hdl_build/nx_security_status.nx

5785 B104 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic security
docsdependenciesstructsconstsfunctions

about

nx_security_status.nx -- the operator's SECURITY POSTURE at a glance (own-cybersecurity observability). Composes the working pieces into one durable report: (1) AUDIT CHAIN integrity -- runs _offc/nx_audit_log.elf verify (tamper-evident history intact?) (2) SECRET INVENTORY -- counts ~/.nishi/secrets/*.nv (how many named secrets are vaulted) (3) PROOF LEDGER verdict -- the last line of knowledge/status/proof_ledger.log (ALL-CLAIMS-HOLD?) Emits a SECSTATUS line to knowledge/status/security_status.log (durable trend) + stdout summary. Sovereign-buildable (syscalls + fork/exec; no crypto import). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_security_status.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 _p sys_write ss_run sys_fork sys_mmap sys_openat_wr sys_dup3 sys_execve sys_exit sys_wait4 ss_count_secrets sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen dirent_name ss_slen sys_close ss_proof_ok sys_openat_rd ↻ sys_mmap ↻ sys_read sys_close ↻ ss_slen ↻ _pn sys_mmap ↻ sys_write ↻ sys_openat_append _fp sys_write ↻ _fn sys_mmap ↻ sys_write ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real sys_close ↻ sys_exit ↻

structs

none

consts

9const K_MAGIC_65536: i64 = 65536
10const K_MAGIC_1048592: i64 = 1048592
11const K_MAGIC_1048576: i64 = 1048576

functions

12func _p(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
13func _pn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);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 }
called by 1: main calls 2: sys_mmapsys_write
14func _fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 }
called by 1: main calls 1: sys_write
15func _fn(fd: i64, 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;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
16func ss_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
17func ss_run(path: *u8, a1: *u8) -> i64
36func ss_count_secrets() -> i64
65func ss_proof_ok() -> i64
81func main() -> i64