- corpus_check_with_base(): accepts explicit base directory - corpus_check(): still defaults to /opt/substrate/corpus - Improved corpus test with actual Allowed/Denied assertions - Updated bascule-dev.toml with [gsap] section and shell_command Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
646 B
Rust
21 lines
646 B
Rust
pub mod ac;
|
|
pub mod classifier;
|
|
pub mod config;
|
|
pub mod corpus;
|
|
pub mod cr;
|
|
pub mod registry;
|
|
pub mod session;
|
|
|
|
pub use ac::{AcValidationError, AuthorizationContext};
|
|
pub use classifier::{classify_command, CommandClass, FREE_COMMANDS};
|
|
pub use config::GshConfig;
|
|
pub use corpus::{corpus_check, corpus_check_with_base, CorpusCheckResult, DEFAULT_CORPUS_BASE};
|
|
pub use cr::{post_cr, CrResult};
|
|
pub use registry::ConsumedRegistry;
|
|
pub use session::SessionState;
|
|
|
|
/// Compute SHA-256 hash with "sha256:" prefix.
|
|
pub fn sha256_hash(data: &[u8]) -> String {
|
|
use sha2::{Digest, Sha256};
|
|
format!("sha256:{}", hex::encode(Sha256::digest(data)))
|
|
}
|