Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/build-update-gitops-pr-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
permissions:
contents: read
packages: write
security-events: write
if: ${{ (needs.get-build-mode.outputs.SHOULD_BUILD == 'true') || (needs.get-build-mode.outputs.SHOULD_BUILD_DEPLOY == 'true') }}
uses: ./.github/workflows/build.yaml

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-update-gitops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
permissions:
contents: read
packages: write
security-events: write
uses: ./.github/workflows/build.yaml

get-short-sha:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
permissions:
contents: read
packages: write
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -31,6 +32,7 @@ jobs:
tags: |
type=sha
type=ref,event=pr
type=raw,value=${{ github.ref_name }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
Expand All @@ -53,3 +55,18 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPOSITORY_NAME }}:${{ env.CACHE_TAG }}
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPOSITORY_NAME }}:${{ env.CACHE_TAG }},mode=max

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.32.0
with:
image-ref: '${{ env.REGISTRY }}/${{ env.REPOSITORY_NAME }}:${{ steps.meta.outputs.version }}'
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: 'trivy-results.sarif'

# To review results for a PR in the GitHub Security tab, filter for "pr:NUM tool:Trivy is:open"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'
14 changes: 14 additions & 0 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Scheduled trivy scan

on:
workflow_dispatch:
schedule:
- cron: '30 8 * * 1'

jobs:
call-build-workflow:
permissions:
contents: read
packages: write
security-events: write
uses: ./.github/workflows/build.yaml