mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
Phase 1 (#33)
* chore: Exclude CLAUDE.md from Cargo.toml * feat: add callgraph module and integrate into main analysis flow * feat: enhance CLI with new severity filtering and analysis modes * feat: update CHANGELOG with recent enhancements and fixes to severity filtering and output handling * feat: implement state-model dataflow analysis for resource lifecycle and auth state * feat: enhance diagnostic output formatting and add evidence structure * feat: implement attack surface ranking for diagnostics with scoring and sorting * feat: add comprehensive documentation for installation, usage, and rules reference * feat: add multiple language support for command execution and evaluation endpoints * feat: implement inline suppression for findings using `nyx:ignore` comments * feat: add confidence levels to AST patterns and update output structure * feat: implement low-noise prioritization system with category filtering, rollup grouping, and configurable budgets * feat: bump version to 0.4.0 and update changelog with new features and improvements * feat: add dead code allowances to various functions in mod.rs and real_world_tests.rs
This commit is contained in:
parent
19b578c5c4
commit
1bbe4b1cfb
456 changed files with 25628 additions and 1228 deletions
16
src/main.rs
16
src/main.rs
|
|
@ -1,15 +1,21 @@
|
|||
mod ast;
|
||||
mod callgraph;
|
||||
mod cfg;
|
||||
mod cfg_analysis;
|
||||
mod cli;
|
||||
mod commands;
|
||||
mod database;
|
||||
mod errors;
|
||||
mod evidence;
|
||||
mod fmt;
|
||||
mod interop;
|
||||
mod labels;
|
||||
mod output;
|
||||
mod patterns;
|
||||
mod rank;
|
||||
mod state;
|
||||
mod summary;
|
||||
mod suppress;
|
||||
mod symbol;
|
||||
mod taint;
|
||||
mod utils;
|
||||
|
|
@ -25,7 +31,7 @@ use std::fs;
|
|||
use std::time::Instant;
|
||||
use tracing_subscriber::fmt::time;
|
||||
use tracing_subscriber::prelude::*;
|
||||
use tracing_subscriber::{EnvFilter, Registry, fmt};
|
||||
use tracing_subscriber::{EnvFilter, Registry, fmt as tracing_fmt};
|
||||
// use tracing_appender::rolling::{RollingFileAppender, Rotation};
|
||||
// use tracing_appender::non_blocking;
|
||||
|
||||
|
|
@ -33,7 +39,7 @@ fn init_tracing() {
|
|||
// let file_appender = RollingFileAppender::new(Rotation::HOURLY, "logs", "nyx-scanner.log");
|
||||
// let (file_writer, guard) = non_blocking(file_appender);
|
||||
|
||||
let fmt_layer = fmt::layer()
|
||||
let fmt_layer = tracing_fmt::layer()
|
||||
.pretty()
|
||||
.with_thread_ids(true)
|
||||
.with_timer(time::UtcTime::rfc_3339());
|
||||
|
|
@ -56,8 +62,8 @@ fn main() -> NyxResult<()> {
|
|||
tracing::debug!("CLI starting up");
|
||||
let cli = Cli::parse();
|
||||
|
||||
let proj_dirs = ProjectDirs::from("dev", "ecpeter23", "nyx")
|
||||
.ok_or("Unable to determine project directories")?;
|
||||
let proj_dirs =
|
||||
ProjectDirs::from("", "", "nyx").ok_or("Unable to determine project directories")?;
|
||||
|
||||
// todo: check if we want to actually build a config file, maybe some environments will not want to have anything written
|
||||
let config_dir = proj_dirs.config_dir();
|
||||
|
|
@ -83,7 +89,7 @@ fn main() -> NyxResult<()> {
|
|||
commands::handle_command(cli.command, database_dir, config_dir, &mut config)?;
|
||||
|
||||
if !quiet {
|
||||
println!(
|
||||
eprintln!(
|
||||
"{} in {:.3}s.",
|
||||
style("Finished").green().bold(),
|
||||
now.elapsed().as_secs_f32()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue