CodeQL Code Scanningアラート対応 (critical 1件 + high 22件のコード修正) - #2
Merged
Conversation
- SSRF対策: httpGetBase64Data にスキーム制限・内部アドレス拒否(Dialer.Control)・サイズ上限・タイムアウトを追加 (#140) - get_kyous_mcp のDTO割り当てサイズを定数上限で明示 (#141) - plugin_manager: userID のパス要素検証を追加 (#159-#161) - TraceSQLログの機密値(APIキー・秘密鍵・パスワードハッシュ・リセットトークン)をマスク (#142-#152) - パストラバーサルガードを reps.SecureJoin に統一 (#155-#158, #162, #163) - Wear OS companion: 自己署名証明書の信頼をopt-in設定化、デフォルトは標準証明書検証 (#164) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
フォローアップ課題: アカウントパスワードのサーバー側保存をsalted KDFに強化する(リポジトリのIssueが無効のためPRコメントとして記録) CodeQLアラート #138/#139 の調査で判明した根本課題。現状 提案: クライアント側プレハッシュは維持しつつ、サーバー側で受信sha256にsalted KDF (bcrypt等) を適用して保存・検証する。既存アカウントは初回ログイン成功時に透過的に再ハッシュ。影響: 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
GitHub Security > Code Scanning の27件のオープンアラートのうち、コード修正で対応すべき23件を修正します。残り4件 (#153, #154, #138, #139) は仕様上の誤検知としてマージ後にdismissします。
修正内容
image_url/favicon_urlを無検証fetchhttpGetBase64Dataにスキーム制限(http/https)・内部アドレス拒否(Dialer.ControlでDNSリバインディング対策込み)・30sタイムアウト・10MB上限を追加get_kyous_mcpのDTO割り当てcapを定数maxLimitで明示userID未検証GOOGLE_MAP_API_KEY・GKILL_NOTIFICATION_PRIVATE_KEY・PASSWORD_SHA256・PASSWORD_RESET_TOKENを***にマスク (sqlite3impl.MaskSensitiveValueForLog)reps.SecureJoinに統一検証
go vet ./.../go test ./...全パス (SSRFガードのユニットテストutils_ssrf_test.goを追加)127.0.0.1/169.254.169.254へのfetchがdial段階で拒否され、外部URLは正常取得できることget_kyous_mcpにlimit: -1/999999→ 200:phone_companion:assembleDebugビルド成功🤖 Generated with Claude Code