-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (80 loc) · 3.25 KB
/
Copy pathsecurity-compliance-gates.yml
File metadata and controls
98 lines (80 loc) · 3.25 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: security-compliance-gates
permissions:
contents: read
concurrency:
group: security-compliance-gates-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
jobs:
backend-build-and-audit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore IPOC_WEB.slnx
- name: Build
run: dotnet build IPOC_WEB.slnx --configuration Release
- name: Backend package vulnerability audit (enforced)
shell: pwsh
run: ./scripts/compliance/check-dotnet-vulnerabilities.ps1 -ProjectPath "IPOC_WEB.Server/IPOC_WEB.Server.csproj" -FailOnSeverities "Critical","High"
- name: TLS posture verification (enforced)
shell: pwsh
run: ./scripts/compliance/check-tls-posture.ps1 -ProgramPath "IPOC_WEB.Server/Program.cs" -OutputPath "security-compliance/controls/tls-posture-verification.md"
- name: Endpoint compliance cycle (drift refresh)
shell: pwsh
run: ./scripts/compliance/run-endpoint-compliance-cycle.ps1 -IncludePendingEvidence
- name: Endpoint compliance drift gate (enforced)
shell: pwsh
run: ./scripts/compliance/enforce-endpoint-compliance-drift.ps1 -LedgerPath "security-compliance/controls/endpoint-minimum-necessary-reviews.csv" -EvidenceGapCsvPath "security-compliance/controls/endpoint-evidence-completion-gaps.csv" -SlaSummaryPath "security-compliance/controls/endpoint-remediation-sla-summary.md"
- name: Upload endpoint compliance artifacts
if: always()
uses: actions/upload-artifact@v5
with:
name: endpoint-compliance-artifacts
path: |
security-compliance/controls/endpoint-compliance-executive-summary.md
security-compliance/controls/endpoint-compliance-trend.md
security-compliance/controls/endpoint-remediation-kpi.md
security-compliance/controls/endpoint-ready-to-close-summary.md
security-compliance/controls/endpoint-remediation-sla-summary.md
security-compliance/controls/endpoint-evidence-completion-gaps-summary.md
security-compliance/controls/endpoint-compliance-history.csv
security-compliance/controls/tls-posture-verification.md
frontend-build-and-audit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v5
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build frontend
run: npm run build
- name: NPM audit (high and critical)
run: npm audit --audit-level=high --json > npm-audit-report.json
- name: Upload npm audit report
if: always()
uses: actions/upload-artifact@v5
with:
name: npm-audit-report
path: frontend/npm-audit-report.json