feat(oscal): live assessment endpoint POST /api/v1/oscal/assess (#212)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 2s
CI / Deploy Docs (push) Skipped
CI / Deploy Agent (push) Successful in 3m43s
CI / Deploy Dashboard (push) Successful in 2m36s
CI / Deploy MCP (push) Successful in 1m48s

This commit was merged in pull request #212.
This commit is contained in:
2026-07-20 19:13:47 +00:00
parent ca4e31cb65
commit 5285fb67ae
7 changed files with 133 additions and 1 deletions
+13 -1
View File
@@ -1,4 +1,4 @@
use compliance_core::config::PlcRuntimeConfig;
use compliance_core::config::{BreakpilotConfig, PlcRuntimeConfig};
use compliance_core::AgentConfig;
use secrecy::SecretString;
@@ -66,6 +66,7 @@ pub fn load_config() -> Result<AgentConfig, AgentError> {
tenant_registry_url: env_var_opt("TENANT_REGISTRY_URL"),
plc_runtime: load_plc_runtime_config(),
werkbank_runner_token: env_secret_opt("WERKBANK_RUNNER_TOKEN"),
breakpilot: load_breakpilot_config(),
})
}
@@ -90,3 +91,14 @@ fn load_plc_runtime_config() -> PlcRuntimeConfig {
.unwrap_or(d.openplc_password),
}
}
/// Assemble the breakpilot OSCAL-catalog source from env, defaulting the snapshot
/// directory. A missing `BREAKPILOT_BASE_URL` leaves the controls provider off.
fn load_breakpilot_config() -> BreakpilotConfig {
let d = BreakpilotConfig::default();
BreakpilotConfig {
base_url: env_var_opt("BREAKPILOT_BASE_URL"),
token: env_secret_opt("BREAKPILOT_TOKEN"),
snapshot_dir: env_var_opt("BREAKPILOT_SNAPSHOT_DIR").unwrap_or(d.snapshot_dir),
}
}