Skip to content

security: add Dependabot so the SHA-pinned actions get bumped - #7

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/6-dependabot-pins
Aug 3, 2026
Merged

security: add Dependabot so the SHA-pinned actions get bumped#7
scttfrdmn merged 1 commit into
mainfrom
fix/6-dependabot-pins

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

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 @v5 nothing 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.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.

The fix

  1. .github/dependabot.yml covering github-actions and pip, weekly with a 7-day cooldown — a freshly published tag is exactly when a compromised or broken one is still unnoticed.
    • Group pattern is *, not actions/*: softprops/action-gh-release isn't under actions/ and would otherwise fall outside the group, which is how bumps get quietly ignored.
    • ruff >=0.16 is explicitly ignored so a Dependabot bump can't undo the deliberate <0.16 cap in pyproject.toml.
    • No reviewers: key — deprecated and inert.
  2. tests/test_ci_hygiene.py makes both halves regressions instead of conventions. Reverting a pin or dropping the Dependabot entry now fails pytest -q, which CI already runs. 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 ImportError degrades 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 passed
  • ruff check . — clean
  • All workflow YAMLs still parse
  • Mutation-tested 5 ways, each caught: unpin a ref; narrow the group pattern; remove the pip entry; delete dependabot.yml; drop a # vX.Y.Z comment. Both files verified byte-identical afterward, tests green again.

Honest note on local runs: pytest -q collects with 2 pre-existing errors on my machine because cwltool isn't installed locally — identical on unmodified main, so unrelated to this change. CI installs it via pip 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.

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
@scttfrdmn
scttfrdmn merged commit d61be07 into main Aug 3, 2026
1 check passed
@scttfrdmn
scttfrdmn deleted the fix/6-dependabot-pins branch August 3, 2026 06:37
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.

Add Dependabot, and pin the remaining floating action tags

1 participant