cloud-sdk-sanitization
Provider-neutral cleanup and secret-handling boundary for the main
cloud-sdk workspace and
cloud-sdk crate.
This crate provides the mandatory volatile cleanup primitive used by the
default no_std SDK plus reusable caller-owned guards. It delegates clearing to the
independently reviewed sanitization
crate with default features disabled.
Install
[]
= "0.38.0"
= "0.16.0"
Example
use SecretBuffer;
let mut output = ;
assert_eq!;
With the optional alloc feature, the reviewed
sanitization::SecretString is re-exported. It consumes an owned String
without copying its plaintext bytes, restricts access to checked closures, and
volatile-clears the full allocation capacity on drop:
#
#
#
#
Features
| Feature | Default | Effect |
|---|---|---|
default |
yes | Empty; keeps the boundary no_std. |
alloc |
no | Adds owned volatile-clearing UTF-8 secret storage. |
std |
no | Enables alloc and standard-library integration in cloud-sdk; clearing behavior is unchanged. |
Docs.rs builds with all features. The underlying sanitization dependency
keeps its default features disabled in every configuration.
Security Notes
SecretBuffer volatile-clears its entire borrowed slice on drop, including
after early returns and unwind where unwind exists. SecretString clears its
full owned allocation capacity on drop and clears old allocations before
growth. sanitize_bytes provides the reviewed byte primitive used by core;
sanitize_value applies the same boundary to scalar lifecycle state.
These helpers do not clear immutable source strings or copies made by transports, operating systems, crash handlers, swap, remote services, or other processes. They also do not replace review of token ownership, logging, environment variables, paging, compiler behavior, or process boundaries.