pub struct SecurityEngine { /* private fields */ }Expand description
The security engine drives all vulnerability analysis.
Implementations§
Source§impl SecurityEngine
impl SecurityEngine
Sourcepub fn new(
config: &ProjectConfig,
plugin_registry: &PluginRegistry,
) -> Result<Self, ForgeGuardError>
pub fn new( config: &ProjectConfig, plugin_registry: &PluginRegistry, ) -> Result<Self, ForgeGuardError>
Create a new security engine with the given configuration.
Sourcepub fn analyze_files(
&self,
files: &[PathBuf],
_chain_registry: &ChainRegistry,
) -> Result<Vec<Finding>, ForgeGuardError>
pub fn analyze_files( &self, files: &[PathBuf], _chain_registry: &ChainRegistry, ) -> Result<Vec<Finding>, ForgeGuardError>
Analyze a set of Solidity source files and return findings. Includes findings from registered plugins (both built-in and external).
Sourcepub fn analyze_files_quick(
&self,
files: &[PathBuf],
_chain_registry: &ChainRegistry,
) -> Result<Vec<Finding>, ForgeGuardError>
pub fn analyze_files_quick( &self, files: &[PathBuf], _chain_registry: &ChainRegistry, ) -> Result<Vec<Finding>, ForgeGuardError>
Analyze a set of Solidity source files in quick mode. Skips parser-heavy checks (reentrancy, access control) and only runs pattern-based HIGH/CRITICAL checks for lightning-fast results. Plugins are also skipped in quick mode.
Sourcepub fn calculate_scores(&self, findings: &[Finding]) -> SecurityScores
pub fn calculate_scores(&self, findings: &[Finding]) -> SecurityScores
Calculate security scores based on findings.
Trait Implementations§
Source§impl Clone for SecurityEngine
impl Clone for SecurityEngine
Source§fn clone(&self) -> SecurityEngine
fn clone(&self) -> SecurityEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SecurityEngine
impl !UnwindSafe for SecurityEngine
impl Freeze for SecurityEngine
impl Send for SecurityEngine
impl Sync for SecurityEngine
impl Unpin for SecurityEngine
impl UnsafeUnpin for SecurityEngine
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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