-
-
Notifications
You must be signed in to change notification settings - Fork 109
Brakeman を CI で実行する設定 #1727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brakeman を CI で実行する設定 #1727
Conversation
現時点で検出されているセキュリティ問題(メモ)🔴 エラー(Parse Error)
|
@claude Brakemanの初期設定として --exit-on-warn を有効にし、警告レベル2以上でCIを失敗させるようにしています。 また、プロジェクトに合わせて今後調整も検討しています。 |
Claude finished @nacchan99's task —— View job Brakemanの運用方針についてTodo:
💡 提案
|
- CIワークフローに を追加 - 誤って作成されていたYAML形式のファイル名を に変更し、Brakemanに認識されるように対応
ご確認いただいたので、マージします🚀 |
|
CI上で
Brakeman
を実行する仕組みを導入しました!まずは
Brakeman
の導入と安定稼働を第一の目的 として、現時点で検出されている警告はすべて.ignore
に登録することで、CIがパスする状態にしています。⚙️ 設定内容(GitHub Actions)
CI上では下記のコマンドでBrakemanを実行しています。
bundle exec brakeman --ignore-config config/brakeman.ignore --exit-on-warn --quiet
これにより、
.ignore
に記載されていないLevel 2以上の警告が1件でもあれば、CIが失敗します。(今後発生する新たなセキュリティリスクはCI上でブロックされる状態です!◎)🔧 対応内容
config/brakeman.ignore
を追加し、既存の警告を登録.ignore
を参照してBrakemanを実行するよう設定pokemon_download.html.erb
に対するBrakemanエラーが発生したため、該当箇所を修正 →a08c447
📌 今後の方針
.ignore
に登録された警告を別 Issue で解消していきます!( .ignore に登録された Brakeman 警告を解消する #1729 )--warning-level
を引き上げると良さそう)