Commit 69250d8
authored
ci: tag unit suite + skip publish on cancel + fix head_ref injection (#2556)
Three minimal CI fixes, no new tools.
## 1. Distinguish unit vs integration suite in Codecov
Each unit test upload now carries two flags: the existing per-package
one (`unit-orchestrator`, `arm64-api`, …) **plus** a top-level `unit`.
Integration uploads already carry `integration`. So in the Codecov
dashboard you can now filter by `unit` to see all unit tests across
packages and architectures, or `integration` for the e2e suite.
Existing flags unchanged — purely additive.
## 2. Don't publish cancelled runs as failed tests
The `publish-test-results` job ran with `if: always()`, which meant a
workflow cancelled by a newer push (`cancel-in-progress: true`) would
still try to publish whatever JUnit XMLs got uploaded as artifacts
before the cancel — appearing as a failed check. Changed to `if:
!cancelled()` in both `pull-request.yml` and `push-main.yml`.
The Codecov upload steps were already guarded with `!cancelled()`, so
they were fine.
## 3. Real bug: shell injection via `github.head_ref`
`pr-no-generated-changes.yml` interpolated `github.head_ref` (the PR
branch name, attacker-controlled) directly into `git push origin
HEAD:${{ github.head_ref }}`. A PR with a branch name like `;rm -rf /;`
could execute arbitrary commands in the auto-fixer job. Routed through
an env var (`HEAD_REF`) so it's quoted as data, not shell.
## Diff
5 files, +17/-11.1 parent b453509 commit 69250d8
4 files changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | | - | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments