Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
sergicastro committed Apr 2, 2024
1 parent ba35bb7 commit cb2cd30
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions .github/actions/scan/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,24 @@ inputs:
description: "The output file when using 'sarif' format."
default: "trivy-results.sarif"
runs:
using: composite
steps:
- uses: docker/setup-qemu-action@v3
with:
platforms: amd64
- uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v4
- run: make docker-build
shell: bash
- 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 }}
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 }}
sarif_file: '{{ inputs.output }}'
8 changes: 4 additions & 4 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Scan
name: Daily

on:
schedule:
Expand All @@ -11,8 +11,8 @@ jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/scan
with:
format: 'sarif'
output: 'trivy-results.sarif'
format: 'sarif'
output: 'trivy-results.sarif'
2 changes: 1 addition & 1 deletion .github/workflows/scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/scan
with:
format: 'table'

0 comments on commit cb2cd30

Please sign in to comment.