Repository navigation
chore: sync dev with main - #1346
Merged
Merged
Conversation
The nightly scan uploads its artifact with `if: always()` because a red gate is exactly when the findings are needed, but the image build and CycloneDX SBOM steps sat after the blocking gate unconditioned, so a red gate ended the job before they ran — the artifact was complete only on green runs. Assert the SBOM producers precede the gate, that nothing unconditional follows it, and (already true) that the gate stays blocking and the upload stays always(). RED: 2 failed, 2 passed. Refs: #1342
The CycloneDX SBOM and Trivy defence-in-depth steps carried no `if:` and sat after the blocking gate, so a red gate ended the job first and the artifact — uploaded with `if: always()` precisely because a red gate is when the evidence is needed — lost its SBOM on exactly those runs (17 kB on the red 2026-08-03 dev run vs ~466 kB on the green 2026-07-30 one). Move the SBOM steps above the gate rather than conditioning them, so the gate stays last, blocking and unconditioned: it remains the job's verdict and the tracking-issue automation keyed on `vulnix-gate.outcome` is untouched. Also relax the follow-the-gate assertion from `always()` to "states an explicit condition" — the tracking-issue step legitimately runs on `failure()`, and the invariant that matters is that no step after the gate is unconditioned. Refs: #1342
## Description The nightly scan's SBOM steps ran **after** the blocking `vulnix-gate` with no `if:` condition, so a red gate ended the job before they executed. The artifact — uploaded with `if: always()` precisely because "a red vulnix-gate is exactly when the findings are needed" — therefore carried its CycloneDX SBOM and Trivy defence-in-depth view only on **green** runs, and was stripped on red ones. Targets **`release/1.6.0`**, not `dev`: the branch was cut minutes before this was filed and no RC has been tagged yet, so the fix rides 1.6.0 rather than waiting a train. `dev` picks it up via the release-merge PR. Closes #1342 ## Type of Change - [x] `fix` -- Bug fix - [x] `ci` -- CI/CD pipeline changes ## Changes Made - **`.github/workflows/security-scan.yml`**: the three evidence steps (`Build the Nix image for SBOM generation`, `Generate Nix image SBOM (CycloneDX)`, `Trivy SBOM-mode scan`) move above `Gate on unexcepted HIGH/CRITICAL vulnix findings`. The gate is now the last checking step; only the `always()` upload and summary and the `failure()`-conditioned tracking-issue step follow it. The gate itself is byte-for-byte unchanged apart from a comment noting why it is deliberately last. - **`tests/test_workflow_sbom_ordering.py`** (new): four YAML-shape assertions — the SBOM producers precede the gate; nothing after the gate is unconditioned; the gate stays blocking (no `continue-on-error`, no `if:`); the upload keeps `always()`. Ordering was chosen over `if: !cancelled()` on the SBOM steps so the gate remains the job's final, unambiguous verdict. The cost is that the image build now runs before the gate on every run — but `nix build .#devkitImage` is largely cache-warm after `devkitImageEnv` was built earlier in the same job. ## Changelog Entry Added to the frozen `## [1.6.0] - TBD` section (this ships in 1.6.0, so it does not belong under `## Unreleased`): ```markdown ### Fixed - **The nightly scan keeps its SBOM when the vulnix gate goes red** ([#1342](#1342)) - `security-scan.yml` generated the CycloneDX SBOM and ran the Trivy defence-in-depth view *after* the blocking `vulnix-gate` step, with no `if:` condition, so a red gate ended the job before they ran. The uploaded artifact was complete on green runs and stripped on red ones — the inverse of what triage needs (17 kB on the red 2026-08-03 dev run vs ~466 kB on the green 2026-07-30 one). - The SBOM steps now run before the gate, which stays last, blocking and unchanged — so it remains the job's verdict and the tracking-issue automation that keys on its outcome is unaffected. ``` ## Testing - [x] Tests pass locally (`just test`) - [x] Manual testing performed (describe below) ### Manual Testing Details **TDD, red-first.** The test committed first (`ace02b53`) against the unmodified workflow: ``` FAILED test_sbom_steps_precede_the_blocking_gate FAILED test_nothing_unconditioned_follows_the_gate 2 failed, 2 passed ``` The two that passed are the guards that already held (gate blocking, upload `always()`) — they are regression cover, not new behavior. Re-verified after the fix by stashing only the workflow change, so the *final* test file is proven red against the *original* workflow and green against the fixed one: ``` $ git stash push .github/workflows/security-scan.yml && pytest # 2 failed, 2 passed $ git stash pop && pytest -v # 4 passed ``` **Regression cover**: `pytest -k workflow` → **130 passed**, 529 deselected. **Hooks**: `just precommit` (full suite, all files) green, exit 0, tree unmodified by the run. ### Correction made mid-implementation The first version of `test_nothing_unconditioned_follows_the_gate` asserted that every step after the gate carries `always()`. That was over-specified and failed against the correct workflow: `Open a tracking issue when the vulnix gate fails` deliberately runs on `failure() && steps.vulnix-gate.outcome == 'failure'`. The assertion now requires an *explicit* `if:` on anything following the gate, which is the invariant that actually prevents #1342 — an unconditioned step silently inherits the gate's outcome. ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have updated `CHANGELOG.md` (and pasted the entry above) - [x] My changes generate no new warnings or errors - [x] I have added tests that prove my fix is effective - [x] New and existing unit tests pass locally with my changes ## Additional Notes Not a regression from anything in 1.6.0 — the ordering has been there since the SBOM steps were added, and it only bites on a red gate, which was rare until the libssh2 batch turned the nightly red on 2026-07-31 (#1322 / #1323). The fix cannot be proven end-to-end without a genuinely red gate, which `dev` no longer has after #1327 and #1328. The YAML-shape tests are the durable proof; the next real red-gate run is the live confirmation. Refs: #1342
…ges land (#1345) Closes #1344. ## What Adds `--checksum` to all three template `rsync -avL` invocations in `assets/init-workspace.sh` (consumer upgrade copy, smoke clean deploy, smoke overlay), so template delivery is decided by content rather than rsync's size+mtime quick-check. ## Why The dereferenced template files carry the Nix store's canonical epoch+1 mtime, and `-a` (`-t`) stamps that mtime onto workspace copies at scaffold time. A later template change that keeps the byte count identical — the digest-for-digest `codeql-action` bump from #1330 in `scorecard.yml` is the live case — then matches the consumer copy on both size and mtime, and rsync silently skips it: the upgrade claims success but never delivers the change. Fresh checkouts (CI) are unaffected, which is exactly how the scaffold-drift gate (#1295) caught it on its first live exercise: 4 of 5 1.6.0-rc1 consumer lanes went red on scaffolds the host-side upgrade itself had produced (org-config#85, sync-issues-action#160, commit-action#124, exo-fleet#268; vault#48 ran from a fresh worktree and passed). ## How verified - TDD: new bats test scaffolds a workspace, ships a same-length template change with both sides at mtime epoch+1, and asserts the re-scaffold delivers it — RED before the fix (rsync itemize shows `.f...p.....`, no transfer), GREEN after. - Full `tests/bats/init-workspace.bats` suite: 279/279 pass (two tests pinning the literal smoke rsync invocation updated to the new flag string). - Full pre-commit suite green. Release-train blocker for 1.6.0 → cut rc2 after merge, then re-bump the five lanes.
Set release date to 2026-08-04 and regenerate release docs. Refs: #1341
# [Release 1.6.0](https://github.com/vig-os/devkit/releases/tag/1.6.0) - 2026-08-04 This PR prepares release 1.6.0 for merge to main. ## [1.6.0](https://github.com/vig-os/devkit/releases/tag/1.6.0) - 2026-08-04 ### Added - **Tombstoned tag names fail with the real cause** ([#1319](#1319)) - The downstream `release-publish.yml` template now recognizes the `GH013` "creations restricted" signature on tag push and release creation — the mark of a tag name permanently retired because its published release was deleted under org-enforced immutability — and fails with a "version burned — re-cut required" diagnosis instead of a generic push/create error. - Devkit's `promote-release.yml` cross-repo gate no longer only advises "wait and retry" when no downstream release exists: it names the tombstone as a possible cause and points at the point-of-no-return runbook. ### Changed - **Security exception expiries land on a Wednesday** ([#1337](#1337)) - `docs/CONTAINER_SECURITY.md` now documents an expiry grid for the exception registers: every `Expiration:` date is picked on a Wednesday, so an entry turns red on the Thursday *after* the week's Renovate `nixpkgs` bump has merged and the first nightly scan has produced a findings delta against the new closure — the point at which a review can delete entries instead of blindly extending them. Earlier weekdays force that blind extension (or, on a Sunday, take unrelated PRs red before the week's Renovate PRs even open); later ones lapse over an unattended weekend, blocking every commit. - All 12 non-conforming dates across `.vulnixignore`, `.trivyignore` and `.github/dependency-review-allow.txt` were snapped onto the grid (shift ≤ 3 days each). This is a scheduling change only — no risk assessment was re-opened or altered. Notably the glibc block no longer expires on a Saturday, where it would have turned red unattended on Sunday 2026-08-16. - Convention enforced by review, not by `check-expirations`: the validator is unchanged, since it is scaffolded into consumer repos whose release cadence may differ. - **Consumer Renovate ignores devkit-managed workflows and actions** ([#1332](#1332)) - The shipped preset (`.github/renovate-default.json`) now disables Renovate for the managed workflow set and the two managed composite actions (`setup-devkit-toolchain`, `resolve-toolchain`) via a trailing `enabled: false` packageRule. Their SHA-pinned action digests advance upstream in devkit and ship with each release, so downstream Renovate no longer opens duplicate pin-bump PRs that the next `devkit-upgrade` clobbers. - The rule is last, so a consumer can opt a specific managed file back in from their preserved `renovate.json` (later rules win). Devkit's own root `renovate.json` re-enables its root workflows/actions so devkit keeps advancing the pins it owns. - **Renovate: update `github/codeql-action` from `f205ea1` to `d1ba80a`** ([#1330](#1330)) - **Renovate: update `aquasecurity/trivy` from `v0.72.0` to `v0.73.0`** ([#1331](#1331)) - **Renovate: update `github-backup` from `==0.65.0` to `==0.65.1`** ([#1324](#1324)) - **Release runbook: restart point of no return** ([#1318](#1318)) - `docs/RELEASE_CYCLE.md` now documents that deleting a **published** GitHub Release under org-enforced immutability permanently tombstones its tag name (`GH013`), and adds a recovery-procedures subsection: finalize restarts are free only while every release object in the pipeline (devkit **and** `devkit-smoke-test`) is still a draft; once smoke-test publishes its final, the version is committed and a restart means burning it (re-cut as the next patch). Lesson from the 1.5.0 ghost. ### Fixed - **Upgrades no longer skip same-size template changes on previously scaffolded consumers** ([#1344](#1344)) - The scaffold's template copy (`rsync -avL`) relied on rsync's size+mtime quick-check. The dereferenced template files carry the Nix store's canonical epoch+1 mtime, and `-a` (`-t`) stamps that same mtime onto the workspace copies — so a later template change that keeps the byte count identical (a digest-for-digest action bump, like #1330's `codeql-action` update in `scorecard.yml`) matched the consumer file on both size and mtime and was silently never delivered by host-side upgrades of previously nix-scaffolded consumers. CI paths were unaffected (fresh checkouts have current mtimes), which is how the scaffold-drift gate (#1295) caught the divergence on its first live exercise: four of five 1.6.0-rc1 consumer lanes went red on a scaffold the upgrade itself had produced. - All three template `rsync` invocations (consumer upgrade, smoke clean deploy, smoke overlay) now pass `--checksum`, so delivery is decided by content, not size+mtime coincidence. - **The nightly scan keeps its SBOM when the vulnix gate goes red** ([#1342](#1342)) - `security-scan.yml` generated the CycloneDX SBOM and ran the Trivy defence-in-depth view *after* the blocking `vulnix-gate` step, with no `if:` condition, so a red gate ended the job before they ran. The uploaded artifact was complete on green runs and stripped on red ones — the inverse of what triage needs (17 kB on the red 2026-08-03 dev run vs ~466 kB on the green 2026-07-30 one). - The SBOM steps now run before the gate, which stays last, blocking and unchanged — so it remains the job's verdict and the tracking-issue automation that keys on its outcome is unaffected. - **Trunk consumers' Renovate preset now targets `main`** ([#1336](#1336)) - The trunk render (`render_workflow_model`) retargets `baseBranchPatterns` from `["dev"]` to `["main"]` in the scaffolded `.github/renovate-default.json`. Previously a `DEVKIT_WORKFLOW=trunk` consumer kept `["dev"]` while having no `dev` branch, leaving Renovate with nothing to operate on — effectively inert. Existing trunk repos self-heal on their next `devkit-upgrade`. ### Security - **Advance the nixpkgs pin and drop the gawk exception block** ([#1328](#1328)) - Advanced the pinned `nixpkgs` rev (`flake.lock`) from nixos-26.05 @ `8623c4c2` (2026-07-26) to @ `531670d8` (2026-08-03), which is the first pinned-channel rev to ship **gawk 5.4.1**. The rebuilt closure confirms it. - Removed the gawk 5.4.0 CERT-PL block (CVE-2026-40467, -40468, -40469, -40553) instead of renewing it a third time. It had been extended at #1240 and again at the #1273 pin advance only because the fix sat in nixpkgs `staging` as a stdenv mass-rebuild, leaving the "advance the rev" lever with nowhere to land. - The before/after `vulnix` closure diff is exactly those four CVEs (59 → 55 unique advisories) with nothing new appearing, and the gate passes on 27 exceptions (down from 31). - The rest of the register was re-verified against the new rev and nothing else became droppable: fzf (0.72.0), libssh2 (1.11.1, still carrying no 6603x patch), unbound (1.25.1) and podman (5.8.2) are all unchanged, so those blocks are retained with a 2026-08-04 re-verification note. - **vulnix register: except the libssh2 malicious-server batch, prune five dead exceptions** ([#1327](#1327), [#1322](#1322), [#1323](#1323)) - New time-boxed `.vulnixignore` block (expires 2026-08-31) for the three HIGH libssh2 1.11.1 CVEs disclosed 2026-07-24 (CVE-2026-66033, -66034, -66035) that turned the nightly security scan red on both refs from 2026-07-31. All three are client-side flaws requiring a connection to a malicious SSH server; libssh2 enters the closure only as curl's scp/sftp backend. Upstream has published no release since 1.11.1 and the nixpkgs patches (NixOS/nixpkgs#547491) are still on `staging`, so no rev-advance is available. - Five exceptions removed as dead — each already fixed at the pinned rev by the #1273 pin advance, which the register was never reconciled against: libssh2 CVE-2026-55200, gzip CVE-2026-41992 and libxml2 CVE-2026-11979 (CVE-named nixpkgs patches, which vulnix credits), plus socat CVE-2026-56123 (1.8.1.3) and ldns CVE-2026-10846 (1.9.2). Two of them had lapsed on 2026-08-03, failing `check-expirations` on every branch. - podman CVE-2026-57231 renewed to 2026-08-31 (re-verified: `nixos-26.05` still ships 5.8.2 and the release-26.05 backport is still a draft).
c-vigo
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs
devwithmain(sync-main-to-dev workflow).