pub struct AttackPlanner { /* private fields */ }Expand description
Deterministic utility planner for declarative attack actions.
Implementations§
Source§impl AttackPlanner
impl AttackPlanner
Sourcepub fn register(
&mut self,
action: AttackAction,
) -> Result<PlannerWrite, PlannerError>
pub fn register( &mut self, action: AttackAction, ) -> Result<PlannerWrite, PlannerError>
Registers an idempotent action definition.
Sourcepub fn action(&self, action_id: &str) -> Option<&AttackAction>
pub fn action(&self, action_id: &str) -> Option<&AttackAction>
Returns a registered action definition by stable identity.
Sourcepub fn plan(
&self,
knowledge: &KnowledgeBase,
subject: &EntityId,
context: PlanningContext,
) -> Result<AttackPlan, PlannerError>
pub fn plan( &self, knowledge: &KnowledgeBase, subject: &EntityId, context: PlanningContext, ) -> Result<AttackPlan, PlannerError>
Produces a plan from one internally consistent knowledge snapshot.
Sourcepub fn plan_with_suppressed(
&self,
knowledge: &KnowledgeBase,
subject: &EntityId,
context: PlanningContext,
suppressed_actions: &BTreeSet<String>,
) -> Result<AttackPlan, PlannerError>
pub fn plan_with_suppressed( &self, knowledge: &KnowledgeBase, subject: &EntityId, context: PlanningContext, suppressed_actions: &BTreeSet<String>, ) -> Result<AttackPlan, PlannerError>
Produces a plan while excluding actions suppressed by adaptive policy.
Sourcepub fn plan_snapshot(
&self,
snapshot: &KnowledgeSnapshot,
context: PlanningContext,
) -> Result<AttackPlan, PlannerError>
pub fn plan_snapshot( &self, snapshot: &KnowledgeSnapshot, context: PlanningContext, ) -> Result<AttackPlan, PlannerError>
Produces a plan from an explicit immutable snapshot.
Sourcepub fn plan_snapshot_with_suppressed(
&self,
snapshot: &KnowledgeSnapshot,
context: PlanningContext,
suppressed_actions: &BTreeSet<String>,
) -> Result<AttackPlan, PlannerError>
pub fn plan_snapshot_with_suppressed( &self, snapshot: &KnowledgeSnapshot, context: PlanningContext, suppressed_actions: &BTreeSet<String>, ) -> Result<AttackPlan, PlannerError>
Produces a plan from a snapshot and an explicit policy suppression set.
Sourcepub fn plan_snapshot_with_defense_suppressed(
&self,
snapshot: &KnowledgeSnapshot,
context: PlanningContext,
policy_suppressed_actions: &BTreeSet<String>,
defense_suppressed_actions: &BTreeSet<String>,
) -> Result<AttackPlan, PlannerError>
pub fn plan_snapshot_with_defense_suppressed( &self, snapshot: &KnowledgeSnapshot, context: PlanningContext, policy_suppressed_actions: &BTreeSet<String>, defense_suppressed_actions: &BTreeSet<String>, ) -> Result<AttackPlan, PlannerError>
Produces a plan distinguishing policy suppression from defense suppression.
A defense-suppressed action is excluded with
ExclusionReason::DefenseSuppressed, never conflated with an adaptive
or operator ExclusionReason::PolicySuppressed. A defense-suppressed
action never becomes a plan step, so it never reaches an executor. The
defense set filters the policy-authorized baseline and cannot refill
budget with a candidate that baseline excluded.
Trait Implementations§
Source§impl Clone for AttackPlanner
impl Clone for AttackPlanner
Source§fn clone(&self) -> AttackPlanner
fn clone(&self) -> AttackPlanner
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more