envseal 0.3.10

Write-only secret vault with process-level access control — post-agent secret management
Documentation
//! envseal — sudo can't read your keys.
//!
//! Write-only secret vault with process-level access control,
//! out-of-band GUI approval, and a master key that is sealed to the
//! physical device. Built for a world where AI agents have full
//! shell access to developer machines.
//!
//! # Security Architecture
//!
//! - **Passphrase-protected master key**: Argon2id KDF, GUI-only entry.
//! - **Hardware-sealed master key** ([`vault::hardware`]): outer wrap by
//!   Windows DPAPI, macOS Secure Enclave, or Linux TPM 2.0. A copy of
//!   `master.key` does not decrypt on any other machine.
//! - **Memory hardening**: `memfd_secret` on Linux 5.14+, `mlock` +
//!   `prctl(PR_SET_DUMPABLE, 0)` everywhere else, `VirtualLock` on
//!   Windows, zeroize on drop.
//! - **Environment sanitization**: `LD_PRELOAD`/`LD_AUDIT`/`PYTHONPATH`/
//!   `NODE_OPTIONS` detection at every boundary.
//! - **Binary integrity** ([`policy::rules`]): SHA-256 hash verification
//!   before injection, argv-fingerprint binding so an `Allow Always`
//!   for `wrangler deploy` doesn't extend to `wrangler --shell evil`.
//! - **Policy signing**: HMAC-SHA256 tamper detection on `policy.toml`.
//! - **Sandbox tiers** ([`sandbox`]): None / Hardened / Lockdown across
//!   Linux namespaces, macOS SBPL, Windows Job Objects (latter via
//!   pre-spawn `CREATE_SUSPENDED` + `NtResumeProcess` so the child is
//!   born inside the job).
//! - **Out-of-band approval** ([`gui`]): GUI popup or paired-device
//!   relay; relay-required mode fails closed if relay is unavailable.
//! - **Developer-migration UX** ([`migration`]): preexec hooks for
//!   bash/zsh/fish, shell-history scanner, drop-in compatibility
//!   shims for `op` / `doppler` / `vault` CLI surfaces.
//! - **Zero CLI surface**: secrets never appear in CLI args or shell
//!   history.

#![warn(missing_docs)]
#![warn(clippy::pedantic)]
#![cfg_attr(
    not(test),
    deny(
        clippy::unwrap_used,
        clippy::expect_used,
        clippy::todo,
        clippy::unimplemented,
        clippy::panic
    )
)]
#![allow(
    clippy::module_name_repetitions,
    clippy::must_use_candidate,
    clippy::missing_errors_doc
)]

pub mod audit;
pub mod config;
pub mod error;
pub mod execution;
pub mod file;
pub mod guard;
/// Cross-platform GUI dialog orchestration.
pub mod gui;
pub(crate) mod hex;
pub mod migration;
pub mod ops;
pub mod policy;
pub mod sandbox;
pub mod vault;

// Backward-compatible re-exports — these submodules previously lived at the
// crate root and are now under domain subdirectories. Keep them addressable
// at their old paths so consumers (CLI, MCP, desktop, tests) don't have to
// change their imports.
pub use config as security_config;
pub use config::totp;
pub use execution::inject;
pub use execution::supervised as supervisor;
pub use file as envseal_file;
pub use gui::relay;
pub use vault::health as secret_health;
pub use vault::keychain;