Skip to content

Commit

Permalink
Update trivy-scan.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
onobc authored Dec 12, 2023
1 parent e43c197 commit 64b01c8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@ name: Trivy Vulnerability Scan (Repo mode)

on:
workflow_dispatch:
inputs:
config-path:
description: 'Relative path to the trivy config file'
default: './github/trivy-no-upload.yaml'
required: false
type: string

workflow_call:
inputs:
config-path:
description: 'Relative path to the trivy config file'
default: './github/trivy-no-upload.yaml'
required: false
type: string

jobs:
run_trivy_scan:
Expand All @@ -16,12 +29,12 @@ jobs:
- name: Publish to local repo (poms)
run: |
./gradlew publishMavenJavaPublicationToLocalRepository
- name: Run Trivy scan in repo mode
- name: Run Trivy scan in repo mode (fs)
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '${{ env.LOCAL_REPOSITORY_PATH }}/org/springframework/pulsar'
trivy-config: .github/trivy.yaml
trivy-config: ${{ inputs.config-path }}
- name: Trivy scan complete
shell: bash
run: echo "::info ::Scanned"

0 comments on commit 64b01c8

Please sign in to comment.