fix: zeroize platform credentials held in configuration #107
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.59) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 198 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.317
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #107"
general
weight: 0.35
abendrothj
Closes #46.
What
SecretStringmoves fromplatform-connectors/src/oauth.rstoplatform-core(newsecret.rs, plus thezeroizedependency).oauth.rsre-exports it, so connector code is unchanged.Clone(each clone is its ownZeroizing<String>) and implementszeroize::ZeroizeOnDrop, with a compile-time assertion test followingplatform-api/src/query.rs.AuthConfig::hs256_secretandBillingConfig::paddle_webhook_secretareOption<SecretString>. The hand-written redactingDebugimpls are replaced by derived ones, sinceSecretStringredacts itself. A newget_secretreader also wraps the raw value from the source inZeroizingbefore trimming, so no untrimmed copy outlives the load.expose():platform-api/src/main.rs,platform-api/src/lib.rs(MoR webhook),platform-api/src/bin/devtoken.rs.docs/THREAT_MODEL.md: the platform-credentials row says what is true, and "Residual risks" records that the original values stay in the process environment for the life of the process.Why
The threat model claimed zeroize-on-drop for platform credentials, but both config secrets were plain
Strings. This lands before P62, P63 and P68 add more secrets, which should use the same type.Tests
platform-configpass unchanged; the JWT one also checks the value throughexpose().secrets_are_trimmed_and_blank_means_unset(config), andsecret_string_zeroizes_on_drop/secret_string_is_redacted_in_debug(core).scripts/check.shpasses.