Skip to content

Commit d56adaf

Browse files
committed
[DSLLVM] v1.3 Phase 1 (Partial): Mission Profiles & Auto-Fuzz Foundation
This commit implements the foundational infrastructure for DSLLVM v1.3 Phase 1 features: ## Feature 1.1: Mission Profiles (COMPLETE) Mission profiles are first-class compile targets that define operational context and security constraints. They replace debug/release with purpose-built configurations. **Standard Profiles:** - border_ops: Max security for hostile environments (RESTRICTED) - cyber_defence: AI-enhanced defensive ops (CONFIDENTIAL) - exercise_only: Training simulations (30-day expiration) - lab_research: Unrestricted R&D **New Files:** - dsmil/config/mission-profiles.json - Profile configuration schema - dsmil/lib/Passes/DsmilMissionPolicyPass.cpp - Enforcement pass - dsmil/docs/MISSION-PROFILES-GUIDE.md - User documentation - dsmil/docs/MISSION-PROFILE-PROVENANCE.md - Provenance integration - dsmil/test/mission-profiles/ - Example programs **Modified:** - dsmil/include/dsmil_attributes.h - Added DSMIL_MISSION_PROFILE() macro - dsmil/lib/Passes/README.md - Documented mission policy pass **Key Features:** - Stage whitelist/blacklist enforcement - Device whitelist validation - Layer ROE policy enforcement - Quantum export restrictions - Provenance with ML-DSA-87 signatures - Expiration enforcement (90d cyber_defence, 30d exercise_only) **CLI Usage:** dsmil-clang -fdsmil-mission-profile=border_ops \ -fdsmil-provenance=full src.c -o bin ## Feature 1.2: Auto-Fuzz Export (FOUNDATION) Automatic fuzz harness generation from untrusted input annotations. **New Files:** - dsmil/lib/Passes/DsmilFuzzExportPass.cpp - Fuzz export pass - dsmil/docs/FUZZ-HARNESS-SCHEMA.md - Schema specification **Modified:** - dsmil/lib/Passes/README.md - Documented fuzz export pass **Key Features:** - Detects DSMIL_UNTRUSTED_INPUT functions - Analyzes parameter types and domains - Computes Layer 8 Security AI risk scores - Exports *.dsmilfuzz.json sidecar files - Links buffer parameters to length parameters **CLI Usage:** dsmil-clang -fdsmil-fuzz-export src.c # Generates: module.dsmilfuzz.json **Output Format:** { "fuzz_targets": [{ "function": "parse_packet", "l8_risk_score": 0.87, "priority": "high", "parameter_domains": { ... } }] } ## Remaining Phase 1 Work (Next Commits) - Feature 1.2: L7 LLM harness generation integration - Feature 1.2: CI/CD integration scripts - Feature 1.3: Telemetry enforcement (DSMIL_SAFETY_CRITICAL) ## Testing # Test mission profiles cd dsmil/test/mission-profiles dsmil-clang -fdsmil-mission-profile=border_ops border_ops_example.c # Test fuzz export dsmil-clang -fdsmil-fuzz-export cyber_defence_example.c ## References - DSLLVM Roadmap: dsmil/docs/DSLLVM-ROADMAP.md - v1.2 Foundation: fb8fdac (constant-time, quantum, ONNX)
1 parent c9e926b commit d56adaf

File tree

11 files changed

+3450
-0
lines changed

11 files changed

+3450
-0
lines changed

