resolve-cve

작성자: openshift

Jira에서 CVE 취약점 문제를 해결합니다. CVE 세부 정보를 읽고 영향을 평가한 후, Jira 댓글과 전환을 통해 "영향 없음"으로 표시하거나, 버전을 올립니다…

npx skills add https://github.com/openshift/lightspeed-service --skill resolve-cve

resolve-cve

The user provides a Jira key (e.g., OLS-789) or a Jira URL. If no specific issue is given, find CVEs to triage by searching the current sprint in the OpenShift Lightspeed Service (OLS) project:

project = OLS AND type = Vulnerability AND sprint in openSprints()
  AND summary ~ "openshift-lightspeed/lightspeed-service-api-rhel9"
  AND statusCategory = "To Do"
  ORDER BY priority DESC

Only process issues whose summary contains openshift-lightspeed/lightspeed-service-api-rhel9 — these are the service CVEs. Skip issues targeting other components (e.g., operator, console plugin).

The summary format is: CVE-YYYY-NNNNN openshift-lightspeed/lightspeed-service-api-rhel9: {Package}: {Title} [ols-N]

If using Jira MCP and the cloudId is unknown, call getAccessibleAtlassianResources to discover it, or ask the user.

Step 1: Read the CVE Issue

Fetch the issue via getJiraIssue with responseContentFormat: "markdown". The issue type is Vulnerability, not a regular story.

Parse the data from these locations:

  • CVE ID — embedded in the summary field, e.g., CVE-2026-33231 openshift-lightspeed/...: NLTK: ...
  • Affected package — mentioned in the description's Flaw: section (the description starts with boilerplate — "Security Tracking Issue", "Do not make this issue public" — skip to the flaw text after the --- separator)
  • Vulnerable version range — in the flaw prose
  • Fix reference — upstream commit or PR link, if mentioned in the flaw text

Then look up severity externally:

  • CVSS score — use WebSearch for the CVE ID on NVD (e.g., CVE-2026-33231 NVD) to get the severity rating

If the issue is missing a CVE ID or the affected package is unclear from the flaw text, ask the user to clarify.

Step 2: Assess Impact

Determine whether this project is affected:

  1. Check if the package is a dependency — search pyproject.toml and uv.lock for the package name. Match case-insensitively (Jira may say NLTK, lock file has nltk). If not present at all, the project is not affected.
  2. Check the installed version — find the exact version in uv.lock. Compare against the vulnerable version range from the advisory.
  3. Check if the vulnerable code path is reachable — if the CVE targets a specific feature or module of the package, search the codebase for imports and usage of that feature. If the project never calls the affected API, it may be not affected even if the version is in range.
  4. Check transitive dependencies — if the package isn't a direct dependency, check whether it appears as a transitive dependency in uv.lock. Trace which direct dependency pulls it in.

Step 3: Present Assessment

Present the finding to the user clearly:

CVE Assessment: {CVE-ID}

Package: {package name}
Vulnerable versions: {range}
Installed version: {version from uv.lock}
Direct dependency: {yes/no — if no, pulled in by {parent}}

Verdict: {NOT AFFECTED / AFFECTED — bump needed / AFFECTED — code change needed}

Reasoning:
- {why this verdict — e.g., "package not in dependency tree",
  "installed version is outside vulnerable range",
  "vulnerable API is not used by this project",
  "project uses the affected code path in module X"}

GATE — do not proceed without user acknowledgment. The user may have context that changes the verdict (e.g., the package is used indirectly, or the feature is enabled in production but not in tests). Present the assessment and stop. Only continue after explicit "go".

Step 4: Resolve

Based on the verdict and user acknowledgment:

Path A: Not Affected

  1. Add a comment to the Jira issue via addCommentToJiraIssue with contentFormat: "markdown":

    **Assessment: Not Affected**
    
    {CVE-ID} targets {package} versions {range}.
    
    {Reason — one of:}
    - Package is not in the dependency tree.
    - Installed version ({version}) is outside the
      vulnerable range.
    - The vulnerable code path ({specific API/module}) is
      not used by this project.
    
    No action required.
    
  2. Transition the issue to Done / Closed with resolution "Won't Do". Call getTransitionsForJiraIssue to find the transition ID for "Done" or "Closed", then transitionJiraIssue with that ID and resolution: { name: "Won't Do" } in the fields.

