forked from ChelseaKR/outcome-receipts
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (110 loc) · 4.77 KB
/
Copy pathci.yml
File metadata and controls
121 lines (110 loc) · 4.77 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: ci
on:
push:
branches: [main]
pull_request:
# Least-privilege default token.
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
verify:
name: verify
runs-on: ubuntu-latest
steps:
# Actions are pinned to commit SHAs per the supply-chain standard; the
# trailing comment names the tag the SHA corresponds to, for readability.
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: "0.11.19"
enable-cache: true
cache-dependency-glob: uv.lock
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
# Drive CI through the Makefile so it runs the same path as `make verify`.
- name: Install and smoke-check the complete toolchain
run: make install-smoke
# `verify` used to be a prerequisite list, and make stops one of those at
# the first failure. It aborted at `security`, so `cards`, `eval-check`
# and `compat` had not run on any commit -- and this job reported red
# either way, which is why nothing noticed. It now runs every gate,
# prints each one's own PASS/FAIL, and still exits non-zero if any failed.
- name: Verify (full local AUTO-GATE set)
run: make verify
security:
# The display name is a required-status-check context in the applied main
# ruleset, so it stays stable even as tools are added; semgrep also runs in
# this job (SEC-07). Renaming it requires updating the live ruleset first.
name: security (pip-audit · osv-scanner · gitleaks · zizmor)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
fetch-depth: 0 # gitleaks scans full commit history, not just the tip
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: "0.11.19"
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
- name: Install and smoke-check the complete toolchain
run: make install-smoke
# The six scanners this job's display name promises were six lines of one
# make recipe, and make stops a recipe at its first failing line. An
# unfixable HIGH advisory in the npm accessibility toolchain failed line
# two, so osv-scanner, gitleaks, semgrep and zizmor had not run here at
# all. They are independent targets now: every one runs on every commit,
# each reports its own result, and any failure still fails this job.
- name: Security gates (same target used by make verify)
run: make security
accessibility:
name: accessibility (pa11y, WCAG2AA, trace.html)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: "0.11.19"
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
- name: Install and smoke-check the complete toolchain
run: make install-smoke
- name: Accessibility gates (same target used by make verify)
run: make a11y
# Exercise the reusable composite action against a committed example manifest,
# so the action that downstream repos gate on is itself verified in CI.
dogfood-action:
name: dogfood-action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Verify the example receipts via the local action
uses: ./
with:
config: examples/housing-demo/report.toml
receipts: examples/housing-demo/receipts.json
# github.sha is the PR merge commit on pull_request events, so the
# dogfood run installs the merged state rather than the raw head --
# and CodeQL's untrusted-checkout query stays satisfied.
version: ${{ github.sha }}
container:
name: container (build · smoke · trivy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Build, smoke-test, and scan through the local verification target
run: make container-verify