forked from spring-projects/spring-pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.15 KB
/
trivy-scan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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:
name: Run Trivy Scan
runs-on: ubuntu-latest
env:
LOCAL_REPOSITORY_PATH: ./build/publications/repos
steps:
- uses: actions/checkout@v3
- uses: spring-io/spring-gradle-build-action@v2
- name: Publish to local repo (poms)
run: |
./gradlew publishMavenJavaPublicationToLocalRepository
- 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: ${{ inputs.config-path }}
- name: Trivy scan complete
shell: bash
run: echo "::info ::Scanned"