security workflow does not repeat nightly scans #2950
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Security scan | |
on: | |
push: | |
branches: | |
- renovate/** | |
pull_request: | |
jobs: | |
build: | |
name: Build and scan image | |
runs-on: ubuntu-latest | |
env: # Variables as understood by docker-build.sh | |
DOCKER_IMAGE: newrelic/infrastructure-bundle | |
DOCKER_IMAGE_TAG: ci | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Download integrations | |
run: go run downloader.go | |
- name: Build and load docker image for linux/amd64 | |
run: | | |
DOCKER_PLATFORMS=linux/amd64 ./docker-build.sh . --load | |
- name: Run Trivy in table mode | |
# Table output is only useful when running on a pull request or push. | |
if: contains(fromJSON('["push", "pull_request"]'), github.event_name) | |
uses: aquasecurity/[email protected] | |
with: | |
image-ref: ${{ env.DOCKER_IMAGE }}:${{ env.DOCKER_IMAGE_TAG }} | |
format: table | |
exit-code: 1 | |
ignore-unfixed: true | |
severity: "CRITICAL,HIGH" | |
env: | |
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db | |
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db |