File tree Expand file tree Collapse file tree 3 files changed +92
-16
lines changed
Expand file tree Collapse file tree 3 files changed +92
-16
lines changed Original file line number Diff line number Diff line change @@ -106,19 +106,3 @@ jobs:
106106 PR image build completed successfully!
107107
108108 📦 [PR image](https://quay.io/trustyai/guardrails-sidecar-gateway-ci?tab=tags): `quay.io/trustyai/guardrails-sidecar-gateway-ci:${{ github.event.pull_request.head.sha }}`
109- - name : Trivy scan
110- uses : aquasecurity/trivy-action@0.28.0
111- with :
112- scan-type : ' image'
113- image-ref : " ${{ env.IMAGE_NAME }}:${{ env.TAG }}"
114- format : ' sarif'
115- output : ' trivy-results.sarif'
116- severity : ' MEDIUM,HIGH,CRITICAL'
117- exit-code : ' 0'
118- ignore-unfixed : false
119- vuln-type : ' os,library'
120-
121- - name : Update Security tab
122- uses : github/codeql-action/upload-sarif@v3
123- with :
124- sarif_file : ' trivy-results.sarif'
Original file line number Diff line number Diff line change 1+ name : Tier 1 - Security scan
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ - incubation
8+ - stable
9+
10+ jobs :
11+ trivy-fs-scan :
12+ name : Trivy Filesystem Security Scan
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ security-events : write
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Run Trivy filesystem scan
23+ uses : aquasecurity/trivy-action@0.28.0
24+ with :
25+ scan-type : ' fs'
26+ scan-ref : ' .'
27+ format : ' sarif'
28+ output : ' trivy-fs-results.sarif'
29+ severity : ' MEDIUM,HIGH,CRITICAL'
30+ exit-code : ' 0'
31+ ignore-unfixed : false
32+ vuln-type : ' os,library'
33+
34+ - name : Upload Trivy scan results to GitHub Security tab
35+ uses : github/codeql-action/upload-sarif@v3
36+ if : always()
37+ with :
38+ sarif_file : ' trivy-fs-results.sarif'
Original file line number Diff line number Diff line change 1+ name : Tier 1 - Unit tests
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - incubation
8+ - stable
9+ pull_request :
10+ branches :
11+ - main
12+ - incubation
13+ - stable
14+
15+ env :
16+ CARGO_TERM_COLOR : always
17+
18+ jobs :
19+ test :
20+ name : Test Suite
21+ runs-on : ubuntu-latest
22+
23+ steps :
24+ - name : Checkout code
25+ uses : actions/checkout@v4
26+
27+ - name : Setup Rust
28+ uses : dtolnay/rust-toolchain@stable
29+ with :
30+ toolchain : 1.84.0
31+ components : rustfmt, clippy
32+
33+ - name : Cache cargo registry
34+ uses : actions/cache@v4
35+ with :
36+ path : |
37+ ~/.cargo/registry
38+ ~/.cargo/git
39+ target
40+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41+ restore-keys : |
42+ ${{ runner.os }}-cargo-
43+
44+ - name : Check formatting
45+ run : cargo fmt --all -- --check
46+
47+ - name : Run clippy
48+ run : cargo clippy --all-targets --all-features -- -D warnings
49+
50+ - name : Run tests
51+ run : cargo test --verbose
52+
53+ - name : Check build
54+ run : cargo build --release --verbose
You can’t perform that action at this time.
0 commit comments