Skip to main content

Cli

Struct Cli 

Source
pub struct Cli {
Show 32 fields pub paths: Vec<PathBuf>, pub format: OutputFormat, pub strict: bool, pub scan_type: ScanType, pub recursive: bool, pub ci: bool, pub verbose: bool, pub include_tests: bool, pub include_node_modules: bool, pub include_vendor: bool, pub min_confidence: Confidence, pub skip_comments: bool, pub fix_hint: bool, pub watch: bool, pub init_hook: bool, pub remove_hook: bool, pub malware_db: Option<PathBuf>, pub no_malware_scan: bool, pub custom_rules: Option<PathBuf>, pub baseline: bool, pub check_drift: bool, pub init: bool, pub output: Option<PathBuf>, pub save_baseline: Option<PathBuf>, pub baseline_file: Option<PathBuf>, pub compare: Option<Vec<PathBuf>>, pub fix: bool, pub fix_dry_run: bool, pub mcp_server: bool, pub deep_scan: bool, pub profile: Option<String>, pub save_profile: Option<String>,
}

Fields§

§paths: Vec<PathBuf>

Paths to scan (files or directories)

§format: OutputFormat

Output format

§strict: bool

Strict mode: show medium/low severity findings and treat warnings as errors

§scan_type: ScanType

Scan type

§recursive: bool

Recursive scan

§ci: bool

CI mode: non-interactive output

§verbose: bool

Verbose output

§include_tests: bool

Include test directories (tests/, spec/, tests, etc.) in scan

§include_node_modules: bool

Include node_modules directories in scan

§include_vendor: bool

Include vendor directories (vendor/, third_party/) in scan

§min_confidence: Confidence

Minimum confidence level for findings to be reported

§skip_comments: bool

Skip comment lines when scanning (lines starting with #, //, –, etc.)

§fix_hint: bool

Show fix hints in terminal output

§watch: bool

Watch mode: continuously monitor files for changes and re-scan

§init_hook: bool

Install cc-audit pre-commit hook in the git repository

§remove_hook: bool

Remove cc-audit pre-commit hook from the git repository

§malware_db: Option<PathBuf>

Path to a custom malware signatures database (JSON)

§no_malware_scan: bool

Disable malware signature scanning

§custom_rules: Option<PathBuf>

Path to a custom rules file (YAML format)

§baseline: bool

Create a baseline snapshot for drift detection (rug pull prevention)

§check_drift: bool

Check for drift against saved baseline

§init: bool

Generate a default configuration file template

§output: Option<PathBuf>

Output file path (for HTML/JSON output)

§save_baseline: Option<PathBuf>

Save baseline to specified file

§baseline_file: Option<PathBuf>

Compare against baseline file (show only new findings)

§compare: Option<Vec<PathBuf>>

Compare two paths and show differences

§fix: bool

Auto-fix issues (where possible)

§fix_dry_run: bool

Preview auto-fix changes without applying them

§mcp_server: bool

Run as MCP server

§deep_scan: bool

Enable deep scan with deobfuscation

§profile: Option<String>

Load settings from a named profile

§save_profile: Option<String>

Save current settings as a named profile

Trait Implementations§

Source§

impl Args for Cli

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl CommandFactory for Cli

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for Cli

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Cli

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Cli

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Cli

§

impl RefUnwindSafe for Cli

§

impl Send for Cli

§

impl Sync for Cli

§

impl Unpin for Cli

§

impl UnwindSafe for Cli

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.