Dependabot does the hard part of security work. It spots the vulnerable package, links the advisory and even tells you the first version that fixes it. Then the alert goes into the Security tab and waits. Someone has to find an hour to bump the package, refresh the lockfile, run the tests and open a pull request. On a busy team, that hour shows up next sprint, or never.
That hour is routine work, which is what coding agents are good at. What an agent lacks is the trigger. Claude Code, Codex or Gemini CLI only act when a message arrives, and a terminal session has no URL GitHub could call.
TL;DR: Point a GitHub webhook at a small, sandboxed hook that verifies the signature, keeps only alerts that just became open, and turns each one into a task in the workspace where your agent works. The agent wakes, bumps the package, runs the tests and replies with a pull request. You review the PR instead of doing the chore. Below is the setup, and what each piece does under the hood.
What does the agent actually need from an alert?
GitHub's dependabot_alert payload is big and nested: the alert, the dependency, the advisory, the vulnerability range, the repository and the sender. An agent can parse all of it, but it shouldn't have to. A good task gives it the facts that matter, in plain text, with one link back:
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
The manifest path tells the agent which lockfile to touch, which matters in a monorepo. The vulnerable range and the patched version tell it where to stop: bump to the fix, don't wander into an unrelated major upgrade. When there is no fix yet, the line reads patched in none yet, and the right answer is a plan, not a PR.
Which alert actions should wake an agent?
GitHub sends a webhook for every change to an alert, not only new ones. Most of them need no work:
| Action | Wake the agent? |
|---|---|
created |
Yes, a new alert |
reopened, auto_reopened
|
Yes, it is open again |
reintroduced |
Yes, the vulnerable version came back |
fixed, dismissed, auto_dismissed, withdrawn, assignees_changed
|
No |
This filtering belongs in front of the agent. If you forward every action, you pay for an agent session to read "alert #7 was dismissed" and decide to do nothing.
How does the webhook become a task?
We built this with AgentRQ, where it is three small pieces:
-
A hook receives the webhook. AgentRQ's built-in
githubhook is a WebAssembly program that runs in a fresh sandbox for every request, with no file system and no network. It checks the signature and turns the payload into a named event. -
An event (
dependabot_alert) is what the hook'sdependabot.alertoutput is routed to. - A trigger on that event creates a task in a workspace, the one where your agent has the repository checked out.
The interesting part is the hook. Stripped down, its Dependabot branch looks like this:
case kind == "dependabot_alert" && p.Alert != nil &&
slices.Contains([]string{"created", "reopened", "auto_reopened", "reintroduced"}, p.Action):
return dependabotAlert(repo, p)
dependabotAlert builds three things from the payload:
-
A subject,
GH D#7: Command Injection in lodash. That becomes the task title, so every alert gets its own task and you can tell them apart on the board. - A plain-text payload, the block shown above.
- A small FAQ: which repository, which package, which advisory, where the alert is. A trigger can pull these into the task too.
Before any of that, the hook does two checks that keep the pipeline honest:
-
The signature. It verifies
X-Hub-Signature-256against the webhook secret. A request that doesn't match is rejected and logged with the reason, so a leaked URL alone can't create tasks. -
The repository filter. It drops alerts from repositories outside an allow-list of globs. That matters when one organization-level webhook covers dozens of repositories but only one workspace should hear about
storefront-api.
Every event also carries GitHub's X-GitHub-Delivery id as its dedup key. GitHub retries webhooks it thinks failed. With the dedup key, a retry is recorded as a duplicate and creates no second task.
How do you set it up?
Four steps, all in the UI. The full guide has a screenshot for every click.
1. Create the event. In Events, click New event and name it dependabot_alert.
2. Add a trigger that writes the task. Pick the workspace where the agent works. Use the event's subject as the task title, and put your rules above the alert:
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}}
Leave YOLO mode off. The agent then stops and asks before risky commands such as git push, and you approve with a button from the browser, your phone or Slack.
3. Register the github hook. In Events → Hooks → New registration:
- Pick the
githubhook (1.4.0 or later) and generate a webhook secret. - Set Repositories to
owner/name. - Route
dependabot.alertto your event, then create the registration. - Copy the payload URL. It carries its own token and is shown only once.
4. Add the webhook in GitHub. In Settings → Webhooks → Add webhook:
- Paste the payload URL.
- Set the content type to
application/json. The form-encoded default is rejected. - Paste the secret.
- Choose Let me select individual events, tick Dependabot alerts and add the webhook.
What does a run look like?
Alert #7 lands as a task titled GH D#7: Command Injection in lodash. Its body holds your instructions and then the alert. The agent connected to the workspace picks it up within about a minute.
In our run, it traced lodash to admin-ui/package-lock.json and bumped it to 4.17.21. It ran all 214 tests, then replied with the pull request link, which the task's Links panel shows next to the alert:
To test without waiting for a real advisory, dismiss an open alert in GitHub, then reopen it. The reopen fires the event. The registration's Runs tab lists each request that fired, marked Published. Fixed or dismissed alerts fire nothing and leave no row.
What instructions keep the PRs mergeable?
The payload carries the facts. Your trigger text sets the rules. These have worked well for us:
- Check first. "Confirm the alert is still open and no PR already bumps this package." Dependabot's own security update may have opened one.
- Stay narrow. "Upgrade to the first patched version, or the closest safe one in the same major. Don't touch unrelated packages."
- Show your work. "Run the test suite and say what you ran." For a major jump, ask for the breaking changes instead of a guess.
- Link back. "Put the alert link in the PR description." GitHub closes the alert once the fix reaches the default branch.
- Branch on severity. The severity is in the payload, so one trigger can say "for low severity, reply with a plan only".
FAQ
Doesn't Dependabot already open fix PRs?
With security updates on, it opens a version bump. It doesn't fix code the new version breaks. The agent gets the alert along with your tests and your repository's conventions, so it can finish the job or tell you what blocks it. To repair failing Dependabot PRs as well, route the hook's ci.failed event with a branch filter of dependabot/*/*.
Which agents does this work with?
Any agent connected to the workspace. Claude Code receives the task over its channel. Codex, Gemini CLI, Antigravity and others receive it through the ACP Gateway.
What about alerts that were already open?
Webhooks only report changes. Dismiss and reopen the ones you want worked on. Or use a scheduled GitHub Actions job that lists open alerts and posts each one to a generic hook, with the alert number as the idempotency key.
Can the agent dismiss alerts or push branches?
The hook only reads. Pushing, opening PRs or dismissing alerts needs GitHub access in the agent's workspace, such as the GitHub CLI, and an explicit line in the trigger's instructions.
What if the payload URL leaks?
Rotate the registration's token: the old URL stops working at once. Even before that, requests without a valid signature are rejected.
How many open Dependabot alerts does your busiest repository have right now? And which would you trust an agent to fix first? Tell us in the comments.
Originally published on the AgentRQ blog. The step-by-step version, with a screenshot for every click, is in the AgentRQ guidelines.





Top comments (0)