test new dev ops (high chance I revert)

This commit is contained in:
KingKDot
2026-04-18 16:06:33 -05:00
parent 3400017a84
commit ecb8d8b6cf
2 changed files with 96 additions and 0 deletions
+36
View File
@@ -130,3 +130,39 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
trivy-scan:
needs: build-and-push
runs-on: ubuntu-latest
permissions:
packages: read
security-events: write
steps:
- name: Normalize image name
run: echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Scan image for vulnerabilities
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH
exit-code: '1'
ignore-unfixed: true
vuln-type: os,library
- name: Upload Trivy scan results to GitHub Security
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
category: trivy