Extracts node IDs from causal paths to generate policy enforcement promotion suggestions based on historical causal impact analysis.
use super::*;
pub(crate) fn promotion_suggestions_for_causal_impact(
contexts: &[EdrPolicyEventHistoryCausalContext],
max_depth: usize,
selected_stage: Option<&str>,
cross_window_hashes: Option<(&str, &str)>,
) -> Vec<EdrPolicyEventHistoryPromotionSuggestion> {
let mut suggestions = Vec::new();
let mut seen = BTreeSet::new();
let selected_stage = selected_stage.unwrap_or("audit").to_string();
let cross_window_impact_hash =
cross_window_hashes.map(|(impact_hash, _)| impact_hash.to_string());
let cross_window_recommendation_hash =
cross_window_hashes.map(|(_, recommendation_hash)| recommendation_hash.to_string());
for context in contexts {
for chain in &context.chains {
if suggestions.len() >= EDR_MAX_POLICY_EVENT_
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key