pub struct PolicyGenerator { /* private fields */ }Implementations§
Source§impl PolicyGenerator
impl PolicyGenerator
pub fn generate_context_policies(&self) -> Vec<ContextPolicy>
Source§impl PolicyGenerator
impl PolicyGenerator
Sourcepub fn skill_name(&self) -> &str
pub fn skill_name(&self) -> &str
The name of the skill being analyzed.
Sourcepub fn skill_path(&self) -> &str
pub fn skill_path(&self) -> &str
Path to the primary skill artifact.
Sourcepub fn primary_artifact_kind(&self) -> ArtifactKind
pub fn primary_artifact_kind(&self) -> ArtifactKind
The artifact kind of the primary entrypoint.
Sourcepub fn extension_kind(&self) -> AgentExtensionKind
pub fn extension_kind(&self) -> AgentExtensionKind
The extension kind (Skill, AgentInstruction, etc.).
Sourcepub fn classification(&self) -> ArtifactClassification
pub fn classification(&self) -> ArtifactClassification
The artifact classification result.
Sourcepub fn package_id(&self) -> Option<&str>
pub fn package_id(&self) -> Option<&str>
Optional package identifier.
Sourcepub fn identity_source(&self) -> ArtifactIdentitySource
pub fn identity_source(&self) -> ArtifactIdentitySource
How the artifact identity was determined.
Sourcepub fn structural_validity(&self) -> StructuralValidity
pub fn structural_validity(&self) -> StructuralValidity
Structural validity of the analyzed artifact.
Sourcepub fn heuristic_score(&self) -> u8
pub fn heuristic_score(&self) -> u8
Heuristic score assigned during analysis.
Sourcepub fn artifact_graph(&self) -> &ArtifactGraph
pub fn artifact_graph(&self) -> &ArtifactGraph
The artifact dependency/capability graph.
Sourcepub fn profile(&self) -> Option<PolicyProfile>
pub fn profile(&self) -> Option<PolicyProfile>
The active policy profile, if any.
Sourcepub fn policy(&self) -> Option<&PolicyFile>
pub fn policy(&self) -> Option<&PolicyFile>
The loaded policy file, if any.
Sourcepub fn suppression_summary(&self) -> &SuppressionSummary
pub fn suppression_summary(&self) -> &SuppressionSummary
Summary of suppressed findings.
Sourcepub fn policy_audit(&self) -> &PolicyAudit
pub fn policy_audit(&self) -> &PolicyAudit
The policy audit trail.
Sourcepub fn verdict_report(&self) -> Option<&PackageVerdictReport>
pub fn verdict_report(&self) -> Option<&PackageVerdictReport>
Pre-computed verdict report, if available.
pub fn new( skill_name: impl Into<String>, skill_path: impl Into<String>, findings: Vec<Finding>, artifact_graph: ArtifactGraph, ) -> Self
pub fn with_primary_artifact_kind(self, artifact_kind: ArtifactKind) -> Self
pub fn with_profile(self, profile: PolicyProfile) -> Self
pub fn with_extension_kind(self, extension_kind: AgentExtensionKind) -> Self
pub fn with_classification(self, classification: ArtifactClassification) -> Self
pub fn with_package_id(self, package_id: Option<String>) -> Self
pub fn with_identity_source( self, identity_source: ArtifactIdentitySource, ) -> Self
pub fn with_structural_validity( self, structural_validity: StructuralValidity, ) -> Self
pub fn with_heuristic_score(self, heuristic_score: u8) -> Self
pub fn with_policy(self, policy: PolicyFile) -> Self
pub fn with_suppression_summary( self, suppression_summary: SuppressionSummary, ) -> Self
pub fn with_policy_audit(self, policy_audit: PolicyAudit) -> Self
pub fn with_verdict_report(self, verdict_report: PackageVerdictReport) -> Self
pub fn generate_shield_md(&self) -> String
pub fn generate_json(&self) -> JsonReport
pub fn generate_sarif(&self) -> SarifReport
Auto Trait Implementations§
impl Freeze for PolicyGenerator
impl RefUnwindSafe for PolicyGenerator
impl Send for PolicyGenerator
impl Sync for PolicyGenerator
impl Unpin for PolicyGenerator
impl UnsafeUnpin for PolicyGenerator
impl UnwindSafe for PolicyGenerator
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