Security skill · Find and fix
Dependency CVE triage and patch.
Find vulnerable third-party dependencies in a project, triage each advisory for real exposure (reachability, environment, fix availability), then patch or mitigate and verify. Use when asked to audit dependencies, respond to a CVE or advisory, or clear scanner findings without breaking the build.
Facts
- Category
- Find and fix
- License
- MIT
- Tags
- Vulnerability management
- Version
- 1.0.0
- Last updated
- 2026-12-02
- Folder
dependency-cve-triage-and-patch/- MCP resource
skill://dependency-cve-triage-and-patch/SKILL.md- Files
- SKILL.md
- LICENSE
- references/ecosystem-commands.md
- Standards
- A03:2025
- CWE-1395
Original Saasment content. Saasment is in early access; this skill does not require joining it.
Install via MCP or as files
Connect your client to https://www.saasment.com/api/mcp (see client setup) and call get_skill:
{
"name": "get_skill",
"arguments": {
"slug": "dependency-cve-triage-and-patch"
}
}Or download the .zip and unpack it into your agent's skills directory:
Terminal, from your project root (user-level: ~/.cursor/skills)
mkdir -p .cursor/skills
curl -fsSL https://www.saasment.com/ai-security/skills/dependency-cve-triage-and-patch/download.zip -o /tmp/dependency-cve-triage-and-patch.zip
unzip -o /tmp/dependency-cve-triage-and-patch.zip -d .cursor/skills
# result: .cursor/skills/dependency-cve-triage-and-patch/SKILL.mdReview SKILL.md before enabling a skill. Skills are instructions your agent will follow.
SKILL.md
--- name: dependency-cve-triage-and-patch description: Find vulnerable third-party dependencies in a project, triage each advisory for real exposure (reachability, environment, fix availability), then patch or mitigate and verify. Use when asked to audit dependencies, respond to a CVE or advisory, or clear scanner findings without breaking the build. license: MIT metadata: author: Saasment version: "1.0.0" category: both tags: "vulnerability-management" --- # Dependency CVE triage and patch (find and fix) License: MIT. Copyright (c) 2026 Saasment. Source: https://www.saasment.com/ai-security/skills/dependency-cve-triage-and-patch Scanners produce long lists. The useful work is deciding which findings matter for this application, then fixing those safely. This skill covers inventory, scanning, triage, patching, and verification for common ecosystems. For ordering work across many systems, use the companion `critical-patch-prioritization` skill. ## When to use - You are asked to audit or update dependencies in a repository you own or maintain. - A new CVE or advisory names a library you use. - A scanner reports many findings and you need to decide what to fix now. ## Safe by default - Only run scans and updates on code you own or are authorized to change. - Work on a branch and keep the lockfile under version control so every change is reviewable and reversible. - Do not run unfamiliar install scripts from new package versions on a machine that holds secrets. Prefer a clean CI runner or container for the first install of an upgraded tree. - Do not execute proof-of-concept exploits from advisories against any system you do not own. You rarely need one to triage. ## Procedure 1. **Build the inventory.** Identify every ecosystem and manifest in the repo (npm, pip, Maven, Gradle, Go modules, Cargo, Bundler, Composer, NuGet, container base images, GitHub Actions). Include transitive dependencies from the lockfile, not just the direct ones. 2. **Scan.** Run the ecosystem scanner and a cross-ecosystem one (see `references/ecosystem-commands.md`). Save machine-readable output. 3. **Deduplicate.** Group findings by package and by advisory id (CVE, GHSA, OSV). One upgrade often clears several. 4. **Triage each finding** with these questions, and record the answer: - Is the vulnerable package present in the production artifact, or only in dev and test tooling? - Is the vulnerable function or feature actually used? Search the code for the affected API named in the advisory. - Can attacker-controlled input reach it? What are the preconditions (auth, configuration, network position)? - Is a fixed version available, and is it a patch, minor, or major bump? - Is there a known exploit in the wild, or is it listed in CISA KEV? (See `critical-patch-prioritization`.) 5. **Choose an action** per finding: upgrade, upgrade a parent that pulls the fixed version, override or pin the transitive version, remove the dependency, apply a documented mitigation (configuration change or input validation), or accept the risk with an owner, reason, and review date. 6. **Patch in small steps.** Prefer the smallest version that contains the fix. Update, regenerate the lockfile, run the full test suite and build. Commit one logical group at a time so a regression can be bisected. 7. **Handle breaking upgrades.** Read the changelog and migration notes, search for removed APIs in the code, and add tests around the behavior that changes before upgrading. 8. **Re-scan** and compare with step 2. 9. **Prevent drift.** Turn on automated dependency update pull requests and a CI scan gate with a documented policy (for example, fail on critical findings with a fix available). Keep a reviewed ignore file with expiry dates. ## Verification - The scanner no longer reports the fixed advisories, and any remaining findings each have a recorded decision (mitigated, not reachable, accepted with expiry). - Tests and the production build pass. Run the application and exercise the code paths that use the upgraded library. - The lockfile shows the fixed version of the package at every place it appears (check with the ecosystem's tree or why command). - For container images, rebuild and re-scan the final image, not only the source manifests. ## Reporting Table: advisory id, package, installed version, fixed version, reachable (yes, no, unknown), action, status. Add a short list of risks accepted, with owner and review date. ## References - CWE-1395 (Dependency on Vulnerable Third-Party Component): https://cwe.mitre.org/data/definitions/1395.html - OSV vulnerability database: https://osv.dev - Companion skills: `critical-patch-prioritization`, `secrets-in-repo-scan-and-rotation`.
Helper files
LICENSE
MIT License Copyright (c) 2026 Saasment Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
references/ecosystem-commands.md
# Ecosystem commands for dependency scanning and patching License: MIT. Copyright (c) 2026 Saasment. Commands change between tool versions. Check `--help` for your installed version. All of these read manifests locally; some query public vulnerability databases over the network. ## Cross-ecosystem ```bash # OSV-Scanner: scan a directory recursively (queries the OSV database) osv-scanner scan source -r . # Trivy: filesystem scan for vulnerabilities in dependencies trivy fs --scanners vuln . # Trivy: scan a built container image trivy image <image:tag> ``` ## JavaScript and TypeScript (npm, pnpm, yarn) ```bash npm audit --json > /tmp/npm-audit.json # report npm ls <package> # who depends on a package npm explain <package> # why it is installed npm audit fix # apply non-breaking fixes npm install <package>@<fixed-version> # targeted upgrade ``` Force a transitive version when a parent is slow to update. In `package.json` use `overrides` (npm), `resolutions` (yarn), or `pnpm.overrides` (pnpm), then reinstall and test. ## Python ```bash pip-audit -r requirements.txt # scan requirements pip-audit # scan the current environment pip install "<package>>=<fixed-version>" pip freeze > requirements.txt # or regenerate your lock file with your tool (uv, pip-tools, poetry) ``` ## Java and Kotlin ```bash mvn org.owasp:dependency-check-maven:check # OWASP Dependency-Check (downloads NVD data) mvn dependency:tree -Dincludes=<groupId>:<artifactId> ./gradlew dependencyInsight --dependency <name> ``` Use `dependencyManagement` (Maven) or dependency constraints (Gradle) to force a fixed transitive version. ## Go ```bash govulncheck ./... # reports vulnerabilities that your code actually calls go get <module>@<fixed-version> go mod tidy ``` ## Rust ```bash cargo audit cargo update -p <crate> --precise <fixed-version> ``` ## Ruby, PHP, .NET ```bash bundle audit check --update # bundler-audit composer audit dotnet list package --vulnerable --include-transitive ``` ## GitHub Actions and containers - Pin third-party actions to a full commit SHA and review updates. - Rebuild images from an updated base image and re-scan. A fixed package in the source tree does not fix an old base image layer. ## Triage record template ```text Advisory: CVE-XXXX-XXXXX / GHSA-xxxx Package: name@installed -> fixed Present in prod: yes / no (dev only) Reachable: yes / no / unknown (evidence) Preconditions: ... Exploited / KEV: yes / no / unknown Action: upgrade | override | mitigate | accept (owner, expiry) Verified by: scan + tests + date ```
Related
Companion skills
Questions
How do I install the Dependency CVE triage and patch skill?
Download https://www.saasment.com/ai-security/skills/dependency-cve-triage-and-patch/download.zip and unzip it into your agent's skills directory (for example .cursor/skills, .claude/skills, .agents/skills, or .github/skills) so that dependency-cve-triage-and-patch/SKILL.md exists. Or connect to https://www.saasment.com/api/mcp and call the get_skill tool with the slug dependency-cve-triage-and-patch.
What license is the Dependency CVE triage and patch skill under?
It is original Saasment content under the MIT license, stated in the SKILL.md frontmatter and in the LICENSE file in the skill folder.
Is it safe to run this skill?
A skill is a set of instructions your agent follows, so read SKILL.md first. It tells the agent to test only systems you own or are authorized to test, to use test environments and synthetic data, and to avoid destructive probes. Downloading it does not run any code on your machine.