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 UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more