Skip to content

fix(security): Account/AuthResult/RawMiAuthResponse の Debug 実装から token を redact#32

Merged
hitalin merged 1 commit into
mainfrom
security/token-debug-redaction
Jul 16, 2026
Merged

fix(security): Account/AuthResult/RawMiAuthResponse の Debug 実装から token を redact#32
hitalin merged 1 commit into
mainfrom
security/token-debug-redaction

Conversation

@hitalin

@hitalin hitalin commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

なぜ

notedeck-dev/notedeck#780 の一環。derive(Debug) のままだと {:?} でログや panic メッセージに平文トークンが漏れる。Drop での zeroize はあるが、生存中のログ出力経路が無防備だった。

変更

  • Account / AuthResult / RawMiAuthResponseDebug を手書き実装にし、token を <redacted> に伏せる
  • 各型に redaction のユニットテストを追加(format!("{:?}") に平文が含まれないこと)

🤖 Generated with Claude Code

…n を redact

derive(Debug) のままだと {:?} でログや panic メッセージに平文トークンが
漏れるため、token フィールドを <redacted> に伏せる手書き Debug 実装に
置き換える。Drop での zeroize は既にあるが、生存中のログ出力経路が
無防備だった (notedeck-dev/notedeck#780)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant