Skip to content

Bring the repo's GitHub setup up to a professional standard - #228

Merged
saworbit merged 5 commits into
mainfrom
chore/github-hygiene
Nov 15, 2026
Merged

saworbit merged 5 commits into
mainfrom
chore/github-hygiene

Conversation

@saworbit

@saworbit saworbit commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

What and why

The repo's CI ran on Ubuntu only. Its one required check, Build and test, never reported on Markdown-only pull requests, so those could never merge, and the audit, MSRV and docs jobs weren't required at all. Several files pointed at things that don't exist (Discussions, a Slack channel, release branches, docs/security/), and a Kyber key pair from a pre-reset build was still tracked.

CI (ci.yml)

  • Build and test is now a gate job that passes only when every other job passes, so branch protection needs no change. A new job is required as soon as it's added to the gate's needs.
  • Jobs: fmt and clippy (also with storage/uring), tests on Linux, Windows and macOS, cargo check of the libraries and binaries on rust-version (read from Cargo.toml; the dev-dependencies need a newer Rust), rustdoc with -D warnings, cargo audit and cargo deny, dependency review on pull requests, typos, actionlint and zizmor.
  • Every cargo command runs with --locked. There are no paths filters. A weekly run catches new advisories and new lints.

New workflows (not required to merge)

  • codeql.yml: Rust and Actions analysis, with results in code scanning.
  • scorecard.yml: OpenSSF Scorecard, which publishes the README badge.
  • docker.yml: hadolint, an image build, and a smoke test that writes and reads a capsule on a fresh volume as the non-root user.
  • links.yml: lychee over the Markdown, weekly and on Markdown changes.
  • labeler.yml: path labels, on pull_request only, never pull_request_target, and skipping Dependabot. Area labels go on any PR touching the area. The kind labels (documentation, dependencies, build, ci) go only on PRs that change nothing else, since release notes sort by them.

Releases (release.yml)

A vX.Y.Z tag is checked against the workspace version, and the whole CI suite runs on the tagged commit. Then spacectl is built with no cache for x86_64 and aarch64 Linux, Windows (static CRT) and Apple Silicon. The release gets the archives, SHA256SUMS, a build provenance attestation per archive, and the attestation bundle as an asset, for offline gh attestation verify --bundle and Scorecard's Signed-Releases check. A pull request that changes the workflow runs the builds without publishing, so this one exercises it.

Supply chain

  • Every action is pinned to a commit. A job gets a read-only token unless it needs more, and checkouts don't keep the token.
  • The softprops release action is replaced with gh, and dtolnay/rust-toolchain with the runners' own rustup.
  • Dependabot now covers the Docker base images too, which are pinned by digest. It waits seven days before proposing a new version, puts action bumps in one PR, and no longer titles PRs deps(deps):.

