code wiki / _hdl_build / nx_cms_gate.nx
nx_cms_gate.nx
buildroot/runtime/_hdl_build/nx_cms_gate.nx
about
nx_cms_gate.nx -- THE CMS ARC GATE (re-runnable, evidence-driven): boots the real admin daemon on
loopback, then plays the LEGAL-TEAM USER + THE ATTACKER over real HTTP with its own client (no curl,
no .sh): unauth surfaces refused, login lockout-guarded, CSRF enforced, stored-XSS sanitized on
write, edit->publish live, revision rollback restores the prior publish. These are the spec's
acceptance criteria (2026-06-06-sovereign-cms-architecture.md) mechanized. Appends a CMSGATE line
to knowledge/status/cms_gate.log. Exit 0 iff permil=1000. license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_cms_store.nxnx_connect.nxnx_sha256.nxnx_syscalls.nxnx_kill_portable.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
| 13 | const CG_PORT: i64 = 8077 |
| 14 | const CG_SITE: *u8 = "/tmp/_cms_gate_site" |
functions
| 16 | func cg_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 17 | func cg_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func cg_cat(dst: *u8, off: i64, s: *u8) -> i64 |
| 24 | func cg_catn(dst: *u8, off: i64, s: *u8, n: i64) -> i64 |
| 30 | func cg_index(hay: *u8, n: i64, needle: *u8) -> i64 |
| 42 | func cg_has(hay: *u8, n: i64, needle: *u8) -> i64 { if cg_index(hay, n, needle) >= 0 { return 1 } return 0 } |
| 45 | func cg_http(req: *u8, rl: i64, resp: *u8, cap: i64) -> i64 called by 1: main calls 7: sys_socketsys_mmapnx_connect_boundedsys_closesys_writesys_set_socket_timeout+1 |
| 80 | func cg_post(req: *u8, path: *u8, cookie: *u8, body: *u8) -> i64 |
| 103 | func cg_get(req: *u8, path: *u8, cookie: *u8) -> i64 |
| 116 | func cg_row(id: i64, ok: i64, what: *u8) -> i64 |
| 128 | func cg_mkdir(path: *u8, mode: i64) -> i64 |
| 134 | func main() -> i64 |