Skip to content

Commit

Permalink
WIP: run trivy security scans on release docker image/composer depend…
Browse files Browse the repository at this point in the history
…encies
  • Loading branch information
nodiscc committed Sep 20, 2023
1 parent 775fcb4 commit 6d065d9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/trivy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: trivy security scans (release)
on:
schedule:
#- cron: '0 17 * * 1'
- cron: '10 * * * 1'
workflow_dispatch:

jobs:
trivy-repo:
runs-on: ubuntu-latest
name: trivy scan (release composer dependencies)
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run trivy scanner on repository
run: make test_trivy_repo
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
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ download_trivy:
test_trivy_docker: download_trivy
./trivy --exit-code $(TRIVY_EXIT_CODE) image $(TRIVY_TARGET_DOCKER_IMAGE)

### run trivy vulnerability scanner on composer/yarn dependency trees
### run trivy vulnerability scanner on composer dependency tree
test_trivy_repo: download_trivy
./trivy --exit-code $(TRIVY_EXIT_CODE) fs composer.lock
./trivy --exit-code $(TRIVY_EXIT_CODE) fs yarn.lock

0 comments on commit 6d065d9

Please sign in to comment.