Skip to content

Commit

Permalink
ci(fix): Dependabot のコミットに対する Trivy CI が失敗してしまう問題の修正 (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2en authored Dec 24, 2022
1 parent f3f09c4 commit 2653b0a
Showing 1 changed file with 8 additions and 4 deletions.
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'

0 comments on commit 2653b0a

Please sign in to comment.