fix: セキュリティレビュー指摘の対応 - #2
Closed
laiso wants to merge 1 commit into
Closed
Conversation
外部レビューで上がった妥当な 5 件をまとめて対応: - server: webhook トークン比較を crypto.timingSafeEqual に変更 (タイミング攻撃耐性) - server: quantity に整数 / 1-100 範囲のバリデーションを追加 - server: ALLOWED_ORIGINS 未設定時に警告ログを出力 - ios: Bundle ID typo "exmaple" を "example" に修正 (4 箇所) - README: Node.js 版数を CI 整合 (18 → 22)、CORS 既定の注意書きを追加 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
|
upstream PR を作成のため close。 |
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.
外部セキュリティレビューで上がった妥当な 5 件を 1 PR にまとめる。CI 通過確認用の intra-fork PR。
修正内容
Webhook constant-time 比較 (HIGH)
`server/index.js` で `!==` を `crypto.timingSafeEqual` に置換。長さ違いを先に弾いて等長保証。
iOS Bundle ID typo 修正 (MEDIUM)
`com.exmaple.` → `com.example.` を `project.pbxproj` の 4 箇所 (Debug/Release × app/tests) で置換。
CORS 既定の警告ログ (MEDIUM)
`ALLOWED_ORIGINS` 未設定時に起動ログで警告。動作は維持。
quantity 入力バリデーション (LOW)
整数 / 1-100 範囲チェックを追加。負数 / 小数 / 巨大値が PAY.JP API に素通りしないように。
README 整合 (LOW)
Node.js 18 → 22 (CI 検証バージョン)、CORS 既定挙動の注意書きを追加。
レビュー指摘から除外したもの
詳しくは plan に記載。要点:
Test plan