Add bxctl audit verify

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
This commit is contained in:
2026-09-21 01:35:08 -07:00
parent 56e5363109
commit 2408e2c622
4 changed files with 283 additions and 4 deletions
+13 -3
View File
@@ -36,9 +36,19 @@ fn main() -> ExitCode {
reason,
} => exit(|| cmd_refuse(&admin_socket, approval, reason.as_deref())),
Command::GrantsCheck { admin_socket } => exit(|| cmd_grants_check(&admin_socket)),
Command::AuditVerify { home: _ } => {
eprintln!("bxctl: audit verify is not implemented yet");
ExitCode::from(1)
Command::AuditVerify { home } => {
let mut out = std::io::stdout().lock();
match bxctl::verify::run(&home, &mut out) {
Ok(true) => ExitCode::SUCCESS,
Ok(false) => ExitCode::from(1),
Err(e) => {
eprintln!(
"bxctl: cannot read the audit log under {}: {e}",
home.display()
);
ExitCode::from(1)
}
}
}
}
}