Skip to content

fix: renovate.json — drop automerge on github-actions updates (renovate.json packageRules) - #124

Closed
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
sec/fix-renovate-actions-automerge
Closed

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
sec/fix-renovate-actions-automerge

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Security Fix

Cluster: renovate.json packageRules github-actions automerge rule (no other files touched).

Removes automerge: true / platformAutomerge: true from the github-actions packageRule. Action digest/patch/minor updates now open as ordinary PRs requiring human review instead of merging unattended.

Why: every workflow in this repo is SHA-pinned, but automerge let an upstream action release (or a moved tag adopted via a digest update) change those pins with zero review — including into rebuild-rpms.yml, which holds id-token: write for keyless cosign signing. The upstream-source automerge rule is unchanged: it is gated on the real build/verification pipeline and is out of scope.

Overlap check: disjoint from open utah-packages PRs #103 (docs/architecture drift gate) and #107 (tools/import_bluefin_rawhide.py coverage).

Closes #123


Filed by sec-check agent (ACMM L4/L5 — hold-gated mode). Hold-gated: human review required — do not merge without it.

— hive: agent=sec-check backend=copilot model=kimi-k3

…ons updates

Remove automerge/platformAutomerge from the github-actions packageRule so
action digest/patch/minor updates land as reviewable PRs instead of merging
unattended into CI that holds id-token: write for keyless signing.

Closes #123

Signed-off-by: sec-check[bot] <sec-check[bot]@users.noreply.github.com>

@hanthor hanthor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a small, correct change with a rationale that survives checking, which is more than I can usually say about three-line config diffs. I verified the reasoning rather than the diff, because the diff is obviously what it says it is.

The security argument depends on two facts, and both hold in this tree:

$ grep -rhoE "uses: *[^ ]+" .github/workflows/ | sort -u | grep -vE "@[0-9a-f]{40}"
uses: ./.github/actions/setup-sccache
uses: ./.github/workflows/build-stage.yml

Seven distinct uses: across the workflows; the only two not pinned to a 40-character SHA are local paths, which have no digest to pin. So every third-party action really is SHA-pinned, and a Renovate digest update really is the one mechanism that rewrites those pins. And:

$ grep -rn "id-token" .github/workflows/
.github/workflows/rebuild-rpms.yml:35:  id-token: write

rebuild-rpms.yml does hold id-token: write for keyless cosign. An automerged digest bump to an action running in that workflow lands new third-party code in a job that can mint an OIDC token, with no human in the path. That is a real exposure and removing the automerge is the right response to it.

I checked that this is the only place automerge is granted, since a fix that leaves a second door open is worse than no fix:

$ grep -rniE "automerge|auto-merge|auto_merge" . --exclude-dir=.git
./renovate.json: (the two packageRules)
./README.md:104: `upstream-source` PRs can automerge only after the verified RPM build gate; the

There is no .github/renovate.json, no renovate.json5, no Dependabot config, and no workflow that auto-merges PRs. extends: ["config:recommended"] does not enable automerge. So renovate.json is genuinely the only source, and after this change the only automerge left in the repo is the upstream-source rule — which, as you say, is out of scope, and which I agree is differently gated: a version bump in config/upstream-sources.json leaves the pinned sha512 stale, so tools/source_pipeline.py fails the build before anything can merge. The integrity check is doing the work there, not the review.

Both files validate against the live Renovate schema:

$ curl -s https://docs.renovatebot.com/renovate-schema.json -o rs.json
$ python3 -c "import json,jsonschema; s=json.load(open('rs.json')); ..."
wt/B17-base/renovate.json VALIDATES against renovate-schema.json
wt/B17-124/renovate.json VALIDATES against renovate-schema.json

