Skip to content

ci: harden CI for the published redis-mcp crate - #136

Merged
joshrotenberg merged 2 commits into
mainfrom
ci/harden-published-crate
Oct 26, 2026
Merged

joshrotenberg merged 2 commits into
mainfrom
ci/harden-published-crate

Conversation

@joshrotenberg

Copy link
Copy Markdown
Contributor

Now that redis-mcp 0.1.0 is on crates.io, tighten CI around what consumers see.

Changes

  • Audit workflow (.github/workflows/audit.yml): cargo-deny on PRs, main, and weekly (Mon 06:17 UTC). Advisories run as their own job so a fresh RustSec advisory doesn't mask license/ban/source regressions. deny.toml allows only the permissive licenses currently in the graph, denies unknown registries/git sources and wildcards, and warns on duplicate versions.
  • rustdoc gate: cargo doc --workspace --all-features --no-deps with -D warnings in the rust job (mirrors docs.rs).
  • stable (latest dependencies) job: cargo update + check and lib/bin tests on current stable. Library consumers don't use our lockfile, so this catches semver-compatible dependency releases that break the build.
  • Concurrency: superseded PR runs are cancelled; main keeps every run.
  • timeout-minutes on every job.
  • Swatinem/rust-cache saves only from main, so PR job caches stop evicting main's.

Local validation

  • cargo deny --all-features check: advisories ok, bans ok, licenses ok, sources ok
  • RUSTDOCFLAGS=-D warnings cargo doc clean for both crates
  • latest-deps job simulated on stable 1.99.1: check passes, 139 + 22 lib/bin tests pass

Follow-ups (tracked separately)

- add an Audit workflow running cargo-deny (advisories separately from
  bans/licenses/sources) on PRs, main, and a weekly schedule, with a
  permissive-only deny.toml policy
- gate rustdoc warnings (docs.rs builds with all features)
- add a stable-toolchain job that resolves the latest compatible
  dependencies, as crates.io consumers do without our lockfile
- cancel superseded PR runs, add job timeouts, and only save
  rust-cache from main so PR runs stop evicting main's caches
The new advisories job flagged tokio 1.53.1 (AsyncFd::new and related
constructors violate I/O safety; fixed in >=1.53.3). Also pin the
cargo-deny action's toolchain to 1.90 to match rust-toolchain.toml.
@joshrotenberg
joshrotenberg merged commit 66f6fca into main Oct 26, 2026
19 checks passed
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.

1 participant