Command Palette

Search for a command to run...

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

triage-fixed-cves

БесплатноБез исполняемых скриптовНе проверен

Triage Go stdlib CVEs against an OpenShift release image to determine which CVEs are fixed by the Go version each component was built with. Use when the user…

openshift-engот openshift-eng★ 123 звезды на GitHub

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

triage-fixed-cves

Analyze an OpenShift release image to determine which Go standard library CVE Jira tickets have been addressed by the Go version used to build each component. Produces a per-CVE, per-component cross-reference report.

The user provides a release image pullspec (e.g. quay.io/openshift-release-dev/ocp-release:4.17.0-x86_64).

Execute every step below in order. Do not skip steps.


Step 1 — Extract component images from the release

oc adm release info <RELEASE_IMAGE> --output=json

Parse the JSON output to get the list of component image references. Each entry in .references.spec.tags[] provides a name (component name) and .from.name (image pullspec).

Each tag also carries .annotations metadata. Extract the io.openshift.build.source-location annotation — this is the canonical source GitHub repository URL for that component (e.g. https://github.com/openshift/cluster-version-operator). Also extract io.openshift.build.commit.id which gives the exact source commit SHA the image was built from. Record both for every component — they are used in Steps 2 and 4.

Auth failure: If oc adm release info fails due to an authentication error, STOP immediately. Report the auth failure to the user and do not proceed. Do not attempt to locate pull secrets, probe environment variables, or try alternative credential paths — the RWS pod's registry proxy handles authentication transparently, so an auth failure means the proxy does not have credentials for this registry and manual intervention is required.

Collect the full list of (component_name, image_pullspec, source_repo, source_commit) tuples before proceeding.


Step 2 — Identify the built binary per component via Dockerfile

For each component, identify exactly which binary is built and where it lands in the final image by looking up the component's Dockerfile. Do NOT scan the entire image for all ELF binaries.

CI images (most components)

Look up the ci-operator config at github.com/openshift/release/ci-operator/config/openshift/<repo>/. Match the correct config file for the release branch and build variant (e.g. openshift-cluster-version-operator-release-4.17.yaml). The config's images.items[] specifies the dockerfile_path for each image. Fetch that Dockerfile from the component's own repository at the exact source commit recorded in io.openshift.build.commit.id from Step 1 — do not use tree/main or the branch tip, as the release image may have been built from an older revision.

Builder substitutions: ci-operator configs may declare builder image overrides via images.items[].inputs.as — these replace FROM targets in the Dockerfile at build time, which can change the Go toolchain version used. Note any such substitutions when recording the component's build context.

Release / nightly images

Check the ocp-build-data config on the matching branch (e.g. github.com/openshift-eng/ocp-build-data/tree/openshift-4.17/images/<component>.yml). The from: and dockerfile: fields point to the Dockerfile.

OKD builds: The ocp-build-data image config may contain an okd_alignment section that specifies a different Dockerfile for OKD builds. These are typically named Dockerfile.scos or Dockerfile.okd. When this section is present, use the OKD-specific Dockerfile instead of the default one for OKD images. As with CI images, fetch the OKD Dockerfile at the exact source commit from io.openshift.build.commit.id (Step 1), not from the branch tip.

Parse the Dockerfile

Look for:

  • go build -o <binary> or go install commands — these tell you the output binary name.
  • COPY --from=builder <src> <dest> in multi-stage builds — this tells you where the binary is placed in the final image.

Example: a Dockerfile with go build -o /go/bin/cvo ./cmd/cvo and COPY --from=builder /go/bin/cvo /usr/bin/cluster-version-operator means the target binary is /usr/bin/cluster-version-operator.


Step 3 — Detect Go version per component

For each component, extract the Go version from the specific binary identified in Step 2.

podman pull <IMAGE>
podman create --name tmp-extract <IMAGE>
podman cp tmp-extract:<binary_path> /tmp/target-binary
podman rm -f tmp-extract   # always remove so the name is freed for the next component
go version /tmp/target-binary

Cleanup: Always run podman rm -f tmp-extract unconditionally after extraction (even on failure) so the container name is available for the next component. Wrap the extract-copy-remove sequence in a function or loop body to ensure cleanup is never skipped.

Parse the output. The format is:

/tmp/target-binary: go1.22.5

Extract the semver-style version (e.g. 1.22.5).

Important caveats

  • Do NOT assume a single Go version across the release. Different components may use different Go toolchain versions. ci-operator builder image substitutions (images.items[].inputs.as)
Полный SKILL.md на GitHub

Установить triage-fixed-cves в Claude Code и Claude Desktop

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

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

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

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

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

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

FAQ

Что делает скилл triage-fixed-cves?

Triage Go stdlib CVEs against an OpenShift release image to determine which CVEs are fixed by the Go version each component was built with. Use when the user asks to triage Go stdlib CVEs against an OpenShift release image, check which Go CVEs are fixed in a release, or cross-reference Go vulnerability fixes across OCP components. Triggers on: 'triage Go CVEs', 'Go stdlib CVE triage', 'which Go CVEs are fixed', 'Go vulnerability report for release', or any mention of Go stdlib CVE + OpenShift release image.

Как установить скилл triage-fixed-cves?

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

Скилл triage-fixed-cves запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить triage-fixed-cves с