This audit ensures that secret material is never emitted at info level in the command handlers and logging helpers.
- Secret keys
- Passphrases
- Signed XDR envelopes or transactions
Use these commands from the repository root to validate the audit:
grep -R --line-number -E 'p::info\(|tracing::info!|info!\(' src/commands/wallet.rs src/commands/deploy.rs
grep -R --line-number -E 'Secret Key|passphrase|transaction_xdr|signed_xdr|XDR' src/commands/wallet.rs src/commands/deploy.rs-
src/utils/logging.rsnow exposes helpers for redacting sensitive log data:redact_public_key(public_key, level)hides public keys in info-level logs but preserves them in debug and trace logs.redact_secret_value(_)always returns"[REDACTED]"for secret keys and passphrases.redact_signed_xdr(_)always returns"[REDACTED]"for signed XDR payloads.
-
tests/security_logging_audit.rscontains a grep-based regression test that scanssrc/commands/wallet.rsandsrc/commands/deploy.rsfor suspicious info-level patterns.
cargo test --test security_logging_audit