mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
Feat/configurable sanitizers and js precision (#32)
* chore: Exclude CLAUDE.md from Cargo.toml * feat: Add configurable analysis rules and CLI commands for custom sanitizers and terminators * feat: Enhance resource management and analysis efficiency - Implemented parallel summary merging in `scan_filesystem` using rayon for improved performance. - Introduced `GlobalSummaries::merge()` for efficient merging of summaries. - Optimized file reading and hashing to eliminate redundant I/O operations. - Added `should_scan_with_hash()` and `upsert_file_with_hash()` methods to streamline file processing. - Enhanced taint analysis with in-place mutations to reduce memory allocations. - Updated resource acquisition patterns to exclude false positives for `freopen` and wrapper functions. * feat: Implement severity downgrade for findings in non-production paths and add source kind inference * feat: Update versioning information in SECURITY.md for new stable line * feat: Update categories in Cargo.toml to include parser-implementations and text-processing * feat: Update dependencies in Cargo.lock for improved compatibility and performance * feat: Update dependencies in Cargo.lock and Cargo.toml for improved compatibility
This commit is contained in:
parent
f96a89e7c1
commit
19b578c5c4
37 changed files with 3775 additions and 432 deletions
24
src/main.rs
24
src/main.rs
|
|
@ -7,6 +7,7 @@ mod database;
|
|||
mod errors;
|
||||
mod interop;
|
||||
mod labels;
|
||||
mod output;
|
||||
mod patterns;
|
||||
mod summary;
|
||||
mod symbol;
|
||||
|
|
@ -65,19 +66,28 @@ fn main() -> NyxResult<()> {
|
|||
let database_dir = proj_dirs.data_local_dir();
|
||||
fs::create_dir_all(database_dir)?;
|
||||
|
||||
let mut config = Config::load(config_dir)?;
|
||||
let (mut config, config_note) = Config::load(config_dir)?;
|
||||
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.stack_size(config.performance.rayon_thread_stack_size)
|
||||
.build_global()
|
||||
.expect("set rayon stack size");
|
||||
|
||||
commands::handle_command(cli.command, database_dir, &mut config)?;
|
||||
let quiet = config.output.quiet || cli.command.is_structured_output();
|
||||
|
||||
println!(
|
||||
"{} in {:.3}s.",
|
||||
style("Finished").green().bold(),
|
||||
now.elapsed().as_secs_f32()
|
||||
);
|
||||
// Print config note before scanning (human-readable mode only).
|
||||
if let Some(note) = config_note.filter(|_| !quiet) {
|
||||
eprint!("{note}");
|
||||
}
|
||||
|
||||
commands::handle_command(cli.command, database_dir, config_dir, &mut config)?;
|
||||
|
||||
if !quiet {
|
||||
println!(
|
||||
"{} in {:.3}s.",
|
||||
style("Finished").green().bold(),
|
||||
now.elapsed().as_secs_f32()
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue