keyhog 0.5.38

keyhog: detects leaked credentials in source trees, git history, and cloud storage
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! CLI must reject scan of non-existent path with non-zero exit.

use std::process::Command;

#[test]
fn scan_missing_path_exits_non_zero() {
    let bin = env!("CARGO_BIN_EXE_keyhog");
    let out = Command::new(bin)
        .args(["scan", "/nonexistent/keyhog-missing-path-xyzzy"])
        .output()
        .expect("spawn keyhog scan");
    assert_ne!(
        out.status.code(),
        Some(0),
        "scan of missing path must not exit 0; stderr={}",
        String::from_utf8_lossy(&out.stderr)
    );
}