Fix Dependabot review query crashing on jq arguments - #3035
jonathanKingston wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Stale comment
Web Compatibility Assessment
No findings. This PR touches only
.github/workflows/dependabot-auto-merge.yml(CI automation). Zero changes underinjected/,messaging/,special-pages/runtime code, or platform entry points — nothing is bundled into DuckDuckGo browsers.
Security Assessment
No findings. The diff fixes a
gh api+jqinvocation in the Dependabot auto-merge workflow:
- Before:
gh api … --paginate --jq --arg sha …—gh's built-in--jqdoes not forward jq CLI flags like--arg, causing the step to crash instead of evaluating the idempotency check.- After:
gh api … --paginate --slurp | jq --arg sha …— pipes paginated JSON pages to standalonejq, using[.[][] | …]to flatten multi-page results before selecting the latestdaxtheduckreview.
$PR_HEAD_SHAis sourced from the GitHub Actions context (not arbitrary page input). No messaging trust boundaries, captured globals, API overrides, or secret-handling changes.Info (pre-existing, out of scope): The
approved_idsquery immediately above (L231–232) still uses per-page--paginate --jqwithout--slurp. On PRs with many reviews spanning multiple API pages, dismissals could theoretically miss olderAPPROVEDreviews. This PR does not change that path.
Risk Level
Low Risk — CI-only workflow bugfix for a crashing
jqidempotency guard; no injected runtime, messaging, or browser API surface changes.
Recommendations
- Merge when green — change is narrowly scoped and correct for the reported crash.
- Optional follow-up (info): Consider applying the same
--paginate --slurp | jqpattern to theapproved_idsdismissal loop (L231–232) for consistent pagination handling on review-heavy PRs.Sent by Cursor Automation: Web compat and sec
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/codex/fix-dependabot-review-query")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/codex/fix-dependabot-review-query
git -C submodules/content-scope-scripts checkout origin/pr-releases/codex/fix-dependabot-review-queryPin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "dd4b7cff538b749b516b607aba43e35e063abad1")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/codex/fix-dependabot-review-query
git -C submodules/content-scope-scripts checkout dd4b7cff538b749b516b607aba43e35e063abad1 |
[Beta] Generated file diffTime updated: Fri, 11 Sep 2026 23:09:09 GMT |
Dismissing stale approval — new commits pushed, awaiting Cursor re-review.
There was a problem hiding this comment.
Web Compatibility Assessment
No findings. This PR modifies only .github/workflows/dependabot-auto-merge.yml — GitHub Actions CI infrastructure. There are zero changes under injected/, messaging/, special-pages/, or any bundled artifacts that execute in DuckDuckGo browsers. No browser API overrides, DOM interaction, prototype modifications, or platform entry-point changes are present.
Security Assessment
No findings. The change fixes a broken gh api --jq --arg invocation in the Dependabot auto-merge workflow's idempotency check. It does not touch:
captured-globals.js, messaging transports, or the message bridge- Origin validation,
postMessage, ornativeDatahandling - Remote config, feature gating, or exemption logic
- Any code that runs in a web page context
The workflow logic is unchanged in intent: skip posting a duplicate REQUEST_CHANGES review when daxtheduck already requested changes on the current head SHA.
Risk Level
Low Risk — CI-only shell fix for a paginated jq query; no application runtime, messaging, or browser-injection code is affected.
Recommendations
No action required from a web compatibility or security perspective.
Info (workflow correctness): The fix correctly separates gh api --paginate --slurp from jq --arg, which gh --jq cannot forward. Using [.[][] | …] properly flattens paginated review pages before last selects the latest daxtheduck decision — an improvement over per-page --jq filtering when review history spans multiple API pages.
Sent by Cursor Automation: Web compat and sec


Asana Task/Github Issue: Found while reviewing open Dependabot PRs (#2975, #3016).
Description
When the Dependabot gate declines an update, its latest-review lookup crashes because
gh --jqdoes not accept jq's--argoption. Pipe the paginated JSON to jq and combine pages before choosing the latest decision. This preserves the existing review policy and lets the workflow complete its review/assignment steps.Testing Steps
Checklist
Note
Low Risk
Single-line workflow shell fix for a broken jq invocation; no application or auth logic changes.
Overview
Fixes the Defer to human reviewer step in the Dependabot auto-merge workflow when Anthropic declines an update. The latest-review idempotency check was calling
gh apiwith--jq --arg, which fails because GitHub CLI’s--jqdoes not forward jq’s--arg.The lookup now pipes paginated review JSON through
jq(gh api … --paginate --slurp | jq --arg sha …) and flattens pages with.[][]before picking the lastdaxtheduckdecision. Behavior is unchanged: skip posting anotherREQUEST_CHANGESwhen one already exists on the current head SHA.Reviewed by Cursor Bugbot for commit c670168. Bugbot is set up for automated code reviews on this repo. Configure here.