pub struct AuthorityGraph {
pub source: PipelineSource,
pub nodes: Vec<Node>,
pub edges: Vec<Edge>,
pub completeness: AuthorityCompleteness,
pub completeness_gaps: Vec<String>,
pub metadata: HashMap<String, String>,
}Expand description
Directed authority graph. Nodes are pipeline elements (steps, secrets, artifacts, identities, images). Edges model authority/data flow.
Fields§
§source: PipelineSource§nodes: Vec<Node>§edges: Vec<Edge>§completeness: AuthorityCompletenessHow complete is this graph? Set by the parser based on what it could resolve.
completeness_gaps: Vec<String>Human-readable reasons why the graph is Partial (if applicable).
metadata: HashMap<String, String>Graph-level metadata set by parsers (e.g. trigger type, platform-specific flags).
Implementations§
Source§impl AuthorityGraph
impl AuthorityGraph
pub fn new(source: PipelineSource) -> Self
Sourcepub fn mark_partial(&mut self, reason: impl Into<String>)
pub fn mark_partial(&mut self, reason: impl Into<String>)
Mark the graph as partially complete with a reason.
Sourcepub fn add_node(
&mut self,
kind: NodeKind,
name: impl Into<String>,
trust_zone: TrustZone,
) -> NodeId
pub fn add_node( &mut self, kind: NodeKind, name: impl Into<String>, trust_zone: TrustZone, ) -> NodeId
Add a node, returns its ID.
Sourcepub fn add_node_with_metadata(
&mut self,
kind: NodeKind,
name: impl Into<String>,
trust_zone: TrustZone,
metadata: HashMap<String, String>,
) -> NodeId
pub fn add_node_with_metadata( &mut self, kind: NodeKind, name: impl Into<String>, trust_zone: TrustZone, metadata: HashMap<String, String>, ) -> NodeId
Add a node with metadata, returns its ID.
Sourcepub fn add_edge(&mut self, from: NodeId, to: NodeId, kind: EdgeKind) -> EdgeId
pub fn add_edge(&mut self, from: NodeId, to: NodeId, kind: EdgeKind) -> EdgeId
Add a directed edge, returns its ID.
Sourcepub fn edges_from(&self, id: NodeId) -> impl Iterator<Item = &Edge>
pub fn edges_from(&self, id: NodeId) -> impl Iterator<Item = &Edge>
Outgoing edges from a node.
All authority-bearing source nodes (Secret + Identity). These are the BFS start set for propagation analysis.
Sourcepub fn nodes_of_kind(&self, kind: NodeKind) -> impl Iterator<Item = &Node>
pub fn nodes_of_kind(&self, kind: NodeKind) -> impl Iterator<Item = &Node>
All nodes of a given kind.
Sourcepub fn nodes_in_zone(&self, zone: TrustZone) -> impl Iterator<Item = &Node>
pub fn nodes_in_zone(&self, zone: TrustZone) -> impl Iterator<Item = &Node>
All nodes in a given trust zone.
Trait Implementations§
Source§impl Clone for AuthorityGraph
impl Clone for AuthorityGraph
Source§fn clone(&self) -> AuthorityGraph
fn clone(&self) -> AuthorityGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthorityGraph
impl Debug for AuthorityGraph
Source§impl<'de> Deserialize<'de> for AuthorityGraph
impl<'de> Deserialize<'de> for AuthorityGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuthorityGraph
impl RefUnwindSafe for AuthorityGraph
impl Send for AuthorityGraph
impl Sync for AuthorityGraph
impl Unpin for AuthorityGraph
impl UnsafeUnpin for AuthorityGraph
impl UnwindSafe for AuthorityGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more