ask-matt
MAmattpocock/skills336k近 7 天新增 4,217 个 star
Apply OxideTerm's secret lifetime and redaction rules when code handles passwords, passphrases, private keys, tokens, authentication headers, proxy credentials, prompts, diagnostics, persistence, or async task capture.
Use this skill before editing any path that receives, owns, transforms, persists, logs, reports, or asynchronously captures credential-like values.
Every secret must have an explicit owner, output boundary, and zeroization point. A value is not safe merely because it remains in memory or is omitted from the normal UI.
Treat at least these values as secrets:
zeroize::Zeroizing<T> for owned temporary values.Zeroize, ZeroizeOnDrop, or an equivalent zeroizing wrapper.String, but the UI/backend handoff must convert the value into a zeroizing type and clearly define which object clears the UI draft.Debug for a type that can expose a secret. Implement a redacted formatter that preserves only safe structural information.Compatibility with an older frontend or persistence format is not authority to introduce new plaintext storage. Existing legacy plaintext must be migrated into the current protected representation and temporary plaintext buffers must be zeroized. Document any unavoidable compatibility path and its removal boundary.
Incorrect:
#[derive(Debug, Clone)]
struct LoginAttempt {
password: String,
}
tracing::warn!(?attempt, "authentication failed");
Correct shape:
struct LoginAttempt {
password: Zeroizing<String>,
}
impl std::fmt::Debug for LoginAttempt {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter
.debug_struct("LoginAttempt")
.field("password", &"[redacted secret]")
.finish()
}
}
Incorrect:
return Err(anyhow!("proxy authentication failed for {password}"));
Correct:
return Err(anyhow!("proxy authentication failed"));
password, passphrase, private_key, identity, token, secret, credential, authorization, and prompt answers.Debug, error, tracing, notification, serialization, and diagnostic paths.Debug and user-facing errors do not contain representative secret values.MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
MAmattpocock/skills336k近 7 天新增 4,217 个 star
OBobra/superpowers331k近 7 天新增 5,030 个 star
AFaffaan-m/ECC314k近 7 天新增 3,503 个 star
AFaffaan-m/ECC314k近 7 天新增 3,503 个 star