Skip to content

chore(dependabot): add cooldown and harden update settings - #193

Merged
mrz1836 merged 1 commit into
masterfrom
chore/dependabot-hardening
Oct 20, 2026
Merged

mrz1836 merged 1 commit into
masterfrom
chore/dependabot-hardening

Conversation

@mrz1836

@mrz1836 mrz1836 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a Dependabot cooldown to every update entry of .github/dependabot.yml and hardens its update settings.
The repository's own files were read to find its ecosystems and the dependencies the owner's inventory exempts; the file was rewritten to the conventions and passed the deterministic checks below before this PR was opened. Only .github/dependabot.yml changes.

Changes

Ecosystem Directory Target branch Change
gomod / master + cooldown: default 3 days; semver patch 3, minor 7, major 14; excludes github.com/mrz1836/*
github-actions / master + cooldown: default 3 days; excludes actions/*, github/*, gitleaks/*, ossf/*
devcontainers / master + cooldown: default 3 days; excludes ghcr.io/devcontainers/features/*

Why a cooldown

A new release must age before Dependabot proposes it: 3 days by default, and for ecosystems that follow semantic versioning 3 days for a patch, 7 for a minor and 14 for a major release.
A compromised or broken release is usually found and pulled within days; the cooldown keeps it out of this repository meanwhile (a supply-chain guard).
Security updates are not delayed: the cooldown applies to version updates only.

Excluded from the cooldown

These come from the owner's own accounts (mrz1836) and from publishers the owner trusts, so their updates arrive at once:

Ecosystem Pattern Why Matches
devcontainers ghcr.io/devcontainers/features/* trusted publisher ghcr.io/devcontainers/features/docker-outside-of-docker, ghcr.io/devcontainers/features/github-cli
github-actions actions/* trusted publisher actions/cache, actions/checkout, actions/create-github-app-token, actions/github-script, actions/upload-artifact
github-actions github/* trusted publisher github/codeql-action
github-actions gitleaks/* trusted publisher gitleaks/gitleaks-action
github-actions ossf/* trusted publisher ossf/scorecard-action
gomod github.com/mrz1836/* first-party: mrz1836 github.com/mrz1836/go-selfupdate

Notes

Added a cooldown block to all three existing entries (gomod, github-actions, devcontainers on master). Each uses default-days: 3. gomod also gets semver patch/minor/major delays of 3/7/14 days, and each entry exempts only the allowed first-party or trusted-publisher patterns. All other settings, comments and YAML style are unchanged, and the header comment now describes the cooldown. One concern: the excluded trusted publishers (actions/, github/, gitleaks/, ossf/, devcontainers features, mrz1836 modules) skip the delay, so a compromised release from one of them would still be proposed immediately. Security updates are never delayed in any case.

  • gomod /: Added cooldown: default-days 3, semver-patch-days 3, semver-minor-days 7, semver-major-days 14, exclude ["github.com/mrz1836/*"]. (Delays version-update PRs for freshly published third-party modules so malicious or broken releases have time to be caught. The owner's first-party modules are exempt so they update without delay.)
  • github-actions /: Added cooldown: default-days 3, exclude ["actions/", "github/", "gitleaks/", "ossf/"]. (Gives new third-party action releases a 3-day soak before PRs open while trusted publishers stay current. github-actions supports default-days only.)
  • devcontainers /: Added cooldown: default-days 3, exclude ["ghcr.io/devcontainers/features/*"]. (Applies the same 3-day supply-chain soak to devcontainer images and features while the trusted official devcontainers features update immediately. devcontainers supports default-days only.)

Checks passed

  • valid YAML, one document, version: 2, only Dependabot's top-level keys
  • no registries, none added; the other top-level settings unchanged
  • every existing entry kept (3 of 3): its ecosystem, directories and target-branch
  • the existing entries' settings unchanged: schedule, allow, ignore, labels, groups, assignees, commit-message, registries and the rest
  • no new entry
  • target-branch is master on every entry that had none (an existing one is kept)
  • only Dependabot's keys and ecosystems; insecure-external-code-execution only where supported, never newly allow
  • every entry has a cooldown: default-days 3, and semver-patch-days 3, semver-minor-days 7, semver-major-days 14 where the ecosystem takes them
  • cooldown excludes only the inventory's patterns, first-party or trusted (6 allowed)
  • no two entries of one ecosystem update the same directory for the same branch
  • no secret, registry or ${{ }} reference added
  • only .github/dependabot.yml changes (staged and committed alone)

Test plan


Generated with magex dependabot:harden

Add a cooldown to every update entry of .github/dependabot.yml: 3 days,
and for semver ecosystems patch 3, minor 7, major 14, so a release
ages before Dependabot proposes it. Security updates are not delayed.
Excluded from the cooldown, so they update at once:
- ghcr.io/devcontainers/features/* (devcontainers, trusted publisher)
- actions/* (github-actions, trusted publisher)
- github/* (github-actions, trusted publisher)
- gitleaks/* (github-actions, trusted publisher)
- ossf/* (github-actions, trusted publisher)
- github.com/mrz1836/* (gomod, first-party: mrz1836)

Generated with magex dependabot:harden.
@github-actions github-actions Bot added chore Simple dependency updates or version bumps feature Any new significant addition update General updates labels Oct 20, 2026
@github-actions github-actions Bot added the size/S Small change (11-50 lines) label Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage Analysis

🟢 Overall Coverage: 92.0%
No Go files modified in this PR

Project coverage remains at 92.0% (3.3K/3.6K statements)

Changes: 1 config file

Coverage Metrics

Metric Value Grade Trend
Percentage 92.0% 🏆 A 📊
Statements 3.3K/3.6K 🏆 A No change
Quality Score 92/100 🏆 A 📈

Coverage Breakdown

█████████████░░ 92.0%

Resources


Generated via go-coverage • 2026-10-20 02:46:21 UTC

github-actions Bot added a commit that referenced this pull request Oct 20, 2026
🏷️ Generated with GoFortress
@mrz1836
mrz1836 merged commit 411eded into master Oct 20, 2026
28 checks passed
@github-actions
github-actions Bot deleted the chore/dependabot-hardening branch October 20, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Simple dependency updates or version bumps feature Any new significant addition size/S Small change (11-50 lines) update General updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant