[自動レビュー 2026-06-15] セキュリティ修正・メモリリーク・バリデーション・CI追加 - #11
Draft
stewroux wants to merge 1 commit into
Draft
Conversation
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.
日次自動コードレビュー(2026-06-15)による修正
このPRは
stewroux/Toy-Styler-AIの日次セキュリティスキャン&コードレビューで発見された問題の自動修正です。修正内容
1.
.gitignoreに.env*パターンを追加(Issue #7)変更ファイル:
.gitignore*.localのみが除外されており、.envや.env.productionが git 追跡対象になっていた問題を修正。GEMINI_API_KEYを含む env ファイルが誤ってコミットされるリスクを排除。合わせて
.env.exampleテンプレートを追加。2. Object URL のメモリリーク修正(Issue #9)
変更ファイル:
App.tsxURL.createObjectURL()で生成したブロブ URL が revoke されずにメモリに蓄積する問題を修正。useEffectのクリーンアップでURL.revokeObjectURL()を呼ぶよう変更。3. ImageUploader にファイルサイズ・タイプ検証を追加(Issue #10)
変更ファイル:
components/ImageUploader.tsxドラッグ&ドロップで非対応ファイルやサイズ超過ファイルが送信されるリスクを修正。
image/png/image/jpeg/image/webpのみ受け入れonImageUploadコールバック経由でApp.tsxのエラー表示に伝達UI のヒントも「最大 10MB」と明記。
4.
tsconfig.jsonに"vite/client"型を追加変更ファイル:
tsconfig.jsonVite プロジェクトで
import.meta等の型解決に必要な"vite/client"をtypes配列に追加。5. GitHub Actions CI ワークフローを追加
追加ファイル:
.github/workflows/ci.ymlmainブランチへの push / PR、claude/**ブランチへの pushnpm install→tsc --noEmit(型チェック)→npm run buildGEMINI_API_KEYは GitHub Secrets から注入(キーをコードに含めない)6. Claude Code SessionStart フックを追加
追加ファイル:
.claude/hooks/session-start.sh,.claude/settings.jsonセッション開始時に自動で:
node_modulesが無ければnpm installを実行.envファイルの存在を確認して警告未修正の問題(別途対応が必要)
テスト計画
npm installが正常に完了するnpx tsc --noEmitでエラーが出ないnpm run buildが成功する関連 Issue: #6 #7 #8 #9 #10
Generated by Claude Code