pub struct HookAnalyzer;Expand description
Fast analyzer for hook events.
Implementations§
Source§impl HookAnalyzer
impl HookAnalyzer
Sourcepub fn analyze_bash(input: &BashInput) -> Vec<HookFinding>
pub fn analyze_bash(input: &BashInput) -> Vec<HookFinding>
Analyze a Bash command for security issues. Returns a list of findings.
Sourcepub fn analyze_bash_with_trusted_domains(
input: &BashInput,
use_trusted_domains: bool,
) -> Vec<HookFinding>
pub fn analyze_bash_with_trusted_domains( input: &BashInput, use_trusted_domains: bool, ) -> Vec<HookFinding>
Analyze a Bash command with optional trusted domain checking.
If use_trusted_domains is false, all curl|sh patterns are flagged (strict mode).
Sourcepub fn analyze_write(input: &WriteInput) -> Vec<HookFinding>
pub fn analyze_write(input: &WriteInput) -> Vec<HookFinding>
Analyze a file write operation for security issues.
Sourcepub fn analyze_edit(input: &EditInput) -> Vec<HookFinding>
pub fn analyze_edit(input: &EditInput) -> Vec<HookFinding>
Analyze a file edit operation for security issues.
Sourcepub fn analyze_output_for_secrets(output: &str) -> Vec<HookFinding>
pub fn analyze_output_for_secrets(output: &str) -> Vec<HookFinding>
Analyze tool output for secret leaks (for PostToolUse).
Sourcepub fn get_most_severe(findings: &[HookFinding]) -> Option<&HookFinding>
pub fn get_most_severe(findings: &[HookFinding]) -> Option<&HookFinding>
Get the most severe finding from a list.
Auto Trait Implementations§
impl Freeze for HookAnalyzer
impl RefUnwindSafe for HookAnalyzer
impl Send for HookAnalyzer
impl Sync for HookAnalyzer
impl Unpin for HookAnalyzer
impl UnwindSafe for HookAnalyzer
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