Skip to content

feat(ci): review Dependabot PRs with Claude#17

Closed
zfarrell wants to merge 1 commit into
mainfrom
feat/claude-review-dependabot
Closed

feat(ci): review Dependabot PRs with Claude#17
zfarrell wants to merge 1 commit into
mainfrom
feat/claude-review-dependabot

Conversation

@zfarrell

@zfarrell zfarrell commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Stop skipping Dependabot PRs in the Claude review workflow: removes the dependabot[bot] skip gates, adds dependabot[bot] to allowed_bots, and routes write operations through the App token (Dependabot runs get a read-only GITHUB_TOKEN).

Requires HOTDATA_AUTOMATION_PRIVATE_KEY and ANTHROPIC_API_KEY to be set as Dependabot secrets (org-level) — Dependabot runs can't see Actions secrets, so without this the review step fails.

continue-on-error: true
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ steps.app-token.outputs.token }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

super nit (not blocking): This now hands the org-scoped App token (owner: hotdata-dev, no repositories: restriction) to the Claude action, where it processes untrusted content — the PR diff and prior comment threads. Previously the action ran with the repo-scoped default GITHUB_TOKEN, so this widens the blast radius of any prompt injection: combined with Bash(gh pr comment:*) / Bash(gh pr review:*) in allowedTools (which permit --repo), a successful injection could act on other repos in the org or auto---approve.

The content is already marked untrusted in the prompt and the tool set is constrained, so this is inherent-design risk rather than a new bug. If you want to tighten it, consider scoping the App token with repositories: ${{ github.event.repository.name }} on the create-github-app-token step so the review token can only touch this repo.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approving. The Dependabot enablement is coherent: no PR code is executed in this workflow (only gh api reads and the prompt is loaded from a separate main checkout), write paths consistently use the App token where the read-only GITHUB_TOKEN would fail, and the read-context step correctly keeps the default token. One non-blocking security note left inline re: scoping the App token to this repo.

@zfarrell

zfarrell commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing — reviewing Dependabot version-bump PRs with Claude adds little signal and would require mirroring secrets into the Dependabot secret store (widening the secret/security surface). Keeping the existing skip; handling Dependabot toil via CI-gated auto-merge in hotdata-cli instead.

@zfarrell zfarrell closed this Jun 8, 2026
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.

1 participant