nx_vitals.nx
buildroot/runtime/nx_vitals.nx
about
nx_vitals.nx -- metabolic-signature attestation via external
instrumentation.
Per META-CARDINAL feedback-ecosystem-defense-risk-register-three-fears
ยง2.7: external sensors (power / thermal / EM / acoustic / mass / network-
tap) compare observed device metabolic signatures against expected
envelopes derived from device's Bill-of-Materials. Detects hidden
silicon + tampered firmware + Hezbollah-pager-class trigger circuits
+ supply-chain modifications -- physics doesn't lie.
Biology anchor: vital signs (pulse / breath / temperature / blood pressure)
are externally-measurable indicators of metabolic state. Predators
detect prey via metabolic signatures all the time (pit vipers IR;
mosquitoes CO2 plumes; owls heartbeat-through-snow; sharks bioelectric).
The active organism cannot fully hide its metabolism from a properly-
instrumented observer.
The positive-security hardware model: enumerate every legitimate
electronic component + its expected power+mass+thermal+RF profile
= expected envelope. Any deviation = unaccounted-for component =
possible compromise. Physics doesn't lie.
Composes:
nx_attest_silicon -- vitals-clean elevates trust on commodity host
nx_thymus_audit_report -- aggregated vitals metrics + alerts
nx_immune -- runtime anomaly fires lysis pathway
nx_provenance_chain -- every vitals reading + alert chain-logged
V1 ships:
- sealed enum of measurement sources (DC_RAIL / AC_WALL / THERMAL /
SDR_RF / NETWORK_TAP / ACOUSTIC / MASS)
- BOM-envelope struct + per-source expected window (min, max, units)
- reading struct + deviation predicate
- aggregator across sources + verdict
Gap list (V1 honest perf verdict):
- per-host BOM is operator-attested + community-maintained;
vendor BOMs incomplete; reverse-engineering expensive
- statistical-envelope thresholds are caller-supplied (V2 makes
per-niche policy from accumulated baseline readings)
dependencies 2 imports · 2 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_tier2_immune_compose_test.nxnx_vitals_test.nx
structs
| 102 | struct NxVitalsEnvelope |
| 117 | struct NxVitalsReading |
consts
| 65 | const NX_VS_DC_RAIL: nx_int = 0 |
| 66 | const NX_VS_AC_WALL: nx_int = 1 |
| 67 | const NX_VS_THERMAL: nx_int = 2 |
| 68 | const NX_VS_SDR_RF: nx_int = 3 |
| 69 | const NX_VS_NETWORK_TAP: nx_int = 4 |
| 70 | const NX_VS_ACOUSTIC: nx_int = 5 |
| 71 | const NX_VS_MASS: nx_int = 6 |
| 72 | const NX_VS_N_SOURCES: nx_int = 7 |
| 79 | const NX_VS_STATE_OFF: nx_int = 0 |
| 80 | const NX_VS_STATE_STANDBY: nx_int = 1 |
| 81 | const NX_VS_STATE_IDLE: nx_int = 2 |
| 82 | const NX_VS_STATE_TYPICAL_LOAD: nx_int = 3 |
| 83 | const NX_VS_STATE_HEAVY_LOAD: nx_int = 4 |
| 84 | const NX_VS_STATE_N_STATES: nx_int = 5 |
| 88 | const NX_VV_WITHIN_ENVELOPE: nx_int = 0 |
| 89 | const NX_VV_LOW_DEVIATION: nx_int = 1 |
| 90 | const NX_VV_HIGH_DEVIATION: nx_int = 2 |
| 91 | const NX_VV_CRITICAL_DEVIATION: nx_int = 3 |
| 92 | const NX_VV_INVALID: nx_int = 99 |
| 93 | const NX_VV_N_VERDICTS: nx_int = 4 |
| 113 | const NX_VS_ENV_BYTES: nx_int = 64 |
| 124 | const NX_VS_RD_BYTES: nx_int = 32 |
functions
| 128 | func nx_vs_source_is_valid(s: nx_int) -> nx_int called by 1: main |
| 136 | func nx_vs_state_is_valid(s: nx_int) -> nx_int called by 1: main |
| 144 | func nx_vv_verdict_is_valid(v: nx_int) -> nx_int |
| 155 | func nx_vv_is_concerning(v: nx_int) -> nx_int |
| 163 | func nx_vs_envelope_new(source: nx_int, |
| 185 | func nx_vs_reading_new(source: nx_int, |
| 204 | func _vs_deviation(value: nx_size, min_v: nx_size, max_v: nx_size) -> nx_size called by 1: nx_vs_classify |
| 221 | func nx_vs_classify(reading: *NxVitalsReading, |
| 241 | func nx_vs_verdict_priority(v: nx_int) -> nx_int |
| 254 | func nx_vs_classify_off_state_active_ME(dc_rail_ma: nx_size) -> nx_int |