code wiki / (root) / nx_threat_model.nx

nx_threat_model.nx

buildroot/runtime/nx_threat_model.nx

11699 B210 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_threat_model.nx nx_adversarial_pattern_audit.nx

imports: nx_syscalls.nx

imported by: nx_adversarial_pattern_audit.nx

structs

144struct ThreatCoverage

consts

32const NX_THREAT_NONE: i64 = 0 // no adversary modeled
33const NX_THREAT_SCRIPT_KIDDIE: i64 = 1
34const NX_THREAT_OPPORTUNISTIC_CRIMINAL: i64 = 2
35const NX_THREAT_TARGETED_CRIMINAL: i64 = 3
36const NX_THREAT_HACKTIVIST_COLLECTIVE: i64 = 4
37const NX_THREAT_AI_ADVERSARY_CURRENT_GEN: i64 = 5
38const NX_THREAT_AI_ADVERSARY_MYTHOS_NEXT_GEN: i64 = 6 // future frontier models
39const NX_THREAT_INSIDER_COMPROMISE: i64 = 7 // racing crew member coerced/replaced
40const NX_THREAT_NATION_STATE: i64 = 8
41const NX_THREAT_SUPPLY_CHAIN_COMPROMISE: i64 = 9 // Wheeler-anchor tools tampered
42const NX_THREAT_QUANTUM_FUTURE: i64 = 10
43const NX_THREAT_LONG_HORIZON_AI_SUPERINTELLIGENCE: i64 = 11
86const NX_VECTOR_SPOOFING: i64 = 1 // impersonation
87const NX_VECTOR_TAMPERING: i64 = 2 // data/code modification
88const NX_VECTOR_REPUDIATION: i64 = 3 // deny actions
89const NX_VECTOR_INFO_DISCLOSURE: i64 = 4 // unauthorized reads
90const NX_VECTOR_DENIAL_OF_SERVICE: i64 = 5
91const NX_VECTOR_ELEVATION_OF_PRIVILEGE: i64 = 6
92const NX_VECTOR_PROMPT_INJECTION: i64 = 7 // AI-specific: inject instructions via data
93const NX_VECTOR_CODE_GENERATION_POISON: i64 = 8 // AI-specific: poison codegen output
94const NX_VECTOR_BYZANTINE_CONSENSUS: i64 = 9 // AI-specific: lie about consensus
95const NX_VECTOR_SUPPLY_CHAIN: i64 = 10 // Wheeler-anchor tampering
96const NX_VECTOR_SIDE_CHANNEL: i64 = 11 // timing / power / cache
97const NX_VECTOR_PHYSICAL_HARDWARE: i64 = 12 // implants / interposers
98const NX_VECTOR_SOCIAL_ENGINEERING: i64 = 13 // human in the loop
123const NX_DEFENSE_NOT_APPLICABLE: i64 = 0 // primitive's domain doesn't intersect this vector
124const NX_DEFENSE_HARDENED: i64 = 1 // primitive actively defends
125const NX_DEFENSE_BEST_EFFORT: i64 = 2 // partial; documented residual risk
126const NX_DEFENSE_NOT_HARDENED: i64 = 3 // known gap; honest disclosure
127const NX_DEFENSE_INHERITED: i64 = 4 // defers to composed-substrate's defense
160const NX_THREAT_COVERAGE_BYTES: i64 = 72 // 9 fields * 8 bytes
206const NX_THREAT_DEFAULT_TIER: i64 = 6 // = AI_ADVERSARY_MYTHOS_NEXT_GEN
207const NX_THREAT_CRYPTO_TIER: i64 = 8 // crypto primitives target NATION_STATE
208const NX_THREAT_LEDGER_TIER: i64 = 7 // financial substrate target SUPPLY_CHAIN
209const NX_THREAT_GAME_TIER: i64 = 4 // game-engine target AI_ADVERSARY_CURRENT_GEN
210const NX_THREAT_INGESTION_TIER: i64 = 5 // ingestion target INSIDER_COMPROMISE (data integrity)

functions

45func nx_threat_actor_name(t: i64) -> *u8
65func nx_threat_resource_tier(t: i64) -> i64
100func nx_attack_vector_name(v: i64) -> *u8
129func nx_defense_status_name(s: i64) -> *u8
164func nx_threat_actor_bit(actor: i64) -> i64
170func nx_attack_vector_bit(vector: i64) -> i64
176func nx_threat_defends_against(coverage: *ThreatCoverage, actor: i64) -> i64