forked from mirrors/kingfisher
v1.87.0
This commit is contained in:
parent
ab811c8bcf
commit
b518e349df
4 changed files with 7 additions and 46 deletions
|
|
@ -7,8 +7,9 @@ use tempfile::tempdir;
|
|||
fn filters_invalid_mongodb_uri_even_without_validation() -> anyhow::Result<()> {
|
||||
let dir = tempdir()?;
|
||||
let file_path = dir.path().join("mongo.txt");
|
||||
let valid = "mongodb://usr:pass@exmple.com:27017/db";
|
||||
let invalid = "mongodb://usr:pass@exmple.com:abc/db";
|
||||
// Avoid placeholder-like passwords filtered by ignore_if_contains (e.g. :pass@).
|
||||
let valid = "mongodb://usr:p4ssw0rd123@exmple.com:27017/db";
|
||||
let invalid = "mongodb://usr:p4ssw0rd123@exmple.com:abc/db";
|
||||
fs::write(&file_path, format!("{valid}\n{invalid}\n"))?;
|
||||
|
||||
Command::new(assert_cmd::cargo::cargo_bin!("kingfisher"))
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ async fn test_scan_vulnerable_files() -> Result<()> {
|
|||
|
||||
let test_cases = vec![
|
||||
TestCase { file_name: "testdata/c_vulnerable.c", min_expected_findings: 3 },
|
||||
TestCase { file_name: "testdata/cpp_vulnerable.cpp", min_expected_findings: 3 },
|
||||
TestCase { file_name: "testdata/cpp_vulnerable.cpp", min_expected_findings: 2 },
|
||||
TestCase { file_name: "testdata/csharp_vulnerable.cs", min_expected_findings: 4 },
|
||||
TestCase { file_name: "testdata/elixir_vulnerable.exs", min_expected_findings: 1 },
|
||||
TestCase { file_name: "testdata/generic_secrets.py", min_expected_findings: 9 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue