Overview
Hand each dependency vulnerability issue to Claude Code through its GitHub Action, or to a Cursor cloud agent, to update the package and lockfile on a branch, then review, rescan and merge the pull request yourself.
Problem or Objective
More in Security Research
AI Agents and Models
Tools and Integrations
- Tools
- Claude Code · Cursor · GitHub Actions
- Prerequisites
- A GitHub repository with tests and CI, a dependency vulnerability scanner, and either the Claude Code GitHub Action (Claude GitHub App plus an API key or subscription token as a repository secret) or Cursor cloud agents (a plan that includes them and connected source control).
How It Works
Get each vulnerability your scanner reports into a GitHub issue that names the package, the affected version and the fixed version; check whether your scanner can open issues itself, or copy the advisory in by hand. Install the Claude Code GitHub Action with /install-github-app, or set up a Cursor cloud agent with your repository connected. In the issue, mention @claude (or comment @cursor) and ask it to upgrade only that package to the fixed version, update the lockfile, run the test suite and open a pull request that lists every changed dependency. Watch the CI run on the pull request. Then review it yourself: read the lockfile diff for unexpected packages, run your scanner again on the branch to confirm the finding is gone, and test the affected feature. Merge only when the rescan is clean and the tests pass; if the upgrade breaks something, ask the agent for a smaller change in the same issue or fix it by hand.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Code, Cursor.
- Connect the toolsConnect the tools this workflow relies on: Claude Code, Cursor, GitHub Actions.
- Check the prerequisitesA GitHub repository with tests and CI, a dependency vulnerability scanner, and either the Claude Code GitHub Action (Claude GitHub App plus an API key or subscription token as a repository secret) or Cursor cloud agents (a plan that includes them and connected source control).
- Gather your detailsCollect what the prompt asks for: Vulnerable package, Version in use, First fixed version, Lockfile to update, How to run the tests.
- Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.
Practical Starter Prompt: Fix one vulnerable dependency on a branch
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
@claude This issue reports a vulnerability in [Vulnerable package] version [Version in use]; the advisory says [First fixed version] fixes it. Upgrade only this package to [First fixed version] or the nearest compatible fixed release, update [Lockfile to update], and run [How to run the tests]. Open a pull request that lists every dependency that changed in the lockfile and any test failures. Do not change unrelated packages and do not merge; a maintainer will rescan the branch, review the lockfile diff and merge it.The agent only pushes a branch and opens a pull request. A maintainer reruns the scanner on the branch, reads the lockfile diff, checks CI and merges by hand.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Claude Code pages support @claude mentions in issues that analyse code, implement changes and push commits, and list updating dependencies among routine tasks; Cursor's docs support cloud agents that work on a separate branch and push changes for handoff. Neither describes any vulnerability scanner, and a passing build is not proof that a vulnerability is fixed, so the rescan and review stay with a person.
Limitations and Considerations
Keep merging manual: the agent pushes to a branch, and a person merges after the rescan and review. The Claude Code GitHub Action needs the Claude GitHub App installed and an API key or subscription token stored as a repository secret; check API costs for frequent runs. Cursor cloud agents auto-run terminal commands, which Cursor flags as a prompt injection and data exfiltration risk, and they need a plan that includes them. How your scanner opens or links issues was not verified here; check it before automating the hand-off. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
AI Agent Repository
Source code of the agent that does the work.
Related Videos
About anthropics/claude-code
The SECRET Claude Code Upgrade That Has Everyone Going Nuts (Full Guide) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)About anthropics/claude-code
The only Claude Code guide you'll ever need (Opus 4.5) (opens in a new tab)
The title names the project, the description links the project website.
Watch on YouTube (opens in a new tab)Independent creators. Listing a video implies no endorsement, sponsorship or partnership.
Sources
- Claude Code GitHub Actions - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Mention @claude in a pull request or issue comment to have Claude analyze code, implement changes, and push commits.
- Overview - Claude Code Docs (opens in a new tab)
Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC
What this source supports
- Claude Code handles the tedious tasks that eat up your day: writing tests for untested code, fixing lint errors across a project, resolving merge conflicts, updating dependencies, and writing release notes.
- Cloud Agents | Cursor Docs (opens in a new tab)
Project documentation · cursor.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Cloud agents clone your repo from GitHub, GitLab, Azure DevOps Services, or Bitbucket Cloud and work on a separate branch, then push changes to your repo for handoff.
- Secrets & Network | Cursor Docs (opens in a new tab)
Project documentation · cursor.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- The agent auto-runs all terminal commands, letting it iterate on tests.

