Skip to content

Commit

Permalink
Merge pull request #153 from puppetlabs/cdpe-7069/update-trivy-workfl…
Browse files Browse the repository at this point in the history
…ow-to-use-cache

(CDPE-7069) Update trivy calls to use cache
  • Loading branch information
abottchen authored Nov 15, 2024
2 parents 948cf7c + 3aaf049 commit d09e323
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-test-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ jobs:
run: ./build-rootless.sh $(echo $GITHUB_REPOSITORY |cut -d '/' -f1)
- name: Build standard image
run: ./build.sh $(echo $GITHUB_REPOSITORY |cut -d '/' -f1)
- name: Trivy scan
uses: aquasecurity/trivy-action@master
with:
image-ref: puppet-dev-tools:latest
exit-code: 1
ignore-unfixed: true
severity: 'CRITICAL,HIGH,MEDIUM'
vuln-type: os
timeout: 10m0s
skip-files: "/root/.pdk/cache/ruby/*/gems/aws-sdk-core-*/lib/aws-sdk-ssooidc/client.rb"
env:
TRIVY_SKIP_DB_UPDATE: true
TRIVY_SKIP_JAVA_DB_UPDATE: true
- name: Run tests
run: cd tests; ./run_tests.sh
- name: Tag Docker images
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ jobs:
- name: Show Docker image labels
run: |
docker inspect --format='{{json .Config.Labels}}' ${{ secrets.DOCKERHUB_USERNAME }}/puppet-dev-tools
- name: Trivy scan
uses: aquasecurity/trivy-action@master
with:
image-ref: puppet-dev-tools:latest
exit-code: 1
ignore-unfixed: true
severity: 'CRITICAL,HIGH,MEDIUM'
vuln-type: os
timeout: 10m0s
skip-files: "/root/.pdk/cache/ruby/*/gems/aws-sdk-core-*/lib/aws-sdk-ssooidc/client.rb"
env:
TRIVY_SKIP_DB_UPDATE: true
TRIVY_SKIP_JAVA_DB_UPDATE: true
- name: Run tests
working-directory: ${{ github.workspace }}/tests
run: ./run_tests.sh
13 changes: 13 additions & 0 deletions .github/workflows/publish-4x-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ jobs:
IMAGE_TAG: ${{ github.event.inputs.image_tag }}
run: |
docker pull ${IMAGE_BASE}:${IMAGE_TAG}
- name: Trivy scan
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ env.IMAGE_BASE }}:${{ github.event.inputs.image_tag }}
exit-code: 1
ignore-unfixed: true
severity: 'CRITICAL,HIGH,MEDIUM'
vuln-type: os
timeout: 10m0s
skip-files: "/root/.pdk/cache/ruby/*/gems/aws-sdk-core-*/lib/aws-sdk-ssooidc/client.rb"
env:
TRIVY_SKIP_DB_UPDATE: true
TRIVY_SKIP_JAVA_DB_UPDATE: true
- name: Publish standard image to 4.x
env:
IMAGE_TAG: ${{ github.event.inputs.image_tag }}
Expand Down

0 comments on commit d09e323

Please sign in to comment.