Skip to main content

Automate CVE triage and fixes with Claude Code, GitHub and Slack (any GitHub plan)

Mitchell Tessier

In this video Mitch builds a qbash Task called CVE response that takes each new security advisory from detection to a merged fix or a written decision. Each advisory that matches a watched repo gets its own Slack thread with its whole history, and the setup works on any GitHub plan. VulnCheck counted more than 100,000 CVEs published in 2026 by November 13, against 48,151 in all of 2025.

What's covered

  • What GitHub gives you for dependency alerts today, and what it costs
  • The demo repo with two known advisories
  • Building the CVE response Task and adding your own rules
  • How the Task matches packages and decides whether an advisory affects your code
  • A run that ends with a fix PR merged from Slack
  • What it costs, and what the Task can't see

What GitHub gives you today

Dependabot alerts are free on every plan and match the versions in your lockfiles to known advisories. Since April 2026 you can assign an alert to Copilot, Claude or Codex, and the agent opens a draft PR with a fix. That needs GitHub Code Security at $30 per active committer per month, plus a Copilot plan. Reachability analysis arrived in public preview in October 2026 and checks whether your code calls the vulnerable function. It covers JavaScript and TypeScript, and only on GitHub Enterprise Cloud, so a Free or Team plan gets no verdict.

Either way the result is a draft PR that someone still has to pick up, watch and merge. An advisory with no patch yet stays open until someone remembers to check back. Snyk, Socket, Semgrep and Aikido go further, but they charge per developer whether or not any advisory applies to you. Mitch puts that at $200 to $300 or more a month for a team of ten.

The demo repo

The demo is a Node billing service, mitch-aisle/billing-service, with two open Dependabot alerts:

  • The accounting sync worker pins node-fetch 2.6.6 in workers/accounting-sync/package-lock.json. That version forwards secure headers when a redirect goes to another site (GHSA-r683-j2x4-v87g, CVE-2022-0235). The worker posts events to customer URLs with a bearer token in the authorization header.
  • The main package-lock.json pins zod 3.22.4, whose advisory (GHSA-mrhx-c7xc-m3w5, CVE-2023-54404) is about array schemas. The service's Zod schema has none.

Build the Task

A Task is an AI cloud function written in Python that qbash hosts on secure cloud infrastructure. Tasks have:

  • Inline prompts, such as the cve-triage prompt below
  • Version control, with every change saved as a version you can go back to
  • A log for every run
  • Schedules, so this one runs every hour

Claude Code builds the Task through the qbash MCP from a short spec of the job. The task builder writes the Task, then asks for the GitHub and Slack accounts to use and the repos to watch. Each watched repo also gets one workflow file, .github/workflows/security-fix.yml, where a coding agent runs.

The spec in the video lists the Task's inputs (repos, slack_channel, approvers and slack_form) and its rules. The rules are constants at the top of the script, so a team can read and change them:

HOLD_HOURS = 48                    # hold a fixed version published to npm less than 48 hours ago
PAGE_SEVERITIES = ["CRITICAL"]     # these severities ping someone
AUTO_MERGE_PATCH = False
FIX_WORKFLOW = "security-fix.yml"

The 48-hour hold is one of the rules Mitch writes in for his team. The Task keeps its state in a qbash Memories folder called CVE response, with one document per lockfile and one per advisory.

How the Task decides

On each scheduled run the Task reads each repo's default branch, and it only reads a lockfile again if that file has changed. It sends every package and version to OSV.dev's free batch API, so the matching runs with no AI in it.

For each match, an inline prompt called cve-triage reads the code that uses the package. In the video it runs on Claude Sonnet 5.5 with structured output. Its system message opens with "You triage one security advisory for an npm package against the source files of one repository." The prompt gets the advisory with its severity, KEV status and EPSS score, plus the source files with numbered lines, and returns one of four verdicts:

  • not_affected, when the advisory needs a condition this code does not meet
  • unreachable, when the vulnerable function exists in the installed package but this code never calls it
  • affected, when the code calls the vulnerable function or uses the feature the advisory describes
  • uncertain, when it cannot tell from the files given

The verdict has to quote the file and line. Python checks that evidence, and if the evidence is missing or wrong, the verdict becomes affected. An advisory with no patch is checked again every day, and the fix starts once a patched version ships. For advisories marked affected or uncertain, the Task starts the fix workflow, and Claude Code writes the fix in GitHub Actions.

Run it

Mitch runs the Task on mitch-aisle/billing-service with the Slack channel for advisory threads. A thread opens in #cve-security-bot for each advisory, with its severity, KEV status and EPSS score.

For zod, the verdict is unreachable (priority low). It quotes src/webhooks/event-schema.js lines 4 and 9 and says the only schema is built from objects, strings, numbers and booleans, with no z.array. The advisory stays open.

For node-fetch, the verdict is affected (priority medium). It quotes workers/accounting-sync/src/forward.js line 6, const res = await fetch(endpoint.url, {, and line 9, which sets the bearer token in the authorization header. The code calls node-fetch with a customer-controlled URL and doesn't turn off redirect following.

The Task then starts the workflow, where Claude Code pins node-fetch to exactly 2.6.7 and runs npm test. The workflow then confirms the advisory no longer matches. The Task opens PR #22, "Pin node-fetch to 2.6.7 for GHSA-r683-j2x4-v87g". Once checks pass, the thread gets "node-fetch 2.6.7 is ready to merge" with Merge and Hold buttons. Mitch clicks Merge, and the Task merges the PR and posts the result in the advisory's thread.

Day to day

Most hours nothing new matches and nobody hears anything. Every verdict goes into Memories, so Claude Code or another agent can read the analysis if a fix fails its tests.

OSV and the GitHub API cost nothing at this volume, and model costs only start when an advisory matches. In the video, the workflow's fix summary reports an agent run cost of about $0.096 at list prices.

The Task only sees what is in your lockfiles. Container images and vendored code are out of scope.

Connect the qbash MCP free →

Stay in the loop

Product updates, tutorials, and AI insights. No spam.