Skip to content
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

ci(fix): Dependabot のコミットに対する Trivy CI が失敗してしまう問題の修正 #647

Merged
merged 2 commits into from
Dec 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/docker-image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ name: trivy scan
# プッシュ時とプルリクエスト時に実行する
on:
push:
# Dependabot のプッシュでの Workflows は読み取り専用権限として実行される
# 上記の場合、Code Scanning は使用できないため Dependabot のプッシュはスキャン対象に含めない
branches:
- '!dependabot/**/main/**'
- main
# プルリクエストは今まで通り、Dependabot のコミットであってもスキャン可能
pull_request:

jobs:
Expand All @@ -23,12 +27,12 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: "oreorebot2"
format: "sarif"
image-ref: 'oreorebot2'
format: 'sarif'
security-checks: vuln
output: "trivy-results.sarif"
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"
sarif_file: 'trivy-results.sarif'