code wiki / _hdl_build / nx_secret_cli.nx
nx_secret_cli.nx
buildroot/runtime/_hdl_build/nx_secret_cli.nx
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
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
| 8 | const AT_MAGIC_65536: i64 = 65536 |
| 9 | const AT_FDCWD: i64 = 0 - 100 |
functions
| 10 | 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 } |
| 11 | func _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 } |
| 13 | func sc_list_json(dir: *u8) -> i64 |
| 45 | func sc_run(path: *u8, a1: *u8, a2: *u8) -> i64 |
| 63 | func sc_unlink(path: *u8) -> i64 { __syscall(263, AT_FDCWD, path, 0, 0, 0, 0) return 0 } called by 1: main |
| 65 | func sc_audit(op: *u8, name: *u8, outcome: *u8) -> i64 |
| 80 | func 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 |
| 81 | func main(argc: i64, argv: *i64) -> i64 |