pub struct Scanner { /* private fields */ }Expand description
Main scanner orchestrator
Implementations§
Source§impl Scanner
impl Scanner
Sourcepub fn new(config: ScanConfig) -> Result<Self>
pub fn new(config: ScanConfig) -> Result<Self>
Create a new scanner with the given configuration
Sourcepub fn discover_files(&mut self) -> Result<(Vec<PathBuf>, usize)>
pub fn discover_files(&mut self) -> Result<(Vec<PathBuf>, usize)>
Discover files to scan based on include/exclude patterns Returns (files_to_scan, files_skipped)
Sourcepub fn detect_frameworks(&self, files: &[PathBuf]) -> Result<Vec<String>>
pub fn detect_frameworks(&self, files: &[PathBuf]) -> Result<Vec<String>>
Detect AI agent frameworks in the codebase
Sourcepub fn extract_all(
&mut self,
files: &[PathBuf],
frameworks: &[String],
files_skipped: usize,
) -> Result<ScanResult>
pub fn extract_all( &mut self, files: &[PathBuf], frameworks: &[String], files_skipped: usize, ) -> Result<ScanResult>
Extract assets from all files using appropriate extractors
Sourcepub fn build_call_graph(&self, results: &ScanResult) -> Result<CallGraph>
pub fn build_call_graph(&self, results: &ScanResult) -> Result<CallGraph>
Build call graph from extracted assets
Sourcepub fn analyze_trust_boundaries(
&self,
results: &ScanResult,
) -> Result<Vec<TrustBoundary>>
pub fn analyze_trust_boundaries( &self, results: &ScanResult, ) -> Result<Vec<TrustBoundary>>
Analyze trust boundaries using Meta’s Rule of Two
Sourcepub fn generate_schema(
&self,
results: &ScanResult,
boundaries: &[TrustBoundary],
) -> Result<ScanResult>
pub fn generate_schema( &self, results: &ScanResult, boundaries: &[TrustBoundary], ) -> Result<ScanResult>
Generate final schema with all analysis results
Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnwindSafe for Scanner
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