microsoft/github-copilot-modernization/cve-remediation

Claude Code and agent skill by microsoft/github-copilot-modernization

Trust tier 4
  • vendor
Source check pending

Checking that the SKILL.md file is still in the repository.

Scan dependency manifests against known CVEs and remediate by upgrading vulnerable dependencies to patched versions, then rebuild and re-scan to confirm. Self-contained scan→fix→verify loop for any project with a dependency manifest. Use when: a cve-remediation task is dispatched; dependency set changed (version bump, new framework); assessment flagged vulnerable or EOL dependencies; or user asked to "fix CVEs", "patch vulnerabilities", or "dependency security". Triggers: "cve", "remediate cve", "fix cves", "patch vulnerable dependencies", "vulnerability scanning", "dependency security", "vulnerable dependencies", "security advisories", "npm audit", "pnpm audit", "maven audit", "gradle audit", "dependency scan", "vulnerability remediation". NOT for: security audit of auth/input/secrets/OWASP code paths (use security-review).

Install

npx vskill@latest install microsoft/github-copilot-modernization/cve-remediation

SKILL.md

The same SKILL.md was published earlier as microsoft/github-copilot-modernization/cve-remediation.

CVE Remediation

This skill is the implementer-owned scan→fix→verify loop for dependency CVEs. It is dispatched as an execute-phase task to an implementer role (backend), runs per group, and produces patched dependency manifests plus an audit trail.

Ownership & boundaries

  • This is implementer work, not audit work. The security role audits and escalates

but does NOT fix. This skill performs the fix (editing dependency manifests), so it is owned by the implementer who owns those manifests — not by the security role.

  • The rebuild/re-scan is a self-check, not a quality gate. It is the implementer

confirming their own change took — analogous to compiling after editing code. It must NOT masquerade as the project's security gate, and it stays within the Implementation phase label. The independent gates (smoke-test, runtime-validation, and the coordinator's verdict rules) remain separate and unchanged.

  • Scope is per-group. Each in-scope group has its own dependency manifests; remediate

the manifests belonging to the dispatched group.

Scanning: tool-first with LLM fallback

CVE scanning is performed by the shared `appmod-cve-assessment` tool, which all modernization surfaces (VS Code extension, IntelliJ plugin, Copilot CLI plugin, MCP server) expose. It queries the GitHub Security Advisories API for a set of package ecosystems and writes structured findings to a result file. Using the shared tool keeps scanning consistent across products and emits the standard telemetry.

  • Primary — `appmod-cve-assessment` tool (preferred whenever it applies). Consult the

tool's own ecosystem parameter for the ecosystems it currently accepts — treat that schema as the source of truth rather than assuming a fixed list, since it may grow over time.

  • Fallback — LLM-only scan when the tool path does not apply. This covers two

cases, both signalled by the tool itself:

  1. Tool unavailable — appmod-cve-assessment is not registered in the current

runtime (e.g. a standalone Copilot CLI / rearchitecture runtime without the tool wired up).

  1. Ecosystem not accepted — the tool rejects the project's ecosystem (its

ecosystem parameter does not accept it / input validation fails). Whichever ecosystems the tool does not yet cover fall here automatically.

In either case the model identifies known CVEs for the listed dependency versions from its own knowledge and writes the same findings schema (see Step 3). This is best-effort — model knowledge has a training cutoff and may miss recent advisories — so prefer the tool whenever it applies.

Map the project's package manager to the ecosystem identifier the tool accepts (for example, Maven and Gradle both resolve to the same JVM identifier). If the tool does not accept any identifier for the project's ecosystem, go straight to the LLM-only fallback.

Artifact path

The coordinator provides an artifact path for this task. Throughout this skill, {{ARTIFACT_PATH}} refers to that directory. Write all reports and the fix summary there.

Workflow

Step 1: Precheck — detect project type and build tool

Before running any build or dependency commands, verify that the required build tool is available.

  1. Detect the project type by examining the group's project root:
