Skip to content

feat(microshift-release): cumulative CVE scanning, Jira enrichment, and post-release dual errata - #264

Open
agullon wants to merge 1 commit into
openshift-eng:mainfrom
agullon:feat-precheck-cumulative-cves
Open

feat(microshift-release): cumulative CVE scanning, Jira enrichment, and post-release dual errata#264
agullon wants to merge 1 commit into
openshift-eng:mainfrom
agullon:feat-precheck-cumulative-cves

Conversation

@agullon

@agullon agullon commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Three major improvements to MicroShift release tooling, making the precheck script self-contained and the post-release checks comprehensive.

1. Pre-check: cumulative advisory CVE scanning

MicroShift often skips many OCP z-stream versions. Previously, the precheck only checked the current version's advisory. Now it scans ALL skipped versions to catch CVEs from releases MicroShift didn't participate in.

  • Scans advisories from last_released+1 through current version (capped at 20)
  • Discovers MicroShift component CVEs via Jira REST API (text ~ "microshift" + pscomponent label filtering)
  • Enriches OCPBUGS and advisory CVEs directly in the script (moved from skill layer)
  • Filters already-shipped CVEs using prior advisory data
  • Removed --verbose flag — script always shows full analysis

2. Pre-check: Jira REST API client (lib/jira_client.py)

New module that queries Jira Cloud directly, making the script self-contained:

  • OCPBUGS enrichment: fetches real summary, status, labels, release action for commit-discovered bugs
  • Advisory CVE enrichment: searches by version-scoped JQL, filtered to MicroShift components only
  • Component CVE discovery: finds unshipped CVE trackers with MicroShift pscomponent labels
  • Shipped CVE dedup: uses resolutiondate filter + advisory presence to exclude already-shipped fixes

3. Post-release: dual errata verification

Post-release checks now verify both RPM and bootc image erratas separately:

  • Bootc errata sourced from shipment MR (stage + prod URLs)
  • Cross-validates errata images against advisory.yaml
  • New RPM downloads check against public errata page
  • Section names include source URLs for clarity

Recomendation statuses

Emoji Status Meaning
🔴 ASK ART Action needed now OCP payload ready, must release
BLOCKED Action decided, waiting Need to release but OCP payload not ready yet
🟡 NEEDS REVIEW Human judgment needed Unlabeled OCPBUGS, ambiguous cases
🟢 SKIP No action No CVEs, no bugs, within 90 days
ALREADY RELEASED Done Already shipped

Example output

/microshift-release:pre-check this week (results on 14th August):

Recommendations

Recommendation Version OCP CVEs OCPBUGS Last Release Reason
🔴 ASK ART 4.18.53 available no CVEs (11 versions checked) none 4.18.42 (88d ago) 90-day rule (93d gap at 2026-08-19), 50 commits
🔴 ASK ART 4.19.43 available 1 CVE fix 1 (1 release-required) 4.19.42 (8d ago) 1 CVE fix (resolution Done)
🟢 SKIP 4.20.34 available no CVEs (8 versions checked) none 4.20.26 (56d ago) 56d since last release, 23 commits, no CVEs
🔴 ASK ART 4.21.29 available no CVEs (13 versions checked) 1 (1 unlabeled) 4.21.16 (88d ago) 90-day rule (92d gap at 2026-08-18), 62 commits
🟢 SKIP 4.22.10 available no CVEs (3 versions checked) none 4.22.7 (21d ago) 21d since last release, 9 commits, no CVEs

OCPBUGS in detail

Version Bug Status Source Release Action Summary
4.19.43 OCPBUGS-92157 Verified component-cve release_required CVE-2026-39820 microshift: Go net/mail: Denial of Service via crafted email inputs [openshift-4.19]
4.21.29 OCPBUGS-86061 ON_QA commit needs_review Version sync required for LVMS operator image for MicroShift 4.21

Test plan

  • Live tested against 4.21.28 and 4.22.9 — cumulative scanning, CVE enrichment, shipped CVE filtering all verified
  • OCPBUGS-81998 (CVE-2026-34986) correctly discovered and filtered as shipped
  • False positives eliminated (OCP-only components, cross-version tickets, shipped CVEs)
  • 79 post-release unit tests pass
  • Code review and silent failure audit completed — all critical/important findings addressed

🤖 Generated with Claude Code

@openshift-ci

openshift-ci Bot commented Aug 12, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9fda0019-7d9f-4cfc-b43d-48b5fb212c3f

📥 Commits

Reviewing files that changed from the base of the PR and between d5572ab and 31b20d5.

📒 Files selected for processing (3)
  • plugins/microshift-release/scripts/lib/jira_client.py
  • plugins/microshift-release/scripts/lib/ocpbugs.py
  • plugins/microshift-release/scripts/precheck_xyz.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • plugins/microshift-release/scripts/lib/ocpbugs.py
  • plugins/microshift-release/scripts/lib/jira_client.py
  • plugins/microshift-release/scripts/precheck_xyz.py

Walkthrough

Changes

The MicroShift release plugin now scans cumulative z-stream advisories and discovers component CVEs through Jira. Reports include scan details and enrichment status. The plugin version is updated to 1.7.0.

MicroShift release precheck

Layer / File(s) Summary
Cumulative advisory scanning and reporting
plugins/microshift-release/scripts/precheck_xyz.py
The precheck scans skipped z-stream versions concurrently, merges advisory CVEs, tracks failures, and adds scan ranges, counts, pending-enrichment details, and source versions to reports.
Jira component CVE discovery
plugins/microshift-release/scripts/lib/jira_client.py, plugins/microshift-release/skills/pre-check/SKILL.md
The workflow searches Jira for MicroShift component CVEs, filters and classifies findings, deduplicates CVEs, and adds actionable results to enrichment output.
OCPBUGS integration and plugin metadata
plugins/microshift-release/scripts/lib/ocpbugs.py, .claude-plugin/marketplace.json, plugins/microshift-release/.claude-plugin/plugin.json
OCPBUGS results combine commit-derived and Jira-derived CVEs, calculate release-action counts, report Jira unavailability, and use plugin version 1.7.0.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: ready-for-human-review

🚥 Pre-merge checks | ✅ 9 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning The PR names Claude Code, and all 8 introduced commits use Co-Authored-By: Claude Opus; no Assisted-by or Generated-by trailer is present. Replace the AI Co-Authored-By trailers with the required Red Hat Assisted-by or Generated-by trailer format, then amend the PR commits.
Title check ⚠️ Warning The title accurately describes cumulative CVE scanning and Jira enrichment but adds “post-release dual errata,” which is not supported by the documented changes. Remove “post-release dual errata” unless the pull request also implements and documents that behavior.
✅ Passed checks (9 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 92.31% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Weak-Crypto ✅ Passed The PR diff adds no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret/token comparisons; Jira uses requests Basic Auth over an HTTPS endpoint.
Container-Privileges ✅ Passed The full PR diff adds no privileged, host namespace, SYS_ADMIN, allowPrivilegeEscalation, or root-running settings; changes are Python logic, documentation, and plugin metadata.
No-Sensitive-Data-In-Logs ✅ Passed Added logs contain versions, counts, and failure text; JIRA_API_TOKEN and JIRA_USERNAME are only used for auth and their values are never logged.
No-Hardcoded-Secrets ✅ Passed The PR uses JIRA_API_TOKEN and JIRA_USERNAME from the environment; scans found no hardcoded secret, long base64 string, or URL with embedded credentials.
No-Injection-Vectors ✅ Passed The PR adds a Jira REST request with JQL, not SQL, and uses argument-list subprocess.run; no listed shell, eval/exec, pickle, unsafe YAML, os.system, or DOM injection pattern was introduced.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/microshift-release/scripts/precheck_xyz.py`:
- Around line 136-145: Preserve advisory coverage through fetch, interpretation,
and reporting. In plugins/microshift-release/scripts/precheck_xyz.py lines
136-145, return the merged report together with successful, attempted, and
failed versions, and mark partial coverage unavailable for recommendations;
retain the all-failed behavior. At lines 90-96, store the post-cap selected
range as coverage metadata; persist it in result at lines 479-489, and update
the reason formatting at lines 564-576 and detailed report formatting at lines
733-747 to use the actual successful or selected coverage rather than
reconstructing the original range.

In `@plugins/microshift-release/skills/pre-check/SKILL.md`:
- Around line 190-225: Add a manual-tests section for Step 7b covering both a
matching MicroShift component-CVE search and an empty-result search. For the
matching case, document the expected component-tracker CVE entry in the
enrichment table and the “ASK ART TO CREATE ARTIFACTS” recommendation when
resolution is Done or status is Verified; for the empty case, document that no
CVE table or recommendation output is produced.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 9739096f-0225-4898-906d-d8021cd8e0fa

📥 Commits

Reviewing files that changed from the base of the PR and between 6130071 and 10c0392.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • plugins/microshift-release/.claude-plugin/plugin.json
  • plugins/microshift-release/scripts/precheck_xyz.py
  • plugins/microshift-release/skills/pre-check/SKILL.md

Comment thread plugins/microshift-release/scripts/precheck_xyz.py
Comment thread plugins/microshift-release/skills/pre-check/SKILL.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/microshift-release/scripts/precheck_xyz.py`:
- Around line 281-286: Update the decision paths using cve_impact, commits, and
pending_cves so pending enrichment never returns SKIP, including when commits ==
0; return NEEDS REVIEW until all advisory CVEs are enriched. Ensure
interpret_cves() results that are must_release while retaining pending IDs
include the pending details in early and mixed-impact reasons via cve_suffix.
Add tests covering zero-commit pending enrichment and mixed-impact pending CVEs.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 17dbeb9b-5a15-49fa-828a-0afa5558f13d

📥 Commits

Reviewing files that changed from the base of the PR and between 10c0392 and 91485ea.

📒 Files selected for processing (2)
  • plugins/microshift-release/scripts/precheck_xyz.py
  • plugins/microshift-release/skills/pre-check/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/microshift-release/skills/pre-check/SKILL.md

Comment thread plugins/microshift-release/scripts/precheck_xyz.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/microshift-release/scripts/lib/jira_client.py`:
- Around line 118-146: Skip the issue in the CVE-processing flow when no label
matches _CVE_LABEL_RE, before determining release_action or appending to
all_bugs. Preserve matching-label behavior and add positive and negative tests
covering CVE label detection plus the release_required, not_actionable, and
needs_review branches.
- Around line 90-94: Validate minor against the exact \A\d+\.\d+\Z pattern
before constructing the JQL in the Jira query-building function. Reject any
non-matching value before it reaches the versions clause, and add tests covering
valid minor values and invalid values, including quote or injected-JQL attempts.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 68d179c4-2db3-494f-a2aa-6e49a5f55f97

📥 Commits

Reviewing files that changed from the base of the PR and between 91485ea and 6300f01.

📒 Files selected for processing (2)
  • plugins/microshift-release/scripts/lib/jira_client.py
  • plugins/microshift-release/scripts/lib/ocpbugs.py

Comment thread plugins/microshift-release/scripts/lib/jira_client.py Outdated
Comment thread plugins/microshift-release/scripts/lib/jira_client.py Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/microshift-release/skills/pre-check/SKILL.md`:
- Line 31: Update the Jira discovery flow associated with JIRA_API_TOKEN and
JIRA_USERNAME so missing credentials produce a skipped empty result, while
invalid credentials or Jira request failures preserve an unavailable/error state
instead of being treated as an empty successful list. Ensure the caller reports
the distinction accurately, and update SKILL.md documentation and tests to cover
skipped versus failed discovery, including expected results and credential/API
failure modes.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 032c70f8-e476-43d9-be4f-05d91b9926c3

📥 Commits

Reviewing files that changed from the base of the PR and between 6300f01 and d5572ab.

📒 Files selected for processing (1)
  • plugins/microshift-release/skills/pre-check/SKILL.md

Comment thread plugins/microshift-release/skills/pre-check/SKILL.md Outdated
@coderabbitai coderabbitai Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Aug 12, 2026
agullon added a commit to agullon/edge-tooling that referenced this pull request Aug 12, 2026
Auto-applied:
- precheck_xyz.py:327: pending CVEs with zero commits now returns NEEDS REVIEW instead of SKIP
- jira_client.py:128: skip Jira issues that have no CVE label

Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

pre-commit.check-secrets: ENABLED
@agullon
agullon marked this pull request as draft August 12, 2026 13:45
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 12, 2026
agullon added a commit to agullon/edge-tooling that referenced this pull request Aug 13, 2026
Auto-applied:
- precheck_xyz.py:327: pending CVEs with zero commits now returns NEEDS REVIEW instead of SKIP
- jira_client.py:128: skip Jira issues that have no CVE label

Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

pre-commit.check-secrets: ENABLED
@agullon
agullon force-pushed the feat-precheck-cumulative-cves branch 2 times, most recently from 559ecc6 to 38dd3bb Compare August 13, 2026 11:45
@agullon agullon changed the title feat(microshift-release): cumulative CVE scanning and component CVE discovery feat(microshift-release): cumulative CVE scanning, Jira enrichment, and post-release dual errata Aug 13, 2026
@agullon

agullon commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/label tide/merge-method-squash

@openshift-ci openshift-ci Bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 13, 2026
@agullon
agullon marked this pull request as ready for review August 13, 2026 11:51
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 13, 2026
@agullon
agullon force-pushed the feat-precheck-cumulative-cves branch 3 times, most recently from c2d7766 to c2f8425 Compare August 14, 2026 10:05
…nd post-release dual errata

Three major improvements to MicroShift release tooling:

1. Pre-check: cumulative advisory CVE scanning
   - Scans advisories for ALL skipped OCP versions (not just current)
   - Discovers MicroShift component CVEs via Jira REST API
   - Enriches OCPBUGS and advisory CVEs directly in the script
   - Filters already-shipped CVEs using prior advisory data
   - Combined recommendations table with emoji indicators
   - Removed --verbose flag — script always shows full analysis

2. Pre-check: Jira REST API client (lib/jira_client.py)
   - OCPBUGS enrichment (summary, status, labels, release action)
   - Advisory CVE enrichment (searches by version-scoped JQL)
   - Component CVE discovery (pscomponent label matching)
   - Shipped CVE deduplication via resolutiondate filter

3. Post-release: dual errata verification
   - Verifies both RPM and bootc image erratas separately
   - Bootc errata sourced from shipment MR (stage + prod)
   - Cross-validates errata images against advisory.yaml
   - RPM downloads check against public errata page
   - Section names include source URLs for clarity

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@agullon
agullon force-pushed the feat-precheck-cumulative-cves branch from c2f8425 to f6faafc Compare August 14, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant