Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

component-governance-remediation

БесплатноЗапускает вложенные скриптыНе проверен

Use when: retrieving, exporting, triaging, or remediating Azure DevOps Component Governance alerts for this repository, including CG report URLs, vulnerable…

OfficeDevот OfficeDev★ 795 звёзд на GitHub

Об этом скилле

Component Governance Remediation

Goal

Retrieve the exact active alert set represented by an Azure DevOps Component Governance page, map each alert to this repository's PNPM dependency graphs, remediate actionable versions, and leave auditable validation evidence without committing generated reports.

This is a maintenance workflow. Do not use vibe-coding unless the remediation also changes product behavior or architecture.

Inputs

Start from the complete Component Governance report URL. It carries two identifiers that must remain paired:

  • The path ID after _componentGovernance/ is the governed repository ID.
  • The typeId query parameter is the snapshot type ID shown by that report view.

Also record the organization, project, and branch. Do not substitute Azure DevOps Advanced Security alerts for Component Governance alerts; they are different data sources.

Retrieve Active Alerts

Prerequisites:

az account show --output none

Use the existing Azure CLI identity. Do not request or print a PAT when az rest can authenticate the request.

From the repository root, run the bundled script with the full report URL:

& .\.github\skills\component-governance-remediation\scripts\get-active-alerts.ps1 `
  -ReportUrl "<component-governance-report-url>" `
  -Branch "<branch>"

Omit -Branch only when governed-repository metadata exposes a default branch. The default output is:

results/component-governance-<governed-repository-id>-active-alerts-full.json

The script refuses to write reports to a non-ignored path inside this repository. Confirm generated evidence remains local:

git check-ignore -v results/component-governance-*.json
git status --short

The branch Alerts API returns historical records, including fixed alerts. Treat an alert as in scope only when all three conditions hold:

  1. Top-level alertState is active.
  2. A stateDetails entry has alertState == active.
  3. The same state entry has the report's snapshotTypeId.

Read the API reference when authentication, routing, response shape, or preview-version behavior needs diagnosis.

Triage

For each active alert, record:

  • Alert ID, severity, vulnerability title, component, and vulnerable version.
  • actionItems and any package-specific guidance.
  • Every lockfile containing the exact resolved package entry.
  • Whether the dependency is direct, transitive through an upgradeable parent, or transitive without a suitable parent release.
  • Runtime reachability and the package test surface for cross-major remediation.

Search all PNPM lockfiles, not only the root lockfile. This repository has independently owned lockfiles. Inspect exact package entries rather than override selector text, which can contain a vulnerable version while intentionally resolving it to a fixed version.

Use https://packagefeedproxy.microsoft.io/npm/ for package metadata and dependency resolution. Before editing a manifest, verify every advisory-approved target version is available from that registry:

$registry = "https://packagefeedproxy.microsoft.io/npm/"
npm view <package>@<fixed-version> version --registry $registry

If the proxy does not expose a fixed version, do not substitute an unavailable version or the highest still-vulnerable version. Leave that advisory unresolved and record the registry response as the blocker.

Evaluate alerts independently when several advisories target the same component version. Apply an available compatible release that fixes one advisory even if a newer unavailable release is required for another; record exactly which alert IDs the partial remediation fixes and which remain blocked.

Use the owning workspace when tracing dependencies:

npx --yes [email protected] --dir <workspace-root> why <package>
npx --yes [email protected] --dir <standalone-package> --ignore-workspace why <package>

Shared workspaces own their child importers. A child package's pnpm.overrides is ignored when a parent workspace owns the lockfile; place an override at the workspace root that generates that lockfile.

Do not infer that an alert is direct, transitive, or owned by a similarly named package. Prove the resolved entry and parent chain in every lockfile before choosing the manifest to edit.

Remediate

Use the smallest compatible option in this order:

  1. Upgrade a direct dependency to the fixed release.
  2. Upgrade the nearest parent dependency that removes the vulnerable transitive version.
  3. Add the narrowest exact PNPM override when no suitable parent release exists.
  4. Leave the version only when Component Governance guidance explicitly permits dismissal and the repository satisfies every condition.

Edit the dependency or override in the manifest that owns the affected lockfile. Do not use pnpm add merely to force a transitive version, and do not add broad overrides when an exact vulnera

Полный SKILL.md на GitHub

Установить component-governance-remediation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

evals/evals.jsonreferences/ado-component-governance-api.mdscripts/get-active-alerts.ps1scripts/test-get-active-alerts.ps1

FAQ

Что делает скилл component-governance-remediation?

Use when: retrieving, exporting, triaging, or remediating Azure DevOps Component Governance alerts for this repository, including CG report URLs, vulnerable pnpm dependencies, package feed availability, snapshot filtering, lockfile updates, and alert dismissals.

Как установить скилл component-governance-remediation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл component-governance-remediation запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить component-governance-remediation с