Repository navigation
67 lines (57 loc) · 1.63 KB
/
Copy pathci-validation.yml
File metadata and controls
67 lines (57 loc) · 1.63 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: CI Validation
on:
pull_request:
branches: [test,main]
workflow_dispatch:
jobs:
build:
name: Build and Test
runs-on:
#- kubernetes #Runner on-premise
- ubuntu-latest #Runner cloud (default)
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build in maven
uses: codeparce/ci-workflows/.github/actions/build/maven@v1
scan-repository:
name: Scan (${{ matrix.scanner.name }})
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
scanner:
- name: Filesystem
scan-type: fs
scanners: "vuln,secret"
output: trivy-fs.sarif
exit-code: "1" # bypass
- name: IaC & Configs
scan-type: config
scanners: ""
output: trivy-conf.sarif
exit-code: "1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Trivy Scan
uses: aquasecurity/trivy-action@v0.36.0
with:
scan-type: ${{ matrix.scanner.scan-type }}
scan-ref: '.'
scanners: ${{ matrix.scanner.scanners }}
severity: 'HIGH,CRITICAL'
ignore-unfixed: true
format: table
output: trivy-results.txt
exit-code: ${{ matrix.scanner.exit-code }}
- name: Summary of Trivy Scan Results
if: always()
uses: codeparce/ci-workflows/.github/actions/github/summary@v1
with:
scaner-name: ${{ matrix.scanner.name }}
report-file: trivy-results.txt