nx_threat_model.nx
buildroot/runtime/nx_threat_model.nx
about
nx_threat_model.nx -- sealed adversary taxonomy for substrate design.
module: nishi-core.security.threat_model
depends: nishi-core.io.syscalls
disk_kb: 4
capability: CRYPTO
wired_status: FULLY_WIRED
license_tier: PUBLIC_NISHI_SUBSTRATE
genealogy_id: nishi_racing_crew_team_honesty_threat_aware_cardinal_2026 +
saltzer_schroeder_1975_protection_of_information +
shostack_2014_threat_modeling +
stride_threat_taxonomy_microsoft
Per cardinal [[feedback-racing-crew-team-honesty-threat-aware]]:
THIS IS A TYPE-LEVEL PRIMITIVE. Implementation IS the sealed
enum + helpers. Marked FULLY_WIRED honestly because no further
execution path exists for this primitive — its job is to provide
the substrate's threat-actor taxonomy for downstream composition.
Every NX-INGEST adapter, every cryptographic primitive, every
substrate boundary declares which ThreatActor classes it defends
against. Substrate-level audit composes these declarations into
a system-wide threat-coverage report.
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_adversarial_pattern_audit.nx
structs
| 144 | struct ThreatCoverage |
consts
| 32 | const NX_THREAT_NONE: i64 = 0 // no adversary modeled |
| 33 | const NX_THREAT_SCRIPT_KIDDIE: i64 = 1 |
| 34 | const NX_THREAT_OPPORTUNISTIC_CRIMINAL: i64 = 2 |
| 35 | const NX_THREAT_TARGETED_CRIMINAL: i64 = 3 |
| 36 | const NX_THREAT_HACKTIVIST_COLLECTIVE: i64 = 4 |
| 37 | const NX_THREAT_AI_ADVERSARY_CURRENT_GEN: i64 = 5 |
| 38 | const NX_THREAT_AI_ADVERSARY_MYTHOS_NEXT_GEN: i64 = 6 // future frontier models |
| 39 | const NX_THREAT_INSIDER_COMPROMISE: i64 = 7 // racing crew member coerced/replaced |
| 40 | const NX_THREAT_NATION_STATE: i64 = 8 |
| 41 | const NX_THREAT_SUPPLY_CHAIN_COMPROMISE: i64 = 9 // Wheeler-anchor tools tampered |
| 42 | const NX_THREAT_QUANTUM_FUTURE: i64 = 10 |
| 43 | const NX_THREAT_LONG_HORIZON_AI_SUPERINTELLIGENCE: i64 = 11 |
| 86 | const NX_VECTOR_SPOOFING: i64 = 1 // impersonation |
| 87 | const NX_VECTOR_TAMPERING: i64 = 2 // data/code modification |
| 88 | const NX_VECTOR_REPUDIATION: i64 = 3 // deny actions |
| 89 | const NX_VECTOR_INFO_DISCLOSURE: i64 = 4 // unauthorized reads |
| 90 | const NX_VECTOR_DENIAL_OF_SERVICE: i64 = 5 |
| 91 | const NX_VECTOR_ELEVATION_OF_PRIVILEGE: i64 = 6 |
| 92 | const NX_VECTOR_PROMPT_INJECTION: i64 = 7 // AI-specific: inject instructions via data |
| 93 | const NX_VECTOR_CODE_GENERATION_POISON: i64 = 8 // AI-specific: poison codegen output |
| 94 | const NX_VECTOR_BYZANTINE_CONSENSUS: i64 = 9 // AI-specific: lie about consensus |
| 95 | const NX_VECTOR_SUPPLY_CHAIN: i64 = 10 // Wheeler-anchor tampering |
| 96 | const NX_VECTOR_SIDE_CHANNEL: i64 = 11 // timing / power / cache |
| 97 | const NX_VECTOR_PHYSICAL_HARDWARE: i64 = 12 // implants / interposers |
| 98 | const NX_VECTOR_SOCIAL_ENGINEERING: i64 = 13 // human in the loop |
| 123 | const NX_DEFENSE_NOT_APPLICABLE: i64 = 0 // primitive's domain doesn't intersect this vector |
| 124 | const NX_DEFENSE_HARDENED: i64 = 1 // primitive actively defends |
| 125 | const NX_DEFENSE_BEST_EFFORT: i64 = 2 // partial; documented residual risk |
| 126 | const NX_DEFENSE_NOT_HARDENED: i64 = 3 // known gap; honest disclosure |
| 127 | const NX_DEFENSE_INHERITED: i64 = 4 // defers to composed-substrate's defense |
| 160 | const NX_THREAT_COVERAGE_BYTES: i64 = 72 // 9 fields * 8 bytes |
| 206 | const NX_THREAT_DEFAULT_TIER: i64 = 6 // = AI_ADVERSARY_MYTHOS_NEXT_GEN |
| 207 | const NX_THREAT_CRYPTO_TIER: i64 = 8 // crypto primitives target NATION_STATE |
| 208 | const NX_THREAT_LEDGER_TIER: i64 = 7 // financial substrate target SUPPLY_CHAIN |
| 209 | const NX_THREAT_GAME_TIER: i64 = 4 // game-engine target AI_ADVERSARY_CURRENT_GEN |
| 210 | const NX_THREAT_INGESTION_TIER: i64 = 5 // ingestion target INSIDER_COMPROMISE (data integrity) |
functions
| 45 | func nx_threat_actor_name(t: i64) -> *u8 |
| 65 | func nx_threat_resource_tier(t: i64) -> i64 |
| 100 | func nx_attack_vector_name(v: i64) -> *u8 |
| 129 | func nx_defense_status_name(s: i64) -> *u8 |
| 164 | func nx_threat_actor_bit(actor: i64) -> i64 called by 1: nx_threat_defends_against |
| 170 | func nx_attack_vector_bit(vector: i64) -> i64 |
| 176 | func nx_threat_defends_against(coverage: *ThreatCoverage, actor: i64) -> i64 calls 1: nx_threat_actor_bit |
| 187 | func nx_threat_recommended_posture_ptr(actor: i64) -> *u8 |