Skip to content

feat: cargo-audit による定期脆弱性スキャン CI を追加#61

Merged
makinzm merged 2 commits into
mainfrom
feat/pr-security-audit
Mar 15, 2026
Merged

feat: cargo-audit による定期脆弱性スキャン CI を追加#61
makinzm merged 2 commits into
mainfrom
feat/pr-security-audit

Conversation

@makinzm

@makinzm makinzm commented Mar 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • .github/workflows/security-audit.yml を新規追加
  • cargo audit で Cargo.lock の依存パッケージを RustSec Advisory Database と照合
  • スケジュール実行(毎日 UTC 06:00)で新規 CVE を自動検知
  • push / PR 時は Cargo.lock 変更があればトリガーし、脆弱性があれば CI を fail させる
  • 脆弱性検出時(スケジュールのみ)は GitHub Issue を自動作成(重複防止ロジック付き)

動作フロー

push/PR (Cargo.lock 変更)
  └─ cargo audit
       ├─ 問題なし → green
       └─ 脆弱性あり → ::error:: アノテーション + exit 1

schedule (毎日 UTC 06:00)
  └─ cargo audit
       ├─ 問題なし → green
       └─ 脆弱性あり → GitHub Issue 自動作成(open な [Security] Issue があればスキップ)

Test plan

  • ブランチへ push して Actions が起動することを確認
  • Cargo.lock を変更しない push では paths フィルタでスキップされることを確認
  • cargo audit が通ることを確認(現時点で既知の脆弱性なし)

🤖 Generated with Claude Code

makinzm and others added 2 commits March 15, 2026 09:16
- .github/workflows/security-audit.yml を新規作成
- スケジュール(毎日 UTC 06:00)・push/PR(Cargo.lock 変更時)にトリガー
- 脆弱性検出時: push/PR はワークフロー fail、schedule は GitHub Issue を自動作成
- 重複 Issue 防止ロジックを github-script に組み込み

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@makinzm makinzm merged commit 57eff95 into main Mar 15, 2026
2 checks passed
@makinzm makinzm deleted the feat/pr-security-audit branch March 15, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant