Human-in-the-Loop Task Manager for AI Agents
Checked December 5, 2026 | All Hooks guides

Resolve Dependabot Alerts with an AI Coding Agent

Dependabot tells you which package is vulnerable, which advisory it is and which version fixes it. Then the alert sits in the Security tab until someone has time to bump the package, update the lockfile, run the tests and open a pull request. With AgentRQ's built-in github hook, each new alert becomes a task for the agent working in your repository. It does that work while you are busy elsewhere, and you review the pull request.

This guide sets it up from start to finish: an event and a trigger, a github hook registration with dependabot.alert routed, and a repository webhook with Dependabot alerts ticked. The same registration can also route issues, pull requests and CI runs: see turn GitHub issues and CI failures into tasks.

This page is one of our Hooks guidelines. It follows the Hooks docs and was checked against AgentRQ v0.22.1 on December 5, 2026. Every AgentRQ screenshot is from a real run, fed by a signed dependabot_alert request like the one GitHub sends.

How it flows: Dependabot opens alert #7 for lodash in acme/storefront-api. The repository webhook, with Dependabot alerts ticked, sends it signed with your secret to the github hook, which checks the signature and the Repositories filter. An alert that was opened, reopened or reintroduced fires dependabot.alert, routed to your dependabot_alert event, and its trigger files the task GH D#7: Command Injection in lodash in storefront-api. A fixed, dismissed or withdrawn alert fires nothing. Your agent bumps the package, runs the tests and opens a pull request, stopping for your Allow before risky commands.

What dependabot.alert Carries

The github hook checks every request's X-Hub-Signature-256 against your webhook secret. It fires dependabot.alert when a Dependabot alert becomes open:

GitHub action Fires dependabot.alert?
created Yes: a new alert
reopened, auto_reopened Yes: a dismissed or fixed alert is open again
reintroduced Yes: the vulnerable version came back
fixed, dismissed, auto_dismissed, withdrawn, assignees_changed No: there is nothing to fix

Each event has a one-line subject made of the alert's number and the advisory's summary, such as GH D#7: Command Injection in lodash, which makes a good task title. Its payload is plain text the agent can read:

text
Dependabot alert #7 opened in acme/storefront-api: Command Injection in lodash
Severity: high
Package: lodash (npm) in admin-ui/package-lock.json
Vulnerable: < 4.17.21; patched in 4.17.21
Advisory: GHSA-35jh-r3h4-6jhm, CVE-2021-23337
https://github.com/acme/storefront-api/security/dependabot/7

When the advisory has no fixed version yet, the payload says patched in none yet. The event's FAQ, which {{EVENT_FAQ}} brings into a task, answers which repository, package, advisory and alert link.

Before You Start

  • → A workspace whose agent works in the repository's code, here storefront-api, with an agent such as Claude Code connected. See connect Claude Code with machines. A task created while the agent is offline waits under Not started until it connects.
  • → Admin access to the GitHub repository, to add a webhook. Dependabot alerts must be on: Settings → Code security → Dependabot alerts.
  • → A server GitHub can reach. On agentrq.com it can. Self-hosted, the github hook must be version 1.4.0 or later (an older one has no dependabot.alert route), and the URL must be reachable: see install a built-in hook and make the payload URL reachable.

Step 1: Create the Event

An event fires the tasks its triggers describe. Open Events in the sidebar.

1. Click + New event.

2. Name it dependabot_alert.

3. Click Create event.

Steps 1 to 3: the Events page with the New event button, the New event form with the name dependabot_alert, and the Create event button

Step 2: Add a Trigger That Writes the Task

Open the event, then:

1. Open the Triggers tab and click + Add trigger.

2. Workspace: the one whose agent fixes the code, here storefront-api.

3. Click + Event subject for the task title. {{EVENT_SUBJECT}} becomes GH D#7: Command Injection in lodash, so every alert gets its own task title.

4. Write the instructions and click + Event payload to add the alert under them. For example:

text
Fix this Dependabot alert: upgrade the package to its patched version,
run the tests and open a pull request that links the alert. If there is
no patched version yet, reply with the options instead.

{{EVENT_PAYLOAD}}

5. Click Create trigger. Leave Who works on it on Agent, and YOLO mode off, so the agent asks you before it runs risky commands such as git push.

Steps 1 to 5: the Triggers tab of dependabot_alert, the New trigger form with the workspace storefront-api, the Event subject button that put {{EVENT_SUBJECT}} in the task title, the instructions with the Event payload button, and Create trigger

Step 3: Register the github Hook and Route dependabot.alert

Open Events → Hooks and click New registration.

1. Name the registration, such as acme/storefront-api security. GitHub never sees it.

2. Pick the github hook. Its card shows 1.4.0 and "Dependabot alerts".

3. Click Generate, then Copy the webhook secret. GitHub needs it in step 4, and AgentRQ stores it encrypted and never shows it again.

4. Repositories: acme/storefront-api, your repository's owner/name. It is optional, but with an organization webhook it keeps other repositories' alerts out of this workspace. Branches does not apply to Dependabot alerts.

5. Route dependabot.alert to dependabot_alert. Leave the other events Not routed, or route them to events of their own.

6. Click Create registration.

