diff --git a/README.md b/README.md index 1606aab..cfebfb8 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,48 @@ cargo run --release -- -d /home/foobar/Desktop/guac-rs -t 1 Ignore scanning the code on tests directory ```shell -cargo run --release -- -d /home/heliofrota/Desktop/tc/guac-rs/ -i tests +cargo run --release -- -d /home/foobar/Desktop/guac-rs/ -i tests + +or multiple dirs + +cargo run --release -- -d /home/foobar/Desktop/guac-rs/ -i tests,semantic ``` [Example](./out.md) + +> [!CAUTION] +> ____ ____ + +#### Threshold too low makes things pretty wild + +cargo run --release -- -d /home/foobar/Desktop/guac-rs/ **-t 0.5** + +``` +### 🦀 14075 + +```rust + let _result = client + .intrinsic() + .ingest_vulnerability(&VulnerabilityInputSpec { + r#type: "test-vuln".to_string(), + vulnerability_id: "ghsa-osv-cve-44".to_string(), + }) + .await?; +``` + +`guac-rs/lib/tests/vulnerability.rs` + +```rust + assert_eq!(1, result.len()); + assert_eq!("test-vuln".to_string(), result[0].r#type); + assert_eq!( + "ghsa-osv-cve-44".to_string(), + result[0].vulnerability_ids[0].vulnerability_id + ); +``` + +`guac-rs/lib/tests/vulnerability.rs` +``` + +`guac-rs/lib/src/client/intrinsic/vulnerability/query.rs` +``` diff --git a/src/main.rs b/src/main.rs index 70d3192..a7a0a7d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,7 @@ struct Cli { #[arg(short, value_name = "threshold", default_value_t = 0.98)] t: f64, /// Ignores scanning with the provided dir name - #[arg(short, value_name = "ignore")] + #[arg(short, value_name = "ignore", default_value_t = String::from("duplicrabs"))] i: String, } diff --git a/src/test.rs b/src/test.rs index 0c8a991..f5cbe2c 100644 --- a/src/test.rs +++ b/src/test.rs @@ -3,7 +3,7 @@ mod tests { use crate::util; fn get_code_blocks() -> Vec { - let files = util::rust_files(".", "test").expect("rust files not found."); + let files = util::rust_files(".", "duplicrabs").expect("rust files not found."); let path_as_str = files[0].to_string_lossy(); let content = util::read_file_content(&path_as_str); util::code_blocks(content.unwrap().as_str())