forked from reactive-tech/kubegres
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split scans and cause a vulnerability
- Loading branch information
1 parent
36ca42e
commit 4134f01
Showing
5 changed files
with
54 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: scan | ||
description: | | ||
This builds the Docker image and scans it with Trivy. | ||
inputs: | ||
format: | ||
description: "The format of the output file. Can be 'table' or 'sarif'." | ||
required: true | ||
default: "table" | ||
output: | ||
description: "The output file when using 'sarif' format." | ||
default: "trivy-results.sarif" | ||
runs: | ||
steps: | ||
- uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: amd64 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: actions/checkout@v4 | ||
- run: make docker-build | ||
- uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: local/kubegres:scan-amd64 | ||
exit-code: 1 | ||
ignore-unfixed: false | ||
severity: 'CRITICAL,HIGH,MEDIUM' | ||
format: {{ inputs.format }} | ||
output: {{ inputs.output }} | ||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
if: ${{ inputs.format == 'sarif' }} | ||
with: | ||
sarif_file: {{ inputs.output }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Scan | ||
|
||
on: | ||
schedule: | ||
- cron: '16 30 * * *' | ||
|
||
env: | ||
GOPROXY: https://proxy.golang.org | ||
|
||
jobs: | ||
scan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ./.github/actions/scan | ||
with: | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' |
This file contains 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
This file contains 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
This file contains 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