Steps 1 to 6: the New registration form with the name acme/storefront-api security, the github hook 1.4.0, the Generate and Copy buttons for the webhook secret, acme/storefront-api under Repositories, dependabot.alert routed to dependabot_alert, and Create registration

7. Click Copy URL. The registration's page now shows its payload URL, ending in ?agentrq_hook_token=…. This is the only time the full URL is shown, so copy all of it, token included. If you lose it, Rotate token makes a new one.

Steps 1 and 2: the registration's page with the payload URL, the Copy URL button, and the route dependabot.alert to dependabot_alert

Step 4: Add the Webhook in GitHub

In the repository, open Settings → Webhooks → Add webhook. For an organization, use the organization's Settings → Webhooks instead, and keep Repositories set in step 3.

1. Payload URL: the URL you copied, with its agentrq_hook_token.

2. Content type: application/json. GitHub's default, application/x-www-form-urlencoded, is rejected.

3. Secret: the webhook secret from step 3. It is not the hook token.

4. Choose Let me select individual events.

Steps 1 to 4 on GitHub's Add webhook form: the payload URL, application/json and the secret

5. Tick Dependabot alerts. GitHub sends every alert action. The hook acts only on the ones in the table above.

Step 5: GitHub's webhook event list, with Dependabot alerts ticked

6. Click Add webhook.

Try It

The next alert Dependabot opens in the repository arrives as a task under Not started in storefront-api, titled after the alert, and the connected agent picks it up within about a minute. Its instructions hold your text and then the alert. The agent here bumped lodash to 4.17.21, ran the tests and replied with its pull request, which the task's Links panel picked up next to the alert:

Steps 1 to 3: the task GH D#7: Command Injection in lodash in storefront-api, with the alert's severity, package, vulnerable and patched versions, advisory and link in its instructions, and the agent's reply with its pull request

You don't need to wait for a real advisory to test it. On the alert's page in GitHub, Dismiss an open alert, then Reopen it: the reopen fires dependabot.alert. Every request shows up in the registration's Runs tab, and Published means it fired your event:

Steps 1 and 2: the registration's Runs tab, with two Published dependabot.alert deliveries

If No Task Appears

Open the registration in Events → Hooks, then its Runs tab:

What you see Why
Nothing for the alert GitHub did not reach the server, Dependabot alerts is not ticked, the action fires nothing (fixed, dismissed, withdrawn), or the alert is in a repository missing from Repositories. In GitHub, the webhook's Recent Deliveries shows what it sent and the response.
Rejected, the signature does not match The webhook's Secret is not the registration's. Paste the same value in both.
Rejected, the body is not JSON The webhook's content type is form-encoded. Set it to application/json.
Duplicate GitHub redelivered the same request (same X-GitHub-Delivery). It fires nothing twice.
Published, but no task The event has no trigger, or the trigger's workspace is not the one you are looking at.

Check hook deliveries explains every status.

Write Instructions the Agent Can Act On

The payload has the facts. Your instructions set the rules. A few that keep the pull requests small and safe to merge:

  • → Check before changing. "Confirm the alert is still open and no pull request already bumps this package." Dependabot's own security update may have opened one already.
  • → Stay on the patched version. "Upgrade to the first patched version or the closest safe one in the same major, and update the lockfile. Don't upgrade unrelated packages."
  • → Prove it. "Run the test suite and say what you ran." For a major-version jump, ask the agent to list breaking changes instead of guessing.
  • → Link back. "Put the alert link in the pull request description." Dependabot closes the alert when the fix reaches the default branch.
  • → When there is no fix yet (patched in none yet), ask for options: pin, replace the package, or a workaround in your code. A reply is enough here, without a pull request.

Severity is in the payload, so one trigger can treat alerts differently, such as "for low severity, reply with a plan only".

Watch It on Video

Resolve Dependabot Alerts with an AI Coding Agent shows this whole guide on the real app, with voice-over. Jump to Step 1: the event at 0:22, Step 3: the github hook at 1:05, or Try it at 1:55, or watch all 3 minutes.

FAQ

Does this replace Dependabot security updates?

No, it works alongside them. Dependabot's own pull request bumps the version, but it does not fix code the new version breaks. The agent gets the alert along with your repository's tests and rules, so it can finish the job or tell you what blocks it. To fix a failing Dependabot pull request too, route ci.failed with Branches set to dependabot/*/*, which matches branches such as dependabot/npm_and_yarn/lodash-4.17.21, as in fix a red main build.

Can one registration route both issues and Dependabot alerts?

Yes. Route issue.opened and dependabot.alert on the same registration, each to its own event, and tick Issues and Dependabot alerts on the same webhook.

What about alerts that were open before I set this up?

The webhook only sends changes. For a backlog, dismiss and reopen the alerts you want worked on, or use the scheduled route in wake AI agents on Dependabot alerts. It lists every open alert on a schedule and works on servers without this hook version.

Does it work with Codex, Antigravity or other agents?

Yes. The task goes to whatever agent is connected to the workspace: Claude Code over its channel, or Codex, Gemini CLI, Antigravity and others through the ACP Gateway. See connect agents.

Can the agent dismiss the alert or comment on it?

The hook only reads from GitHub. For the agent to push, open pull requests or dismiss alerts, give the workspace GitHub access, such as the GitHub CLI, and say so in the trigger's instructions.

Start Free