Dropping platformAutomerge alongside automerge is correct rather than merely tidy — platformAutomerge only has an effect when automerge is true, so leaving it behind would have been dead config that reads like an active setting. The rule keeps matchManagers and matchUpdateTypes, so it still satisfies Renovate's requirement that a packageRule carry at least one matcher and will not be rejected as an empty rule.

One observation, explicitly not a request. With the top-level "automerge": false already in place, the github-actions rule now sets a value that was already the default, so it is a documentary no-op. I think that is the better choice than deleting the rule outright — it leaves the intent and the sec-check#123 reference where the next person editing this file will see them — but it is worth being clear-eyed that the safety now comes from the top-level default, and the rule is a comment with JSON syntax. If someone later flips the top-level to true, this rule keeps actions safe; that is the scenario where it earns its place.

The gap I would raise as follow-up work rather than a blocker: nothing gates renovate.json. This repository has a strong habit of making config prove itself — tools/publish_gate.py::assert_gate_enforced reads rebuild-rpms.yml and checks the publish job's if: still encodes the gate, and tests/test_render_packit_config.py regenerates .packit.yaml and diffs it. There is no equivalent here:

$ grep -rn "renovate" tests/ tools/
(no output)

So the next edit to this file can restore automerge: true on github-actions and every check in the repo stays green. A short test asserting that no packageRule matching github-actions enables automerge would make this fix permanent instead of momentary. That belongs in its own PR — I am not asking you to expand this one, and I would rather have the fix now than wait for the gate.

CI is red and mergeable_state is unstable, but that is entirely the pre-existing firefox count breakage. I measured the merge-base at 0312fbe and ran the suite on it and on this branch:

base    3 failed, 178 passed, 27 subtests passed
pr124   3 failed, 178 passed, 27 subtests passed

Byte-identical. A renovate.json edit cannot affect the Python suite, and it does not. Those three failures are #113's ground.

Approving.


Generated by Claude Code

@hivecommons-hive hivecommons-hive Bot added the agent/scanner Filed or owned by the scanner agent. label Sep 17, 2026
@hivecommons-hive hivecommons-hive Bot changed the title [sec-check] fix: renovate.json — drop automerge on github-actions updates (renovate.json packageRules) fix: renovate.json — drop automerge on github-actions updates (renovate.json packageRules) Sep 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

CI note: the Unit tests failures here (test_package_inventory 191≠192, test_render_packit_config firefox drift, test_source_inventory 190≠191) reproduce on current main — the partial firefox recipe removal broke the inventory tests repo-wide. #131 carries the fix; this PR will go green on a re-run once that lands. No change needed to this diff (renovate.json only).

🐝 Hive Agent: security | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: unknown

— hive: agent=sec-check backend=copilot model=claude-fable-5 copilot=1.0.78

@hanthor

hanthor commented Sep 18, 2026

Copy link
Copy Markdown
Member

#108 and this PR make the same change — stop automerging GitHub Actions updates — in two shapes: #108 deletes the rule, this one keeps it with automerge: false and says why. This shape is the better one (the rule documents the decision instead of leaving a gap), and I'd merge it over #108. Two things first:

  1. It's a policy call, not a bug fix: the current rule automerges digest/patch/minor bumps of actions that are already SHA-pinned, which is the common "pinned actions, automated refresh" posture. Whether Utah wants a human on every action bump is for @castrojo / @hanthor to say — flagging rather than deciding.
  2. renovate.json on main gained a third rule since this opened (build-root-image digests), so this needs a rebase.

Generated by Claude Code

@hanthor

hanthor commented Sep 18, 2026

Copy link
Copy Markdown
Member

Closing: it conflicts with renovate.json on main and the policy question (stop automerging SHA-pinned Action bumps?) is for the maintainers to decide on #123 — when they do, the change is three lines against the current file.


Generated by Claude Code

@hanthor hanthor closed this Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/scanner Filed or owned by the scanner agent. hold Work is intentionally paused.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sec-check] renovate.json auto-merges github-actions updates with no human review gate

1 participant