Skip to content

ci: zizmor's findings fixed, Python pins Dependabot watches, auditable release binaries (C10) - #733

Merged
DrunkOnJava merged 5 commits into
mainfrom
ci/c10-hygiene
Oct 18, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
ci/c10-hygiene

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

These are the CI audit's last C10 items, plus fixes for the findings zizmor reported after #721.

zizmor findings

  • impostor-commit and ref-version-mismatch.
    • dtolnay/rust-toolchain rebuilds its stable, nightly and master branches, so the commits we had pinned were no longer on any branch.
    • They are re-pinned to the current heads, read from the API today: stable 89b1218, nightly 0e28dd9, master 7e38f4b.
  • artipacked. The 32 checkouts that kept the token now set persist-credentials: false. No workflow pushes, and every gh call authenticates with GH_TOKEN.
  • cache-poisoning. publish.yml no longer restores any cache, so a release is built from nothing a pull request's run could have written.

Other C10 items

  • publish.yml gets a concurrency group with cancel-in-progress: false, so a second release run waits instead of racing the first.
  • CI's Python packages are pinned in tools/ci/requirements-ifc.txt (ifcopenshell 0.8.5) and tools/ci/requirements-test.txt (jsonschema 4.26.0, pytest 8.4.2), and a new Dependabot pip entry watches them.
  • IfcOpenShell 0.9 and pytest 9 are major updates, so moving to them stays the maintainer's call.
  • codeql.yml now runs on ubuntu-24.04; C5 (ci: Linux jobs run on ubuntu-24.04 and Node jobs on Node 24 (C5) #715) missed it.
  • Release binaries are built with cargo auditable 0.7.7, so cargo audit bin can check a shipped binary against RustSec. There is a CHANGELOG entry for this.

Testing


Note

Low Risk
Changes are limited to CI workflows, Dependabot, and release build steps; release path is intentionally hardened (no cache restore, auditable binaries) without altering runtime product code.

Overview
Addresses zizmor findings and remaining C10 CI-audit items across GitHub Actions and release tooling.

Workflow security: Checkouts set persist-credentials: false broadly. dtolnay/rust-toolchain action SHAs are re-pinned (stable/nightly/master) after branch rebuilds caused impostor-commit warnings. CodeQL moves from ubuntu-latest to ubuntu-24.04 for runner stability.

Python supply chain: CI installs are pinned in tools/ci/requirements-ifc.txt (IfcOpenShell 0.8.5) and tools/ci/requirements-test.txt (pytest, jsonschema); jobs that used inline pip install now use these files. Dependabot gains a weekly pip entry for tools/ci.

Release hardening: publish.yml adds a non-cancelling concurrency group and drops rust-cache restores so release builds are not fed from PR-writable caches. Release CLI archives are built with cargo auditable (dependency list embedded for cargo audit bin); CHANGELOG documents this.

No application Rust/Python product code changes—only CI, Dependabot, pins, and release build steps.

Reviewed by Cursor Bugbot for commit eb15ab5. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Auditable metadata stripped from releases
    • Confirmed that llvm strip-all removes .dep-v0 while release strip = true enables it, and set CARGO_PROFILE_RELEASE_STRIP=debuginfo on the release-binaries build so auditable metadata survives in shipped archives.

Create PR

Or push these changes by commenting:

@cursor push 5f52cb3288
Preview (5f52cb3288)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -99,6 +99,10 @@
         with:
           tool: [email protected]
       - name: Build release binaries
+        env:
+          # [profile.release] strip = true maps to -C strip=symbols, which runs
+          # llvm-objcopy --strip-all and drops cargo-auditable's .dep-v0 section.
+          CARGO_PROFILE_RELEASE_STRIP: debuginfo
         run: cargo auditable build --release --locked --bins --target ${{ matrix.target }}
       - name: Package
         id: package

You can send follow-ups to the cloud agent here.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit eb15ab5. Configure here.

Comment thread .github/workflows/release-binaries.yml Resolved
Comment thread .github/dependabot.yml Dismissed
…e release binaries (C10)

The rest of the audit's C10 items, and the findings zizmor (#721) reported:

- impostor-commit / ref-version-mismatch: dtolnay/rust-toolchain regenerates
  its stable, nightly and master branches, so the pinned commits were on no
  branch. Re-pinned to the current heads (stable 89b1218, nightly 0e28dd9,
  master 7e38f4b, read from the API today); the next regeneration will flag
  them again.
- artipacked: `persist-credentials: false` on the 32 checkouts that kept the
  token. No workflow pushes; the `gh` calls authenticate with GH_TOKEN.
- cache-poisoning: publish.yml restores no cache, so a release is built from
  nothing a pull request's run could have written. It also gains a
  concurrency group that queues a second release run instead of racing it.
- The Python packages CI installs move into tools/ci/requirements-ifc.txt
  (ifcopenshell 0.8.5) and requirements-test.txt (jsonschema 4.26.0, pytest
  8.4.2), which a new Dependabot pip entry watches. IfcOpenShell 0.9 and
  pytest 9 are major updates and stay the maintainer's call.
- codeql.yml runs on ubuntu-24.04, which C5 (#715) missed.
- Release binaries are built with cargo auditable 0.7.7, so `cargo audit
  bin` can check a shipped binary against RustSec.
The re-pins of eb15ab5 were the heads of the action's stable and nightly
branches on 2026-10-05, and those branches are force-pushed: today stable
has diverged from that commit (5 ahead, 1 behind), so the pins would read
as impostor commits again. master only moves forward (both earlier master
pins are its ancestors), so every use now pins master at 683b588
(2026-10-16) and keeps the toolchain input it already passed. zizmor's
ref-version-mismatch still warns whenever master moves past the pin; the
way to retire that is to drop the action for rustup run steps.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 18, 2026 09:38
Bugbot noted that [profile.release] strips the binaries, which may drop
cargo-auditable's .dep-v0 section. Instead of assuming either way, the
release-binaries job now reads each Linux binary's section headers and
fails if the section is gone.
@DrunkOnJava
DrunkOnJava disabled auto-merge October 18, 2026 09:45
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 18, 2026 09:52
@DrunkOnJava
DrunkOnJava merged commit 6a7cf62 into main Oct 18, 2026
36 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/c10-hygiene branch October 18, 2026 09:56
DrunkOnJava added a commit that referenced this pull request Oct 18, 2026
…#793)

## Summary

Every workflow installs Rust with `rustup` in a `run:` step instead of `dtolnay/rust-toolchain`, which takes that third-party action out of all 24 jobs that used it (#765).

## Motivation

- The action's `stable` and `nightly` branches are force-pushed, so commit pins of them go stale. zizmor reported those as `impostor-commit` errors, and still warns `ref-version-mismatch` on the `master` pin #733 moved to.
- zizmor's `superfluous-actions` audit names this action, with `rustup` as the replacement. GitHub's Linux, macOS and Windows runners ship rustup, and no workflow reads the action's outputs.
- One less third-party action runs code in every Rust job, the release jobs included.

## Changes

- **24 steps in 8 workflows** (`ci.yml` 12, `publish.yml` 5, `measure.yml` 2, and one each in `corpus-nightly`, `deploy-viewer`, `fuzz`, `perf-budget` and `release-binaries`) become a `shell: bash` step. It runs `rustup toolchain install <toolchain> --profile minimal --no-self-update` with the step's `--component` and `--target` flags, then `rustup default <toolchain>`, as the action did.
- **The same environment.** The step sets `CARGO_INCREMENTAL=0` and `CARGO_TERM_COLOR=always` in `GITHUB_ENV`, which the action set when they were unset. No workflow sets `CARGO_INCREMENTAL`, and the four that set `CARGO_TERM_COLOR` set it to `always`.
- **Expressions go through `env:`.** Toolchains and targets that come from expressions (`matrix.rust`, `env.NIGHTLY`, `matrix.target`, the macOS-only wheel target) reach the script through `env:`, not `${{ }}` inside it. A step's `name:` and `if:` are kept.
- A CHANGELOG `[Unreleased]` entry under Changed.

## Testing

- All 12 workflow files parse with PyYAML. `actionlint` reports exactly main's 56 findings, shifted by line, and none new.
- This pull request's CI runs `ci.yml` (fmt, clippy, the Linux, Windows and macOS tests, MSRV, docs, the docs.rs nightly, deny, audit, tier two) and `release-binaries.yml`, which its own path triggers.
- The workflows a pull request does not run are dispatched on this branch: `publish.yml` with `test-pypi` off, `fuzz.yml`, `perf-budget.yml` and `corpus-nightly.yml`. With `test-pypi` off, `publish.yml` builds and smoke-tests the wheels, sdist, crate and viewer, and publishes nothing: every publish job needs a pushed `v*` tag. Results, on 937b8f7 before the rebase onto main (whose only conflict was the CHANGELOG):
  - `publish.yml` ([39154288113](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39154288113)): all seven wheels (macOS arm64 and x86_64, Linux x86_64 and aarch64, musllinux x86_64 and aarch64, Windows x64), the sdist, the crate install smoke, the docs.rs preview and the viewer smoke passed. Every install-and-open-a-model job passed. The release-binaries, crates.io, PyPI and TestPyPI jobs were skipped.
  - `fuzz.yml` ([39154289640](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39154289640), 30 s per target): 12 jobs passed; only the report job, which runs on a failure, was skipped.
  - `perf-budget.yml` ([39154291234](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39154291234)) and `corpus-nightly.yml` ([39154292795](https://github.com/DrunkOnJava/rvt-rs/actions/runs/39154292795)) passed.
  - From this pull request's CI logs: the MSRV job installed rustc 1.87.0 and the Windows and macOS jobs stable 1.99.1, each set as the default.

## Breaking changes

None.

Closes #765
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants