security: add Dependabot so the SHA-pinned actions get bumped - #7
Merged
Conversation
All 5 `uses:` refs were already pinned to commit SHAs, which is exactly the situation that needs Dependabot: a SHA never moves, including past a security fix, and unlike `@v5` nothing updates it. Pinning and Dependabot are one control, not two; shipping only one trades a mutable-tag hole for a slow one. Add .github/dependabot.yml covering github-actions and pip, weekly with a 7-day cooldown (a freshly published tag is exactly when a compromised one is still unnoticed). The group pattern is `*`, not `actions/*`, because softprops/action-gh-release — which creates the GitHub Release under `contents: write` — is not under actions/ and would otherwise fall outside the group. `ruff >=0.16` is ignored so a bump can't undo the deliberate cap in pyproject.toml. The exposure here is narrower than the suite's npm/PyPI publishers: nothing in this repo publishes a package. But release.yml holds `contents: write` to create the GitHub Release, so a compromised action in that job can write to this repo and alter published release artifacts. tests/test_ci_hygiene.py makes both halves regressions instead of conventions: reverting a pin or dropping the Dependabot entry fails pytest, which CI already runs via `pytest -q`. It asserts it found >0 refs, so a parser that stops matching fails rather than passing vacuously. `pyyaml` joins the [dev] extra and is imported unguarded — a try/except import degrades to a skip, and a skipped wiring test reports green while asserting nothing. No behaviour change: CI wiring and tests only. Fixes #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6.
The problem
All 5
uses:refs in this repo were already pinned to commit SHAs — which is exactly the situation that needs Dependabot. A SHA never moves, including past a security fix, and unlike@v5nothing updates it. Half a control was in place: the mutable-tag hole closed, and a staleness hole left open where it had been.Pinning and Dependabot are one control, not two. Shipping only one trades a live hole for a slow one.
Scope note, stated plainly: nothing in this repo publishes a package, so the exposure is narrower than the suite's npm/PyPI publishers. But
release.ymlholdscontents: writeto create the GitHub Release, so a compromised action in that job can write to this repo and alter published release artifacts.The fix
.github/dependabot.ymlcoveringgithub-actionsandpip, weekly with a 7-day cooldown — a freshly published tag is exactly when a compromised or broken one is still unnoticed.*, notactions/*:softprops/action-gh-releaseisn't underactions/and would otherwise fall outside the group, which is how bumps get quietly ignored.ruff >=0.16is explicitly ignored so a Dependabot bump can't undo the deliberate<0.16cap inpyproject.toml.reviewers:key — deprecated and inert.tests/test_ci_hygiene.pymakes both halves regressions instead of conventions. Reverting a pin or dropping the Dependabot entry now failspytest -q, which CI already runs. It asserts it found >0 refs, so a parser that stops matching fails rather than passing vacuously.pyyamljoins the[dev]extra and is imported unguarded: atry/except ImportErrordegrades to a skip, and a skipped wiring test reports green while asserting nothing — the exact silent no-op these tests exist to catch.Verification
pytest tests/test_ci_hygiene.py— 3 passedruff check .— cleanpipentry; deletedependabot.yml; drop a# vX.Y.Zcomment. Both files verified byte-identical afterward, tests green again.Honest note on local runs:
pytest -qcollects with 2 pre-existing errors on my machine becausecwltoolisn't installed locally — identical on unmodifiedmain, so unrelated to this change. CI installs it viapip install -e ".[dev]".No behaviour change — CI wiring and tests only. Part of the suite-wide sweep: libs#33/#36, spawn/truffle/lagotto/mcp, python-sdk#11, spawn-ts#73, truffle-ts#47, lagotto-ts#11, advisor-ts#7, miniwdl-spawn#7, airflow-spawn#8, snakemake-executor-plugin-spawn#8.