[自動レビュー 2026-04-29] 日次コードレビューによる自動修正 - #5
Draft
stewroux wants to merge 4 commits into
Draft
Conversation
- .claude/hooks/session-start.sh: npm installをリモートセッション開始時に実行 - .claude/settings.json: SessionStartフックを登録 - .github/workflows/ci.yml: TypeScript型チェック + Viteビルドを自動実行 CIはpush/PR時にnode 20でtsc --noEmitとnpm run buildを実行する
setup-node の cache: 'npm' はpackage-lock.jsonが存在しないと エラーになる。ロックファイルなしで動作するよう設定を修正。
- tsconfig.json: "vite/client"をtypesに追加 → import.meta.env.DEVがTypeScriptで認識されない問題を解消 - vite.config.ts: GEMINI_API_KEY ?? '' でundefined対策 → CI環境で.envがない場合にJSON.stringify(undefined)になるのを防止
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-04-29)で発見された問題のうち、自動修正可能なものを対応しました。
修正内容
セキュリティ修正
.gitignoreに.env/.env.*を追加 → APIキーの誤コミットを防止 (関連: [SECURITY] 外部CDNスクリプトにSubresource Integrity (SRI) なし・.envが.gitignore未追加 #3).env.exampleを新規追加 → 必要な環境変数を明示 (関連: [SECURITY] 外部CDNスクリプトにSubresource Integrity (SRI) なし・.envが.gitignore未追加 #3)console.errorを開発環境のみに制限 (import.meta.env.DEV) → エラー詳細のブラウザ露出を防止 (関連: [CODE REVIEW] ファイルサイズ未検証・メモリリーク・console.errorの残留 #4)maxLength={100}を追加 → プロンプトインジェクションの軽減 (関連: [SECURITY] プロンプトインジェクション:ユーザー入力がAIプロンプトに無害化なしで直接結合 #2)コード品質修正
URL.createObjectURLメモリリーク修正 → 前の画像URLをrevokeObjectURLで解放 (関連: [CODE REVIEW] ファイルサイズ未検証・メモリリーク・console.errorの残留 #4){n} / 100) → UX改善CI / 開発環境セットアップ(新規追加)
.github/workflows/ci.yml— Push / PR時に以下を自動実行:npm installnpx tsc(TypeScript型チェック)npm run build(Viteビルド).claude/hooks/session-start.sh— Claude Code on the web セッション開始時にnpm installを自動実行.claude/settings.json— SessionStart フックを登録未対応(手動対応が必要)の問題
テスト確認事項
.envファイルがgit statusで追跡されないこと