fix-dependabot-alert
Skill1 starsChanged 3 months agoMITView on GitHub
Take over a GitHub Dependabot security alert and remediate it, then commit and push the fix on a new branch and open a PR. Use whenever the user provides a Dependabot alert URL (github.com/<owner>/<repo>/security/dependabot/<number>) and asks to fix it, resolve it, or "handle this alert". Covers direct bumps, transitive dependencies requiring resolutions/overrides, and cases where no patched version is installable yet.
- Deletes or force-pushes
- Commits and pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- zauberzeug/niceguitheir own version, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- zauberzeug/nicegui★ 16ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository79 other files it gives its agents.
- add-i18nSkill
- add-missing-testsSkill
- align-minimum-release-ageSkill
- architecture-mapSkill
- audit-licensesSkill
- audit-vulnerabilitiesSkill
- audit-web-vitalsSkill
- build-landing-pageSkill
- claim-all-unassigned-prsSkill
- claim-unassigned-prsSkill
- dedupe-and-prune-depsSkill
- driftSkill
- expert-accessibilitySkill
- expert-appsecSkill
- expert-backendSkill
- expert-dxSkill
- expert-frontend-performanceSkill
- expert-gas-optimizationSkill
- expert-qaSkill
- expert-smart-contract-securitySkill
- expert-tokenomicsSkill
- expert-uiSkill
- expert-uxSkill
- expert-web3-dappSkill
- extract-design-systemSkill
- fix-all-issuesSkill
- fix-dependabot-prSkill
- fix-failing-ciSkill
- fix-flaky-testsSkill
- fix-issueSkill
- fix-renovate-prSkill
- fleet-health-dashboardSkill
- isometric-stack-mapSkill
- nudge-stale-prsSkill
- optimize-all-github-actionsSkill
- optimize-github-actionsSkill
- optimize-imagesSkill
- optimize-pwaSkill
- optimize-seo-aeoSkill
- panel-accessibilitySkill
- panel-architecture-scalabilitySkill
- panel-dapp-uxSkill
- panel-developer-experienceSkill
- panel-qa-release-readinessSkill
- panel-smart-contract-securitySkill
- panel-tokenomicsSkill
- panel-ui-designSkill
- panel-ux-reviewSkill
- panel-web3-integrationSkill
- panel-web-app-securitySkill
- panel-web-performanceSkill
- persona-accessibility-userSkill
- persona-crypto-newcomerSkill
- persona-designerSkill
- persona-developerSkill
- persona-gen-zSkill
- persona-grandmaSkill
- persona-growth-hackerSkill
- persona-investorSkill
- persona-mobile-commuterSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Read the advisory itself for context and workarounds:
- Distinctive: line 31
If not already inside a clone of the repo, clone it first.
- Distinctive: line 61
Force the transitive version: when parents lag behind:
- Distinctive: line 65
Verify afterward that the forced version is actually compatible with its parents (install must succeed cleanly and the affected …
- Distinctive: line 66
Remove or replace the parent: if it is unmaintained and the only path to the vulnerable package, and a maintained alternative exists.
- Distinctive: line 78
Every resolved version must be >= the first patched version.
- Very specific: line 79
Run the audit tool as a second check (yarn audit, npm audit, pnpm audit) and confirm this advisory no longer appears.
- Distinctive: line 87
Commit with a conventional message referencing the alert and CVEs, e.g.:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fix Dependabot Security Alert
Goal: given a Dependabot alert URL ($ARGUMENTS), eliminate the vulnerable version from the dependency tree (or apply the documented mitigation when a fix is not yet installable), verify nothing breaks, then commit, push to a new branch, and open a PR. Do not merge the PR. Do not dismiss the alert unless explicitly instructed.
1. Understand the alert
- Parse owner, repo, and alert number from the URL:
https://github.com/<owner>/<repo>/security/dependabot/<number>. - Fetch the alert details:
Extract: the vulnerable package and ecosystem, affected version range, first patched version, severity, CVE/GHSA IDs, the manifest file (e.g.gh api repos/<owner>/<repo>/dependabot/alerts/<number>yarn.lock), and whether the dependency scope isruntimeordevelopment. - Read the advisory itself for context and workarounds:
gh api /advisories/<ghsa-id> - Classify the situation, because it determines the whole strategy:
- Direct dependency, patched version exists: simple bump in
package.json+ lockfile. - Transitive dependency, patched version exists: the parent may not accept it yet. You will need a resolution/override, or a parent bump that pulls the fixed version.
- No installable patched version (Dependabot says it "cannot update X to a non-vulnerable version"): check whether the fixed version was released since the alert; if truly not installable, fall back to the advisory's documented workaround or assess exposure.
- Direct dependency, patched version exists: simple bump in
2. Check out the repo and create a working branch
If not already inside a clone of the repo, clone it first. Then:
git checkout <default-branch> && git pull
git checkout -b fix/dependabot-<number>-<package>Detect the package manager from the lockfile present (pnpm-lock.yaml, yarn.lock, package-lock.json) and use only that one for every install and lockfile operation.
3. Map the dependency path
Find out exactly how the vulnerable package enters the tree:
# yarn classic
yarn why <package>
# yarn berry
yarn why <package> -R
# npm
npm ls <package> --all
# pnpm
pnpm why <package>Note every parent chain. A vulnerable package can be introduced by several parents at several versions; all paths must end up on a patched version (or be removed).
4. Choose the remediation, in order of preference
- Bump the direct dependency to a version at or above the first patched version, respecting semver in
package.json. Prefer the latest stable within the same major; only cross a major if required to reach the patch, and treat that as a migration (read release notes first). - Bump the parent(s) of a transitive dependency if a newer parent release pulls in the fixed version. Check the parent's changelog or its
package.jsonon the registry to confirm before bumping. - Force the transitive version when parents lag behind:
- yarn (classic and berry):
"resolutions": { "<package>": ">=<patched>" }inpackage.json - npm:
"overrides": { "<package>": ">=<patched>" } - pnpm:
"pnpm": { "overrides": { "<package>": ">=<patched>" } }Verify afterward that the forced version is actually compatible with its parents (install must succeed cleanly and the affected functionality must still work). If the parent hard-pins an incompatible range and breaks, do not ship the override.
- yarn (classic and berry):
- Remove or replace the parent if it is unmaintained and the only path to the vulnerable package, and a maintained alternative exists. Only do this when the change is small and clearly safe; otherwise report it as a recommendation instead.
- Apply the advisory's workaround when no patched version is installable (e.g. blocking specific codepaths or input types as documented in the advisory). Put the mitigation where the package is actually used, add a
TODOcomment referencing the alert number and the version that will make it removable. - Assess and report only as a last resort. If the dependency is dev-only or the vulnerable codepath is unreachable in this project (e.g. it never processes untrusted input through the affected API), and none of the above are practical, explain the exposure honestly in the report. Never silently dismiss.
5. Apply, install, and verify the tree
- Make the change, then reinstall cleanly:
rm -rf node_modules && <pm> install. - Confirm the vulnerable version is gone from the lockfile:
Every resolved version must be >= the first patched version.yarn why <package> # or the pm equivalent grep -n "<package>@" <lockfile> | head -50 - Run the audit tool as a second check (
yarn audit,npm audit,pnpm audit) and confirm this advisory no longer appears. Ignore unrelated advisories; do not scope-creep into fixing every alert unless asked.
6. Make sure nothing broke
Read .github/workflows/*.yml for the exact commands CI runs (install, build, lint, typecheck, test) and run them locally in the same order with the same package manager. Fix any breakage caused by the bump, keeping changes minimal and scoped. Do not refactor unrelated code and do not delete tests to make them pass. If the remediation is truly unworkable (e.g. the override breaks the parent at runtime), revert to the next option in step 4.
7. Commit, push, and open a PR
- Commit with a conventional message referencing the alert and CVEs, e.g.:
fix(deps): force sharp >=0.35.0 to resolve GHSA-xxxx (CVE-2026-33327 et al.) - add resolutions entry for sharp, introduced transitively via netlify-cli - regenerate lockfile - fixes Dependabot alert #218 - Push and open the PR against the default branch:
In the PR body: link the alert URL, list the CVE/GHSA IDs, state the remediation chosen and why, and note any follow-up (e.g. "remove the resolutions entry once netlify-cli ships sharp >=0.35.0").git push -u origin <branch> gh pr create --repo <owner>/<repo> --title "..." --body "..."
8. Verify CI and the alert
- Watch checks:
gh pr checks <pr-number> --repo <owner>/<repo> --watch. If a check fails remotely but passed locally, pull the logs (gh run view <run-id> --log-failed), diagnose, fix, push again. - Dependabot re-scans on push. After CI is green, re-check the alert state:
The alert auto-resolves once the fixed lockfile lands on the default branch, so it may still showgh api repos/<owner>/<repo>/dependabot/alerts/<number> --jq .stateopenuntil the PR merges; say so in the report rather than treating it as a failure.
9. Report
End with a short summary: the vulnerability and its path into the tree, the remediation chosen (and options rejected, if relevant), the commit(s) and PR link, CI status, and what will close the alert. If the fix is a temporary override or workaround, state clearly when and how it should be removed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

