Skip to content

ci: zizmor audits the workflows and OpenSSF Scorecard scores the repository (C10) - #721

Merged
DrunkOnJava merged 3 commits into
mainfrom
ci/c10-zizmor-scorecard
Oct 5, 2026
Merged

DrunkOnJava merged 3 commits into
mainfrom
ci/c10-zizmor-scorecard

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

From the CI audit of 2026-10-05: two free tools that report to code scanning.

  • zizmor (1.30.1) runs on changes to .github/, on pushes to main and weekly. It finds template injection, checkouts that keep the token, broad permissions and unpinned actions in the workflows themselves.
  • OpenSSF Scorecard runs on pushes to main and weekly. It scores pinned dependencies, token permissions, branch protection, fuzzing and SAST, and publishes the result to the Scorecard API.

Neither is part of CI passed. A finding gets fixed rather than blocking unrelated pull requests. I'll fix zizmor's first findings in a follow-up once it has run on main.


Note

Low Risk
Adds non-blocking CI workflows with scoped permissions and pinned actions; no application or auth logic changes.

Overview
Adds two scheduled and on-push security workflows (C10 audit) that report to GitHub code scanning without joining the main CI gate.

OpenSSF Scorecard (scorecard.yml) runs on main pushes, weekly (Tuesdays), and manual dispatch. It uses pinned ossf/scorecard-action, uploads SARIF to code scanning, publishes to the public Scorecard API, and keeps artifacts for 14 days. Workflow permissions follow Scorecard constraints (read-all at workflow level; security-events: write and id-token: write only on the analysis job).

zizmor (zizmor.yml) audits .github workflow YAML on PR/push when .github/** changes, plus a weekly Monday run. It uses pinned checkout and zizmor-action (v1.30.1), minimal permissions, persist-credentials: false, and PR concurrency with cancel-in-progress.

Findings from both are meant to be addressed in follow-ups rather than blocking unrelated PRs.

Reviewed by Cursor Bugbot for commit 39b4141. Configure here.

…sitory (C10)

From the CI audit of 2026-10-05, two free tools reporting to code scanning:

- zizmor (1.30.1, on changes to .github/, pushes to main and weekly) finds
  template injection, checkouts that keep the token, broad permissions and
  unpinned actions in the workflows themselves.
- OpenSSF Scorecard (on pushes to main and weekly) scores pinned
  dependencies, token permissions, branch protection, fuzzing and SAST, and
  publishes to the Scorecard API.

Neither is part of CI passed: a finding is fixed, not a reason to block
unrelated pull requests.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

DrunkOnJava added a commit that referenced this pull request Oct 5, 2026
…ndabot refuses (C10) (#731)

Follow-up to #720. Dependabot's config check failed on main's
dependabot.yml: "The property '#/updates/1/cooldown/semver-major-days'
is not supported for the package ecosystem 'github-actions'", and the
same for 'docker' (seen as the failing `.github/dependabot.yml` check on
#721 after it took main). Those two ecosystems keep `default-days: 3`;
Cargo and npm keep seven days for a major update. docs/maintaining.md
says so.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Documentation and Dependabot YAML only; no runtime or security
behavior changes beyond restoring a valid Dependabot config.
> 
> **Overview**
> Fixes Dependabot config validation by removing **`semver-major-days`**
from the **github-actions** and **docker** update blocks, which
Dependabot does not support for those ecosystems. Both still use
**`default-days: 3`**; **Cargo** and **npm** keep the seven-day major
cooldown.
> 
> Adds inline comments in `.github/dependabot.yml` explaining that only
`default-days` applies there, and aligns the top-of-file comment and
**`docs/maintaining.md`** so the week-long wait is described as applying
only to major **Cargo or npm** releases.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
e37dd57. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@DrunkOnJava
DrunkOnJava merged commit 1c89d7e into main Oct 5, 2026
27 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/c10-zizmor-scorecard branch October 5, 2026 13:54
DrunkOnJava added a commit that referenced this pull request Oct 18, 2026
…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.
DrunkOnJava added a commit that referenced this pull request Oct 18, 2026
…e release binaries (C10) (#733)

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.
  - Every use is re-pinned to one commit of the action's `master` branch, `683b588` (2026-10-16), with the `toolchain` input each already passed. `master` only moves forward, so the pin cannot become an impostor commit again; `stable` had diverged from the commit pinned on 2026-10-05 by the time this landed. zizmor's `ref-version-mismatch` still warns when `master` moves on (#765 replaces the action with `rustup`).
- **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 (#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. The release-binaries job then reads each Linux binary's section headers and fails if `.dep-v0` is gone; on this PR's run it was present in `rvt-info`, `rvt-ifc` and `rvt-analyze` on both musl targets, with `[profile.release] strip = true` unchanged.

**Testing**
- The ci.yml jobs that install from the requirements files run on this pull request.
- release-binaries runs on this pull request because its own workflow file changed (#722).
- publish.yml runs only on a tag, so its cache and concurrency changes are checked by YAML parsing and zizmor alone.
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