Skip to content

ci: grant contents:write to dependabot-automerge (fix runtime-denied merge) - #93

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/dependabot-automerge-contents-write
Nov 10, 2026
Merged

hyperpolymath merged 3 commits into
mainfrom
claude/dependabot-automerge-contents-write

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Fixes a real GitHub Actions permissions bug flagged by the Hypatia neurosymbolic scan (one of its pre-existing critical findings): the Dependabot auto-merge workflow runs gh pr merge --auto (enable auto-merge) and gh pr review --approve, but declares only contents: read. Enabling/completing auto-merge is a write, so the merge is denied at runtime.

Changes

  • .github/workflows/dependabot-automerge.yml: permissions.contents read → write (least privilege for the merge the job performs). pull-requests: write and the narrow-scope NB (no secrets: read / id-token: write) are unchanged. One line.

RSR Quality Checklist

Required

  • Tests pass — N/A: workflow-permissions change; just/nickel not installed here.
  • No banned language patterns; no unsafe; no banned functions.
  • SPDX header present/unchanged.
  • No secrets, credentials, or .env files included. Permissions kept least-privilege — only contents raised to write; no secrets/id-token added.

As Applicable

  • CI/workflow change documented here.
  • STATE/ECOSYSTEM/META/CHANGELOG — N/A.

Testing

  • The change is the textbook fix for Hypatia's finding ("performs a write but grants no contents: write … denied at run time"): enabling auto-merge via gh pr merge --auto requires contents: write.
  • Not verifiable here: the Hypatia action can't be run in this environment. This clears one of Hypatia's criticals; the rest (the .machine_readable/6a2/ → descriptiles/ migration, tracked as STATE.a2ml issue Migrate .machine_readable to the descriptiles/6a2 layout (blocked: contractiles.mjs needs Node) #18, and related) are canon/estate-gated and out of scope — so this PR alone won't turn the Hypatia check green.

Note

This workflow is header-marked "managed by gh actions-lock" (which pins action SHAs). The permissions edit is orthogonal to SHA-locking and should survive regeneration — but flagging in case your lock tooling rewrites the file; if so, the contents: write value needs to be carried in the lock source.


Generated by Claude Code

…merge)

The Dependabot auto-merge workflow runs `gh pr merge --auto` (enable auto-merge)
and `gh pr review --approve`, but declared only `contents: read`. Enabling and
completing auto-merge is a write, so the merge is denied at runtime — the
critical finding raised by the Hypatia neurosymbolic scan. Raise the grant to
the least privilege the job needs: `contents: write`, keeping `pull-requests:
write` and the narrow-scope NB (no secrets:read / id-token:write).

Clears one of the pre-existing Hypatia critical findings. The rest (the
6a2 -> descriptiles/ migration tracked as STATE issue #18, etc.) are
canon/estate-gated and out of scope here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1XmMC49T8sZ3uUuvrgB7y
@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 09e79fc2-beee-40e8-9fda-5f08c1935849
Commits

Reviewing files that changed from the base of the PR and between 8f956e0 and 8704e5f.

Files selected for processing: 1

  • .github/workflows/dependabot-automerge.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 10, 2026 14:06
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T14:06:23.037052Z
We couldn’t complete this review. Comment @codex review to try again.
d4cad39 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 10, 2026 17:10
@hyperpolymath
hyperpolymath merged commit 563b306 into main Nov 10, 2026
21 checks passed
@hyperpolymath
hyperpolymath deleted the claude/dependabot-automerge-contents-write branch November 10, 2026 17:15
@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants