code wiki / _hdl_build / nx_secret_cli.nx

nx_secret_cli.nx

buildroot/runtime/_hdl_build/nx_secret_cli.nx

6150 B112 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic secret
docsdependenciesstructsconstsfunctions

about

nx_secret_cli.nx -- the operator-facing SECRET STORE CLI (hashicorp-vault-class UX, sovereign). nx_secret put <name> -- seal the value in /tmp/nxsecret.in -> ~/.nishi/secrets/<name>.nv nx_secret get <name> -- open ~/.nishi/secrets/<name>.nv -> /tmp/nxsecret.out (0600, authenticated) Composes the WORKING crypto: nx_machine_key (machine-bound passphrase) + nx_vault (AES-128-GCM, per-name IV, fails closed). The machine key is derived fresh and the /tmp/nxpass ephemeral is SHREDDED after each call -- the operator never types or stores a passphrase. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_secret_cli.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 sys_exit sc_list_json sys_openat_rd _p ↻ sys_mmap sys_getdents64 dirent_reclen dirent_name sys_write ↻ sys_close _pn sys_mmap ↻ sys_write ↻ sys_mmap ↻ sc_cat sc_run sys_fork sys_mmap ↻ sys_execve sys_exit ↻ sys_wait4 sc_unlink sc_audit sys_fork ↻ sys_mmap ↻ sys_execve ↻ sys_exit ↻ sys_wait4 ↻

structs

none

consts

8const AT_MAGIC_65536: i64 = 65536
9const AT_FDCWD: i64 = 0 - 100

functions

10func _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 2: sc_list_jsonmain calls 1: sys_write
11func _pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0} 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{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
called by 1: sc_list_json calls 2: sys_mmapsys_write
13func sc_list_json(dir: *u8) -> i64
45func sc_run(path: *u8, a1: *u8, a2: *u8) -> i64
65func sc_audit(op: *u8, name: *u8, outcome: *u8) -> i64
80func sc_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: main
81func main(argc: i64, argv: *i64) -> i64