dsmil/config/mission-profiles.json

Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
{
2+
"$schema": "https://dsmil.org/schemas/mission-profiles-v1.json",
3+
"version": "1.3.0",
4+
"description": "DSLLVM Mission Profile Configuration - First-class compile targets for operational context",
5+
"profiles": {
6+
"border_ops": {
7+
"display_name": "Border Operations",
8+
"description": "Border operations: max security, minimal telemetry, no external dependencies",
9+
"classification": "RESTRICTED",
10+
"operational_context": "hostile_environment",
11+
"pipeline": "dsmil-hardened",
12+
"ai_mode": "local",
13+
"sandbox_default": "l8_strict",
14+
"allow_stages": ["quantized", "serve"],
15+
"deny_stages": ["debug", "experimental", "pretrain", "finetune"],
16+
"quantum_export": false,
17+
"ct_enforcement": "strict",
18+
"telemetry_level": "minimal",
19+
"provenance_required": true,
20+
"max_deployment_days": null,
21+
"clearance_floor": "0xFF080000",
22+
"device_whitelist": [0, 1, 2, 3, 30, 31, 32, 33, 47, 50, 53],
23+
"layer_policy": {
24+
"0": {"allowed": true, "roe_required": "LIVE_CONTROL"},
25+
"1": {"allowed": true, "roe_required": "LIVE_CONTROL"},
26+
"2": {"allowed": true, "roe_required": "LIVE_CONTROL"},
27+
"3": {"allowed": true, "roe_required": "CRYPTO_SIGN"},
28+
"4": {"allowed": true, "roe_required": "NETWORK_EGRESS"},
29+
"5": {"allowed": true, "roe_required": "ANALYSIS_ONLY"},
30+
"6": {"allowed": true, "roe_required": "ANALYSIS_ONLY"},
31+
"7": {"allowed": true, "roe_required": "ANALYSIS_ONLY"},
32+
"8": {"allowed": true, "roe_required": "ANALYSIS_ONLY"}
33+
},
34+
"compiler_flags": {
35+
"optimization": "-O3",
36+
"security": ["-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-fPIE"],
37+
"warnings": ["-Wall", "-Wextra", "-Werror"],
38+
"dsmil_specific": [
39+
"-fdsmil-ct-check=strict",
40+
"-fdsmil-layer-check=strict",
41+
"-fdsmil-quantum-hints=false",
42+
"-fdsmil-onnx-cost-model=compact",
43+
"-fdsmil-provenance=full",
44+
"-fdsmil-sandbox-default=l8_strict"
45+
]
46+
},
47+
"runtime_constraints": {
48+
"max_memory_mb": 8192,
49+
"max_cpu_cores": 16,
50+
"network_egress_allowed": false,
51+
"filesystem_write_allowed": false,
52+
"ipc_allowed": true,
53+
"device_access_policy": "whitelist_only"
54+
},
55+
"attestation": {
56+
"required": true,
57+
"algorithm": "ML-DSA-87",
58+
"key_source": "tpm",
59+
"include_mission_profile": true
60+
}
61+
},
62+
"cyber_defence": {
63+
"display_name": "Cyber Defence Operations",
64+
"description": "Cyber defence: AI-enhanced, full telemetry, Layer 8 Security AI enabled",
65+
"classification": "CONFIDENTIAL",
66+
"operational_context": "defensive_operations",
67+
"pipeline": "dsmil-enhanced",
68+
"ai_mode": "hybrid",
69+
"sandbox_default": "l7_llm_worker",
70+
"allow_stages": ["quantized", "serve", "finetune"],
71+
"deny_stages": ["debug", "experimental"],
72+
"quantum_export": true,
73+
"ct_enforcement": "strict",
74+
"telemetry_level": "full",
75+
"provenance_required": true,
76+
"max_deployment_days": 90,
77+
"clearance_floor": "0x07070000",
78+
"device_whitelist": null,
79+
"layer_policy": {
80+
"0": {"allowed": true, "roe_required": "LIVE_CONTROL"},
81+
"1": {"allowed": true, "roe_required": "LIVE_CONTROL"},
82+
"2": {"allowed": true, "roe_required": "LIVE_CONTROL"},
83+
"3": {"allowed": true, "roe_required": "CRYPTO_SIGN"},
84+
"4": {"allowed": true, "roe_required": "NETWORK_EGRESS"},
85+
"5": {"allowed": true, "roe_required": "ANALYSIS_ONLY"},
86+
"6": {"allowed": true, "roe_required": null},
87+
"7": {"allowed": true, "roe_required": "ANALYSIS_ONLY"},
88+
"8": {"allowed": true, "roe_required": "ANALYSIS_ONLY"}
89+
},
90+
"compiler_flags": {
91+
"optimization": "-O3",
92+
"security": ["-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-fPIE"],
93+
"warnings": ["-Wall", "-Wextra"],
94+
"dsmil_specific": [
95+
"-fdsmil-ct-check=strict",
96+
"-fdsmil-layer-check=strict",
97+
"-fdsmil-quantum-hints=true",
98+
"-fdsmil-onnx-cost-model=full",
99+
"-fdsmil-provenance=full",
100+
"-fdsmil-sandbox-default=l7_llm_worker",
101+
"-fdsmil-l8-security-ai=enabled"
102+
]
103+
},
104+
"runtime_constraints": {
105+
"max_memory_mb": 32768,
106+
"max_cpu_cores": 64,
107+
"network_egress_allowed": true,
108+
"filesystem_write_allowed": true,
109+
"ipc_allowed": true,
110+
"device_access_policy": "default_deny"
111+
},
112+
"attestation": {
113+
"required": true,
114+
"algorithm": "ML-DSA-87",
115+
"key_source": "tpm",
116+
"include_mission_profile": true
117+
},
118+
"ai_config": {
119+
"l5_performance_advisor": true,
120+
"l7_llm_assist": true,
121+
"l8_security_ai": true,
122+
"l8_adversarial_defense": true
123+
}
124+
},
125+
"exercise_only": {
126+
"display_name": "Exercise/Training Operations",
127+
"description": "Training exercises: relaxed constraints, verbose logging, simulation mode",
128+
"classification": "UNCLASSIFIED",
129+
"operational_context": "training_simulation",
130+
"pipeline": "dsmil-standard",
131+
"ai_mode": "cloud",
132+
"sandbox_default": "l7_standard",
133+
"allow_stages": ["quantized", "serve", "finetune", "debug"],
134+
"deny_stages": ["experimental"],
135+
"quantum_export": true,
136+
"ct_enforcement": "relaxed",
137+
"telemetry_level": "verbose",
138+
"provenance_required": true,
139+
"max_deployment_days": 30,
140+
"clearance_floor": "0x00000000",
141+
"device_whitelist": null,
142+
"layer_policy": {
143+
"0": {"allowed": true, "roe_required": null},
144+
"1": {"allowed": true, "roe_required": null},
145+
"2": {"allowed": true, "roe_required": null},
146+
"3": {"allowed": true, "roe_required": null},
147+
"4": {"allowed": true, "roe_required": null},
148+
"5": {"allowed": true, "roe_required": null},
149+
"6": {"allowed": true, "roe_required": null},
150+
"7": {"allowed": true, "roe_required": null},
151+
"8": {"allowed": true, "roe_required": null}
152+
},
153+
"compiler_flags": {
154+
"optimization": "-O2",
155+
"security": ["-fstack-protector"],
156+
"warnings": ["-Wall"],
157+
"dsmil_specific": [
158+
"-fdsmil-ct-check=relaxed",
159+
"-fdsmil-layer-check=warn",
160+
"-fdsmil-quantum-hints=true",
161+
"-fdsmil-onnx-cost-model=full",
162+
"-fdsmil-provenance=basic",
163+
"-fdsmil-sandbox-default=l7_standard"
164+
]
165+
},
166+
"runtime_constraints": {
167+
"max_memory_mb": 16384,
168+
"max_cpu_cores": 32,
169+
"network_egress_allowed": true,
170+
"filesystem_write_allowed": true,
171+
"ipc_allowed": true,
172+
"device_access_policy": "permissive"
173+
},
174+
"attestation": {
175+
"required": false,
176+
"algorithm": "ML-DSA-65",
177+
"key_source": "software",
178+
"include_mission_profile": true
179+
},
180+
"simulation": {
181+
"enabled": true,
182+
"blue_team_mode": true,
183+
"red_team_mode": true,
184+
"inject_faults": true
185+
}
186+
},
187+
"lab_research": {
188+
"display_name": "Laboratory Research",
189+
"description": "Lab research: experimental features enabled, no production constraints",
190+
"classification": "UNCLASSIFIED",
191+
"operational_context": "research_development",
192+
"pipeline": "dsmil-permissive",
193+
"ai_mode": "cloud",
194+
"sandbox_default": null,
195+
"allow_stages": ["quantized", "serve", "finetune", "debug", "experimental", "pretrain", "distilled"],
196+
"deny_stages": [],
197+
"quantum_export": true,
198+
"ct_enforcement": "disabled",
199+
"telemetry_level": "verbose",
200+
"provenance_required": false,
201+
"max_deployment_days": null,
202+
"clearance_floor": "0x00000000",
203+
"device_whitelist": null,
204+
"layer_policy": {
205+
"0": {"allowed": true, "roe_required": null},
206+
"1": {"allowed": true, "roe_required": null},
207+
"2": {"allowed": true, "roe_required": null},
208+
"3": {"allowed": true, "roe_required": null},
209+
"4": {"allowed": true, "roe_required": null},
210+
"5": {"allowed": true, "roe_required": null},
211+
"6": {"allowed": true, "roe_required": null},
212+
"7": {"allowed": true, "roe_required": null},
213+
"8": {"allowed": true, "roe_required": null}
214+
},
215+
"compiler_flags": {
216+
"optimization": "-O0",
217+
"security": [],
218+
"warnings": ["-Wall"],
219+
"dsmil_specific": [
220+
"-fdsmil-ct-check=disabled",
221+
"-fdsmil-layer-check=disabled",
222+
"-fdsmil-quantum-hints=true",
223+
"-fdsmil-onnx-cost-model=full",
224+
"-fdsmil-provenance=disabled"
225+
]
226+
},
227+
"runtime_constraints": {
228+
"max_memory_mb": null,
229+
"max_cpu_cores": null,
230+
"network_egress_allowed": true,
231+
"filesystem_write_allowed": true,
232+
"ipc_allowed": true,
233+
"device_access_policy": "permissive"
234+
},
235+
"attestation": {
236+
"required": false,
237+
"algorithm": null,
238+
"key_source": null,
239+
"include_mission_profile": false
240+
},
241+
"experimental_features": {
242+
"rl_loop": true,
243+
"quantum_offload": true,
244+
"custom_passes": true,
245+
"unsafe_optimizations": true
246+
}
247+
}
248+
},
249+
"validation": {
250+
"schema_version": "1.3.0",
251+
"supported_pipelines": ["dsmil-hardened", "dsmil-enhanced", "dsmil-standard", "dsmil-permissive"],
252+
"supported_ai_modes": ["local", "hybrid", "cloud", "disabled"],
253+
"supported_ct_enforcement": ["strict", "relaxed", "disabled"],
254+
"supported_telemetry_levels": ["minimal", "standard", "full", "verbose"],
255+
"supported_roe_policies": ["ANALYSIS_ONLY", "LIVE_CONTROL", "NETWORK_EGRESS", "CRYPTO_SIGN", "ADMIN_OVERRIDE"]
256+
},
257+
"metadata": {
258+
"created": "2026-01-01T00:00:00Z",
259+
"last_modified": "2026-01-01T00:00:00Z",
260+
"author": "DSLLVM Toolchain Team",
261+
"version_compatibility": "DSLLVM >= 1.3.0",
262+
"documentation": "https://dsmil.org/docs/mission-profiles"
263+
}
264+
}

0 commit comments

Comments
 (0)