From 466af8c69beec36e64125294c97366824686283d Mon Sep 17 00:00:00 2001 From: nodiscc Date: Sun, 27 Aug 2023 13:00:15 +0200 Subject: [PATCH] run trivy security scans on release docker image/composer/yarn dependencies --- .github/workflows/trivy-release.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/trivy-release.yml diff --git a/.github/workflows/trivy-release.yml b/.github/workflows/trivy-release.yml new file mode 100644 index 000000000..c47ba3b05 --- /dev/null +++ b/.github/workflows/trivy-release.yml @@ -0,0 +1,26 @@ +name: trivy security scans (release) +on: + schedule: + #- cron: '0 17 * * 1' + - cron: '12 * * * 1' + workflow_dispatch: + +jobs: + trivy-repo: + runs-on: ubuntu-latest + name: trivy scan (release composer/yarn dependencies) + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: release + - name: Run trivy scanner on repository + run: make test_trivy_repo TRIVY_EXIT_CODE=1 + trivy-docker: + runs-on: ubuntu-latest + name: trivy scan (release docker image) + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Run trivy scanner on release docker image + run: make test_trivy_docker TRIVY_TARGET_DOCKER_IMAGE=ghcr.io/shaarli/shaarli:release