code wiki / (root) / nx_opennet_posture_core.nx

nx_opennet_posture_core.nx

buildroot/runtime/nx_opennet_posture_core.nx

4458 B105 linesdepth 4pulls 4 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_opennet_posture_core.nx -- importable CORE of the open-net security-posture ruler (S15/O2 of the crash-resume->SOTA + open-net program, 07-15 operator: "apis and mcp capable across the open net so we can be 'local' anywhere securely"). Encodes THE invariant every public surface must satisfy: an UNAUTHENTICATED request is DENIED (401/403) -- no data leak -- while an intentionally public surface SERVES (200) and a gate front-door REDIRECTS (301/302). A DENY surface returning 200 to no-cred = a SECURITY LEAK (the highest-severity verdict). Pure decision funcs here (gate-locked); the live fetch lives in the CLI so the ruler is provable OFFLINE + vantage is a parameter (same organ run from the NAS = necessary check; run from a true-external VM = the sufficient "local anywhere" proof). Read-only. license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_crashresume_census_core.nx nx_opennet_posture_core.nx nx_opennet_posture_gate.nx

imports: nx_syscalls.nxnx_crashresume_census_core.nx

imported by: nx_opennet_posture_gate.nx

structs

none

consts

15const OP_DENY: i64 = 0 // unauth MUST be refused: 401 or 403
16const OP_PUBLIC: i64 = 1 // intentionally public: 200
17const OP_REDIRECT: i64 = 2 // gate front-door: 301 or 302
20const OP_PASS: i64 = 1
21const OP_FAIL: i64 = 0 // posture violated
22const OP_LEAK: i64 = 2 // DENY surface served 200 to no-cred -- worst case, called out distinctly
23const OP_UNREACH: i64 = 3 // no status parsed (fetch failed / not our edge) -- never a silent PASS

functions

27func op_http_status(buf: *u8, n: i64) -> i64
called by 1: main calls 2: sys_mmapccz_num_at
41func op_is_sovereign(buf: *u8, n: i64) -> i64
called by 1: main calls 1: ccz_slen
56func op_verdict(status: i64, expect: i64) -> i64
called by 1: main
76func op_expect_name(e: i64) -> *u8
83func op_verdict_name(v: i64) -> *u8
91func op_expect_id(s: *u8) -> i64
called by 1: main calls 1: streq_op
100func streq_op(a: *u8, b: *u8) -> i64
called by 1: op_expect_id