File(s) foundProject typeTool ecosystem id (common mapping)
pom.xmlMaven (Java)maven
build.gradle or build.gradle.ktsGradle (Java)maven
*.sln.NET solutionnuget
*.csprojC# projectnuget
packages.configLegacy .NETnuget
package.jsonNode.js (npm/pnpm/yarn)npm
any other manifest (e.g. requirements.txt, pyproject.toml, go.mod, Cargo.toml, Gemfile, composer.json)otherwhatever the tool accepts, else LLM-only fallback (Step 2c)

> The ecosystem ids above are the common mappings at the time of writing. The tool's > ecosystem parameter is authoritative — if it accepts an identifier for the project's > ecosystem, use the tool; otherwise use the LLM-only fallback.

  1. Resolve the build command — prefer project-local wrappers over global tools:
Project typeCheck order (prefer first match)Fallback
Maven./mvnw (Unix) or mvnw.cmd (Windows)mvn on PATH
Gradle./gradlew (Unix) or gradlew.bat (Windows)gradle on PATH
.NETdotnet --version—
Node.jsnpm / pnpm / yarn (only needed to apply fixes)—
  1. If the required tool is not found, stop and report the error. Do not proceed.
Step 2: Scan dependencies against CVE databases

The scan also serves as detection: a clean result (an empty findings array) means the group has no known dependency CVEs and the task exits cheaply.

Step 2a: Collect dependency coordinates and locations

Extract the dependency coordinates for the group, capturing for each one the workspace-relative file path and 1-based line number where it is declared. Prefer resolved versions (which include transitive dependencies — the common source of CVEs) and fall back to manifest-declared versions when a resolver is unavailable.

EcosystemCoordinate formatWhere to read
mavengroupId:artifactId:versionmvn dependency:list / gradle dependencies (resolved), else pom.xml / build.gradle / gradle.properties
nugetPackageName@versiondotnet list package (resolved), else *.csproj / Directory.Packages.props / packages.config
npmpackage-name@version (e.g. express@4.18.2, @angular/core@16.0.0)lockfile (package-lock.json, pnpm-lock.yaml, yarn.lock — resolved, includes transitives), else package.json
These are the common ecosystems and their coordinate formats. For the authoritative
coordinate format expected by each ecosystem the tool accepts, consult the tool's
dependencies / ecosystem parameter descriptions. For an ecosystem the tool does not
accept (LLM-only fallback), use that ecosystem's natural coordinate form (e.g.
package==version for Python) read from its manifest or lockfile.
Step 2b: Scan with the appmod-cve-assessment tool (primary)

Call appmod-cve-assessment with:

  • cveResultFilePath — an absolute path of {{ARTIFACT_PATH}}/cve-report-N.json

(start at 1, increment each scan to preserve history).

  • ecosystem — the identifier the tool accepts for the project's package ecosystem (see

the tool's ecosystem parameter for the accepted values).

  • dependencies — the coordinate array from Step 2a.
  • dependencyLocations — { coordinate, filePath, lineNumber } for each dependency.

The tool fetches CVEs, writes the findings JSON to cveResultFilePath, and returns a summary message. For very large dependency sets, scan in batches, writing each batch to its own numbered report. If the tool is unavailable, or it rejects the `ecosystem` as not accepted, switch to the LLM-only fallback (Step 2c).

Step 2c: LLM-only scan (fallback — tool unavailable OR ecosystem not accepted)

Use this path when the tool cannot do the scan — either because appmod-cve-assessment is not available in the current runtime, or because the tool does not accept the project's ecosystem (its ecosystem parameter rejects it). Perform the scan from model knowledge instead: for each coordinate + version, identify known CVEs and write the same findings schema (see Step 3) to {{ARTIFACT_PATH}}/cve-report-N.json. Note in the fix summary that the LLM fallback was used (and why), since it is best-effort and may miss recent advisories.

