Skip to content

CI: zizmor, CodeQL, pinned build tools, locked builds - #59

Merged
allwinpower merged 3 commits into
mainfrom
allwin/ci-hardening
Oct 28, 2026
Merged

allwinpower merged 3 commits into
mainfrom
allwin/ci-hardening

Conversation

@allwinpower

@allwinpower allwinpower commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Checks that catch problems in the workflows and the build, from a security review of the repository.

New checks

  • zizmor job in ci.yml: audits the workflows for template injection, broad permissions, persisted credentials and unpinned or known-bad actions. Findings of medium severity and up fail it; ci-required waits for it. Two low findings remain (./ paths for the reusable build workflow) and are only reported.
  • codeql.yml: CodeQL for Rust (build mode none) and for the workflows, on pushes to main, pull requests and weekly. Results go to code scanning.
  • ipstack-upstream.yml: weekly, compares third_party/ipstack with upstream from the commit named in PATCHES.md and opens an issue when upstream has newer commits. Dependabot skips the vendored copy. Upstream is 13 commits ahead today, so the first run opens one.
  • cargo-deny also runs bans (duplicate versions only warn).
  • Dependabot waits 7 days before updating to a new release (cooldown), so a compromised release has time to be caught. Security updates do not wait.

Hardening

  • Every actions/checkout uses persist-credentials: false. The two jobs that push (Homebrew tap, AUR) clone their target with their own credentials.
  • pages.yml: pages: write and id-token: write move from the workflow to the deploy job.
  • zig 0.17.0 and cargo-zigbuild 0.24.0 are pinned; CI used those versions as latest today. Dependabot cannot bump these two pins.
  • cargo xtask and the builds it runs pass --locked, as does cargo test and the musl client build in CI.
  • Two shellcheck warnings (SC2155) in build-release.yml fixed.

Checked locally

  • actionlint clean; zizmor --min-severity medium clean, with online audits (before: 2 high, 19 medium offline).
  • cargo deny check advisories bans licenses sources: ok.
  • cargo xtask servers with the locked alias builds all four servers.
  • The ipstack check, dry-run against the real APIs, finds 13 commits and writes the issue body.

- A zizmor job audits the workflows (medium severity and up fails),
  and ci-required waits for it.
- CodeQL analyzes the Rust code and the workflows on pushes, pull
  requests and weekly.
- Checkouts keep no token in .git/config (persist-credentials: false);
  no job pushes with it.
- Pages permissions move from the workflow to the deploy job.
- zig 0.17.0 and cargo-zigbuild 0.24.0 are pinned, and xtask builds
  pass --locked, so a release build uses the tools and the lock file
  it was tested with.
- cargo-deny also checks bans.
- A weekly job opens an issue when upstream ipstack has commits the
  vendored copy is not based on, since Dependabot skips it.
@allwinpower
allwinpower enabled auto-merge (squash) October 28, 2026 01:41
@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.

- Format the --locked arguments in xtask.
- The install-action pins name their release (v2.87.31), not v2,
  which now points elsewhere.
- Dependabot waits 7 days before updating to a new release; security
  updates do not wait.
@allwinpower
allwinpower merged commit cebf897 into main Oct 28, 2026
39 of 41 checks passed
@allwinpower
allwinpower deleted the allwin/ci-hardening branch October 28, 2026 02:01
@allwinpower allwinpower mentioned this pull request Oct 28, 2026
allwinpower added a commit that referenced this pull request Oct 28, 2026
First release candidate for 0.3.1.

- Version 0.3.1-rc.1.
- The `[Unreleased]` changelog section becomes `[0.3.1] - 2026-10-28`,
and its compare links are updated.

**Why 0.3.1:** fixes and hardening only (#58, #59 and
GHSA-2c7x-2cp2-g77m); no change in behaviour, so a patch release.

**Deploy step:** after merge, tag `v0.3.1-rc.1` on the merge commit. The
Release workflow then publishes a prerelease. Homebrew does not get
prereleases.

This is also the first release built with the pinned zig 0.17.0,
cargo-zigbuild 0.24.0 and `--locked` (#59).
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