Skip to content

Harden Dependabot config: cooldown + Go/Rust ecosystems#240

Merged
rongxin-liu merged 4 commits into
mainfrom
rongxin/harden-dependabot-config
May 15, 2026
Merged

Harden Dependabot config: cooldown + Go/Rust ecosystems#240
rongxin-liu merged 4 commits into
mainfrom
rongxin/harden-dependabot-config

Conversation

@rongxin-liu

@rongxin-liu rongxin-liu commented May 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a cooldown buffer to every Dependabot ecosystem block.
  • Adds gomod and cargo ecosystem coverage so existing Rust/Go advisories begin auto-filing.
  • Normalizes the npm block's directory to the same root-relative form (/client) as the rest of the file.
  • Resolves the open zizmor/dependabot-cooldown code-scanning alerts on .github/dependabot.yml.

Cooldown values

For ecosystems that track semver (npm, gomod, cargo):

cooldown:
  default-days: 7
  semver-major-days: 14
  semver-patch-days: 3

For ecosystems that do not track semver (github-actions is pinned by ref/SHA, docker base-image tags don't follow strict semver):

cooldown:
  default-days: 7

Notes on each value:

  • default-days: 7 — Matches zizmor's documented dependabot-cooldown threshold and the broadly-cited "1 week" convention for letting a new release settle before auto-PR. Most documented supply-chain compromises in these ecosystems (xz-utils, ua-parser-js, eslint-scope, node-ipc) were detected and yanked within roughly 24–72 hours of the malicious release; 7 days is a comfortable margin over that observed window. semver-minor-days falls back to this value.
  • semver-patch-days: 3 — Patch releases are predominantly bug or security fixes with small diffs and review surface, so the buffer is shortened to keep patch uptake fast.
  • semver-major-days: 14 — Not for security but for non-security regression signal (API breakage, behavior drift) to surface in upstream issue trackers and downstream consumers before a major bump is auto-PR'd.

Cooldown applies only to version-update PRs. Security-update PRs driven by GHSA advisories bypass cooldown and file immediately, so this configuration does not lengthen exposure to known CVEs.

New ecosystems

gomod and cargo blocks use the directories: plural form to cover all module/crate roots in one entry each:

  • gomodserver, server/fake-antminer, server/fake-proto-rig, plugin/proto, plugin/antminer, plugin/virtual, tests/plugin-contract
  • cargosdk/rust/proto-fleet-plugin, plugin/asicrs

Both ecosystems group version updates into a single PR per ecosystem and ignore semver-major version-update PRs, mirroring the existing npm pattern. Security advisories ignore this filter and continue to file individually.

Until this change, neither ecosystem was being watched by Dependabot, which is why the 16 open Rust and 2 open transitive Go advisories had never produced auto-PRs.

What this closes

  • The open zizmor/dependabot-cooldown code-scanning alerts on .github/dependabot.yml.
  • Unblocks future auto-filing of Rust and Go advisories.

Adds a cooldown window to every ecosystem block (3 days default,
7 for major, 3 for minor, 1 for patch) so freshly published
versions get a buffer before being PR'd — mitigates the
auto-upgrade-on-day-zero supply-chain risk that zizmor's
dependabot-cooldown rule flags. Cooldown applies only to
version-update PRs; security advisories (GHSA) bypass it and
continue to file immediately.

Adds gomod and cargo ecosystem blocks covering the seven Go
modules and two Cargo crate roots, both grouped per-ecosystem
with semver-major version updates ignored (mirroring the existing
npm pattern). Security advisories are unaffected by that filter
and continue to file individually.

Without these, the existing 16 Rust and 2 Go Dependabot alerts
were never auto-PR'd because neither ecosystem was being watched.
Copilot AI review requested due to automatic review settings May 15, 2026 13:10
@rongxin-liu rongxin-liu requested a review from a team as a code owner May 15, 2026 13:10
Comment thread .github/dependabot.yml Fixed
Comment thread .github/dependabot.yml Fixed
Comment thread .github/dependabot.yml Fixed
Comment thread .github/dependabot.yml Fixed
Comment thread .github/dependabot.yml Fixed
Dependabot rejects semver-{major,minor,patch}-days for ecosystems
that don't track semver. github-actions are pinned by ref/SHA and
docker base-image tags don't follow semver, so only default-days
is accepted on those two blocks. npm, gomod, and cargo keep the
full semver-aware cooldown.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the repository’s Dependabot configuration by adding a consistent “cooldown” window for version updates and extending Dependabot coverage to Go modules and Rust crates across the monorepo, aiming to reduce supply-chain risk while enabling automated advisory-driven PR filing.

Changes:

  • Added cooldown settings to each existing Dependabot update block.
  • Added new gomod and cargo update blocks covering multiple module/crate roots via directories:.
  • Grouped Go and Rust version updates into single PRs per ecosystem and ignored semver-major version updates.

Comment thread .github/dependabot.yml Outdated
zizmor's dependabot-cooldown rule requires default-days >= 7;
the 3-day value the rule flagged matches xz/ua-parser-js/eslint
detection windows but sits below the documented threshold, so the
audit kept firing on every block.

Raises default-days to 7 across all ecosystems. Keeps a wider
semver-major-days: 14 for non-security regression signal to surface
in upstream issue trackers before a major bump auto-PRs, and a
narrower semver-patch-days: 3 so patch-level security fixes still
land quickly. semver-minor-days falls back to default-days (7).

Security-update PRs continue to bypass cooldown regardless of these
values, so this does not lengthen exposure to known CVEs.
Other ecosystem entries use root-relative paths (/, /server, ...).
Dependabot's directory values are documented as root-relative;
align the npm block to the same convention.
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated security-focused code review generated by Codex.
It should be used as a supplementary check alongside human review.
False positives are possible - use your judgment.

Scope summary

  • Reviewed pull request diff only (a67a9e3bd8ce5c89cbec3ce14cc5b78cd2faab2a...bb1a5f8231cdfe365201b3dd6a3ecedc4e948328, exact PR three-dot diff)
  • Model: gpt-5.5

💡 Click "edited" above to see previous reviews for this PR.


Review Summary

Overall Risk: MEDIUM

Findings

[MEDIUM] Wildcard major-version ignores can suppress security remediation paths

  • Category: Infrastructure
  • Location: .github/dependabot.yml:60, .github/dependabot.yml:79
  • Description: The new Go and Rust Dependabot blocks ignore version-update:semver-major for every dependency. GitHub documents ignore as applying when Dependabot opens PRs for both version updates and security updates, and update-types can be used inside ignore to filter SemVer levels. (docs.github.com)
  • Impact: If a vulnerable Go or Rust dependency is only fixed in a major release, Dependabot may not raise the remediation PR for the server, plugins, contract tests, Rust SDK, or ASIC plugin. That leaves security alerts requiring manual discovery/remediation and can delay fixes in network-facing miner management components.
  • Recommendation: Do not use a wildcard major ignore for security-sensitive ecosystems. Prefer allowing Dependabot to open major security updates and control routine major version noise with grouping, review policy, or dependency-specific ignores with documented owners and expiration. If major updates must stay blocked, add a separate process that guarantees major-only security fixes are triaged.

Notes

The reviewed diff only changes .github/dependabot.yml; I did not find changed authentication, SQL, RPC, plugin runtime, frontend, protobuf, pool configuration, or command-execution code in scope. YAML parsing and git diff --check passed locally.


Generated by Codex Security Review |
Triggered by: @rongxin-liu |
Review workflow run

@rongxin-liu rongxin-liu merged commit 8e6876b into main May 15, 2026
75 checks passed
@rongxin-liu rongxin-liu deleted the rongxin/harden-dependabot-config branch May 15, 2026 14:25
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.

4 participants