Large projects: if scanning is slow, run it in a background (async) terminal and, while it runs, review and fix vulnerabilities already known from earlier runs. Address any newly discovered issues once it completes.

Step 3: Review the report and identify vulnerable dependencies

Parse the latest cve-report-N.json and examine each finding:

  1. Read the report file and parse the JSON (an array of findings; [] means no CVEs).
  2. Group by severity: critical > high > medium > low.
  3. For each finding note: the affected dependency + current version and the upgrade target

— both are in the evidence.explanation (the Affected dependencies and Recommended fix lines) — plus the CVE identifier (id) and name.

  1. Prioritize critical and high severity for immediate remediation.

Report schema (one object per CVE):

json
[
{
"id": "CVE-2022-22965",
"name": "Spring Framework RCE via Data Binding on JDK 9+",
"status": "FOUND",
"category": "CVE",
"severity": "critical",
"storyPoint": 1,
"evidence": {
"files": ["pom.xml:20"],
"explanation": "[CVE-2022-22965](https://github.com/advisories/GHSA-36p3-wjmg-h94x): Spring Framework RCE via Data Binding on JDK 9+\n\nSeverity: CRITICAL\n\nAffected dependencies:\n - org.springframework:spring-core@5.3.9\n\nRecommended fix:\n - Upgrade org.springframework:spring-core to 5.3.18 or later"
}
}
]
A finding whose explanation contains no Recommended fix line has no upstream patch
available (unfixable). An empty array ([]) means no known CVEs were found.
Step 4: Update vulnerable dependencies to secure versions

For each vulnerable dependency, update to a secure version (the upgrade target from the Recommended fix line) using the appropriate method.

Fix principles (consistent with the security agent):

  • Direct upgrade, not a framework upgrade. Bump the affected dependency directly to

the patched version — no stepping through intermediate versions. CVE remediation is a targeted patch, not a version migration.

  • Respect a pinned target version. If the user's request pins a target version/line for

a dependency (e.g. "upgrade Spring Framework to 6.2.18"), remediate within it — a patch bump within that line to clear a CVE is fine. Only when no in-range patch exists do you leave it — record it as a follow-up (Step 7.3) rather than forcing a major jump.

  • Minimal changes. Change only what is needed to clear the CVE. Do not refactor,

reformat, or make unrelated edits.

  • Batch related fixes. When a single upgrade clears several CVEs (e.g. a shared

BOM/parent), apply it once for all of them.

Java — Maven (pom.xml)
  1. Find the version (may be in <properties>, <dependencyManagement>, or inline <version>).
  2. Update to the patched version (or the latest stable if the patched version is also outdated).
  3. If the version is inherited from a parent POM (e.g. Spring Boot starter parent), update the parent version instead.
Where CVEs hide — check BOM overrides first. Pay special attention to dependencies
that explicitly declare a <version> tag overriding a managed BOM (e.g. the Spring Boot
dependencies BOM). These inline overrides bypass BOM management and are the most common
source of missed CVE vulnerabilities — bumping the BOM/parent version alone will not patch
them. Cross-check the <version> tags in each sub-module's pom.xml against the
vulnerable dependencies and update the override (or remove it to fall back to the managed
version) as needed.
Java — Gradle (build.gradle)
  1. Find the version in build.gradle or gradle.properties.
  2. Update the version string to the patched version.
  3. If using a BOM or platform dependency, update the BOM version.
.NET (csproj)
  1. Find <PackageReference Include="PackageName" Version="X.Y.Z" />.
  2. Update the Version attribute to the patched version.
  3. If versions are managed centrally via Directory.Packages.props, update them there instead.
  4. Alternatively: dotnet add package PackageName --version X.Y.Z.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 10 Oct 2026.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill CERTIFIED badge
[![vskill CERTIFIED](https://verified-skill.com/api/v1/skills/microsoft/github-copilot-modernization/cve-remediation/badge)](https://verified-skill.com/skills/microsoft/github-copilot-modernization/cve-remediation)

Something wrong with this skill or its page? Tell us.