Path B: Dependency Bump

Follow the deps-update skill with the specific package name. It will bump only that package, run all verification gates, and raise a PR.

After the bump, verify the new version in uv.lock is outside the vulnerable range. If the latest release is still vulnerable, stop and tell the user — no fix is available upstream yet.

Then add a Jira comment:

**Resolution: Dependency bumped**

{CVE-ID} targets {package} versions {range}.
Bumped {package} from {old version} to {new version}.

Lint/types/tests: passing.

Ask user about Jira transition (same as Path A step 2).

Path C: Code Change (Rare)

  1. Explain to the user what code change is needed and why. This is unusual — confirm the approach before implementing.
  2. Make the targeted fix, write or update tests, and run make verify && make check-types && make test-unit.
  3. Add a Jira comment summarizing the code change.
  4. Ask user about Jira transition.

Step 5: Report

CVE {CVE-ID} resolved for {story_id}.

Verdict: {Not Affected / Bumped {package} to {version} / Code fix applied}
Jira: {commented / commented + transitioned to {status}}

{If files changed:}
Files changed:
  - {list files}

Ready to commit.
{End if}

If the user wants a commit (Path B or C), use message:

fix: resolve {CVE-ID} — bump {package} to {version}

or for code changes:

fix: resolve {CVE-ID} — {brief description}

Constraints

  • User acknowledgment required — never act on the verdict without the user confirming the assessment. They may know things the codebase analysis cannot reveal.
  • Jira transitions — Path A (Not Affected) transitions automatically to Done/Closed with resolution "Won't Do". For Paths B and C, ask the user which transition to use.
  • Minimal changes — bump only the affected package, not all dependencies. Use --upgrade-package, not --upgrade.
  • Verify after every change — lint, types, and unit tests must pass before declaring done.
  • Do not downplay severity — if the project is affected, say so clearly. Do not stretch "not affected" reasoning to avoid work.

openshift의 다른 스킬

openshift-docs
openshift
OpenShift Container Platform 문서를 마크다운 형식으로 검색하고 읽습니다. 사용자가 OpenShift 기능, 구성, 설치 등에 대해 질문할 때 사용합니다.
triage-leaked-infra
openshift
AWS VPC 또는 HyperShift CI의 인프라 세트가 삭제해도 안전한지 평가합니다. 사용자가 cleanleaked 출력을 붙여넣고 '이거 삭제해도 되나요?', '이거...'라고 물을 때 사용합니다.
openshift-expert
openshift
OpenShift 플랫폼 및 Kubernetes 전문가로, 클러스터 아키텍처, 오퍼레이터, 네트워킹, 스토리지, 문제 해결 및 CI/CD 파이프라인에 대한 깊은 지식을 보유하고 있습니다. 사용…
Konflux Archived PipelineRuns
openshift
KubeArchive를 통해 보관된 Konflux PipelineRun, TaskRun 및 파드 로그에 접근합니다. Konflux PipelineRun 결과를 확인하거나 조사할 때 자동으로 적용됩니다.
backport
openshift
메인 브랜치에서 릴리스 브랜치로 커밋이나 PR을 백포트합니다. 사용자가 브랜치 간 변경 사항을 백포트, 체리픽, 포팅하거나 해결을 요청할 때 사용합니다.
rebase
openshift
현재 브랜치를 기본 브랜치 위로 리베이스하고, 모든 충돌을 해결한 뒤 린트, i18n, 빌드가 통과하는지 확인합니다. 사용자가 리베이스, 업데이트, 또는 동기화를 요청할 때 사용합니다…
Build CPO Image
openshift
컨트롤 플레인 오퍼레이터 컨테이너 이미지를 빌드하고 푸시합니다. 라이브 클러스터에 배포가 필요한 CPO 변경 사항을 테스트할 때 자동으로 적용됩니다.
find-complexity
openshift
순환 복잡도가 높거나, 길이가 지나치게 길거나, 매개변수가 너무 많은 함수와 메서드를 찾습니다. 사용자가 복잡한 코드나 복잡도를 찾아 달라고 요청할 때 사용하세요.