code wiki / _hdl_build / nx_security_status.nx
nx_security_status.nx
buildroot/runtime/_hdl_build/nx_security_status.nx
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
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
| 9 | const K_MAGIC_65536: i64 = 65536 |
| 10 | const K_MAGIC_1048592: i64 = 1048592 |
| 11 | const K_MAGIC_1048576: i64 = 1048576 |
functions
| 12 | func _p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func _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 } |
| 14 | func _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 } |
| 15 | func _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 } |
| 16 | func ss_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 17 | func ss_run(path: *u8, a1: *u8) -> i64 |
| 36 | func ss_count_secrets() -> i64 |
| 65 | func ss_proof_ok() -> i64 |
| 81 | func main() -> i64 |