Skip to content

Commit

Permalink
repalce PHONITO with Trivy Scan
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef Fröhle committed Aug 4, 2021
1 parent 153b0a2 commit 3773a4c
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,29 @@ jobs:
repo: Secure-Compliance-Solutions-LLC/GVM-APK-build

- name: Build the Docker image
run: docker build . --file Dockerfile --build-arg OPT_PDF=1 --tag myapp:${{ steps.vars.outputs.docker_tag }}
run: docker build . --file Dockerfile --build-arg OPT_PDF=1 --tag myapp:${{ github.sha }}

- name: Scan with Phonito Security
uses: phonito/phonito-scanner-action@master
- uses: actions/[email protected]
with:
image: myapp:${{ steps.vars.outputs.docker_tag }}
phonito-token: ${{ secrets.PHONITO_TOKEN }}
path: .trivy
key: ${{ runner.os }}-trivy-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-trivy-
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "docker.io/my-organization/my-app:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH"
cache-dir: .trivy

- name: Correct Trivy cache permissions
if: always()
run: sudo chown -R $USER:$GROUP .trivy

build_release:
name: Build and Release
Expand Down

0 comments on commit 3773a4c

Please sign in to comment.