Repo files

  • New: .gitattributes (LF everywhere), .editorconfig, .dockerignore, SUPPORT.md, CITATION.cff, .github/release.yml (release note sections).
  • The bug and feature forms ask for area, version, OS and data at risk. The backport form is gone, since only main gets fixes.
  • The Dockerfile builds on rust:1-bookworm, pinned by digest. The old rust:1.89-bookworm tag is frozen upstream, so its digest could never update. The image runs as a non-root user that can write /data, drops the unneeded apt layer, and builds with --locked. Its header documents --init (spacectl doesn't handle SIGTERM as PID 1) and bind-mounting for uid 10001.
  • Cleaned up deny.toml (pre-reset exceptions) and _typos.toml. The stale references in CONTRIBUTING.md and GOVERNANCE.md are fixed.
  • The new link check found broken links: old CHANGELOG entries now point at archive/pre-reset-2026-10, and docs/capsule.md no longer points at a deleted gc.rs.
  • crates/protocol-s3/space.kyber.key is no longer tracked, and *.key, *.pem and .env are ignored.

See docs/CI_CD_STRATEGY.md for the full picture.

Needs a repository setting

Dependency review fails until the dependency graph is enabled (Settings → Advanced Security). It is part of the required Build and test gate, so this PR, and every PR after it, is blocked until then.

Type

  • Build, CI or dependencies
  • Docs only (in part)

Checklist

  • actionlint, zizmor --persona=pedantic (one Scorecard finding left, since its publish step needs that exact workflow shape), typos
  • cargo deny --locked check, cargo audit --deny warnings
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked
  • The Docker smoke test commands, run against a local spacectl
  • CHANGELOG.md has an entry

CI ran on Ubuntu only, its required check never ran on Markdown-only
pull requests, and the audit, MSRV and docs results weren't required to
merge. The required "Build and test" check is now a gate job that passes
only when every CI job passes. The jobs: fmt and clippy, tests on Linux,
Windows and macOS, cargo check on rust-version, rustdoc with warnings
denied, cargo audit and cargo deny, dependency review, typos, actionlint
and zizmor. Every cargo command runs with --locked.

New workflows run CodeQL, OpenSSF Scorecard, a Docker image build with a
smoke test, a link check and a path labeler. Releases build spacectl for
four targets after the whole CI suite passes, and publish SHA256SUMS and
build provenance attestations. Every action is pinned to a commit, and
jobs get a read-only token unless they need more.

The Docker image runs as a non-root user that can write /data, from
base images pinned by digest. Dependabot covers those too, with a
cooldown on new versions.

Adds .gitattributes, .editorconfig, .dockerignore, SUPPORT.md and
CITATION.cff. Stale references to Discussions, Slack and release branches
are gone. crates/protocol-s3/space.kyber.key, a key pair a pre-reset build
left behind, is no longer tracked.
@github-actions github-actions Bot added documentation Improvements or additions to documentation protocol-s3 build ci labels Nov 14, 2026
@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.

The link check found CHANGELOG entries pointing at pre-reset docs, which
now point at the archive branch, and capsule.md pointing at a gc.rs
that no longer exists. The rust-version check covers libraries and
binaries only, since serial_test needs Rust 1.93.1; the docs now say
the tests need a newer stable. The labeler skips Dependabot's pull
requests, which get a read-only token. The release build drops an
unused rustup fallback, and a dry run gives way to a newer push.
gh attestation verify --bundle can then check a download offline, and
Scorecard's Signed-Releases check, which only looks at release assets,
counts it.
The labeler gave almost every pull request the documentation label,
since nearly all of them edit CHANGELOG.md, and release notes would have
filed fixes and features under Documentation. The kind labels now go
only on pull requests that change nothing else.

The Docker builder pinned rust:1.89-bookworm, a tag upstream stopped
updating in 2025, so Dependabot could never move its digest. It now
builds on rust:1-bookworm, pinned by digest and kept current by
Dependabot. The msrv job already checks rust-version, so the Dockerfile
check against it is gone. The Dockerfile header says to run with --init,
since spacectl doesn't handle SIGTERM as PID 1, and how to bind-mount a
host directory for uid 10001.

The Windows release binary links the C runtime statically, so it runs
without the VC++ redistributable. Comments no longer claim that security
updates skip the cooldown while they're switched off, or that the audit
tools drift without a commit.
@saworbit saworbit removed the documentation Improvements or additions to documentation label Nov 15, 2026
@saworbit
saworbit marked this pull request as ready for review November 15, 2026 01:16
@saworbit
saworbit merged commit d5db5ee into main Nov 15, 2026
34 of 36 checks passed
@saworbit
saworbit deleted the chore/github-hygiene branch November 15, 2026 01:16
saworbit added a commit that referenced this pull request Nov 15, 2026
The Dockerfile header from #228 told people to run the image with
--init, since spacectl ignored signals as PID 1. It handles them now.
The Docker workflow checks it: docker stop must end serve-s3 in under
8 s with exit status 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants