Skip to content

Commit

Permalink
Merge pull request #38 from betadots/add_trivy
Browse files Browse the repository at this point in the history
add trivy
  • Loading branch information
rwaffen committed Feb 1, 2024
2 parents d81c8cb + 397e313 commit 96d5071
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: QA🚦
on:
pull_request: {}
push:
paths-ignore:
- '.github/**'
branches:
- main

Expand All @@ -14,12 +12,30 @@ jobs:
name: 'Build test container'
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: voxpupuli/gha-build-and-publish-a-container@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Build Docker image
uses: docker/build-push-action@v5
with:
tags: 'ci/pdc:${{ github.sha }}'
push: false

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'ci/pdc:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
registry_password: ${{ secrets.GITHUB_TOKEN }}
publish: 'false'
sarif_file: 'trivy-results.sarif'

test_gem_installation:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 96d5071

Please sign in to comment.