-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.55 KB
/
platform-iac-ci.yml
File metadata and controls
68 lines (57 loc) · 1.55 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
66
67
68
name: platform-iac-ci
on:
pull_request:
branches: [ main ]
paths:
- 'platform/**'
- 'lib/**'
- 'bin/**'
- 'test/**'
- 'package.json'
- 'package-lock.json'
- 'jest.config.js'
- '.github/workflows/platform-iac-ci.yml'
permissions:
contents: read
security-events: write
jobs:
quality-gates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install deps
run: npm ci
- name: TypeScript build
run: npm run build
- name: Unit and snapshot tests
run: npm test -- --ci
- name: CDK synth
run: npm run synth
- name: Static security scan (Checkov)
uses: bridgecrewio/checkov-action@v12
with:
directory: .
framework: cloudformation,terraform,github_actions
soft_fail: false
output_format: cli,sarif
output_file_path: console,results.sarif
quiet: true
- name: Upload Checkov SARIF report
if: always()
continue-on-error: true
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: results.sarif
- name: Static security scan (Trivy IaC misconfigurations)
uses: aquasecurity/trivy-action@v0.35.0
with:
scan-type: config
scan-ref: applications/gitops/base
hide-progress: true
severity: CRITICAL,HIGH
exit-code: '1'