keyhog 0.5.37

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
//! Contract: `keyhog backend` exits 0 and prints routing info.

use std::path::PathBuf;
use std::process::Command;

fn binary() -> PathBuf {
    PathBuf::from(env!("CARGO_BIN_EXE_keyhog"))
}

#[test]
fn backend_subcommand_exits_zero() {
    let output = Command::new(binary()).arg("backend").output().expect("spawn");
    assert_eq!(output.status.code(), Some(0), "backend must exit 0; stderr={}", String::from_utf8_lossy(&output.stderr));
    let stdout = String::from_utf8_lossy(&output.stdout);
    assert!(stdout.to_lowercase().contains("backend") || stdout.contains("KEYHOG"), "backend output expected routing info; got: {stdout}");
}