Skip to content

USHIFT-7291, USHIFT-7292: move advisory report in-tree and fix CVE recommendations#225

Merged
openshift-merge-bot[bot] merged 5 commits into
openshift-eng:mainfrom
agullon:microshift_release_asdlc_fixes
Jul 22, 2026
Merged

USHIFT-7291, USHIFT-7292: move advisory report in-tree and fix CVE recommendations#225
openshift-merge-bot[bot] merged 5 commits into
openshift-eng:mainfrom
agullon:microshift_release_asdlc_fixes

Conversation

@agullon

@agullon agullon commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

The pre-check advisory report previously shelled out to advisory_publication_report.sh in the MicroShift repo clone, which required ATLASSIAN_API_TOKEN + ATLASSIAN_EMAIL for Jira CVE lookups. These env vars are unavailable when running via Claude Code (which uses Jira MCP with OAuth).

This PR:

  • Moves advisory extraction in-tree — new lib/advisory.py fetches CVE data from OCP shipment MRs (GitHub releases.yml + GitLab ocp-shipment-data) with no Jira auth needed. Jira CVE lookup is deferred to the skill layer via MCP.
  • Fixes CVE recommendations — in-progress CVE fixes no longer trigger false NEEDS REVIEW; Done-Errata CVEs (already shipped) no longer trigger false ASK ART TO CREATE ARTIFACTS. Only CVEs with resolution Done (fix landed, not yet shipped) recommend a release.
  • Deduplicates CVEs across advisories (same CVE in extras + image was double-counted).
  • Migrates SKILL.md from Atlassian MCP to Jira MCP tool names, adds advisory CVE enrichment step (Step 6b) and final recommendations table (Step 6c).
  • Adds 10 new unit tests covering dedup, pending enrichment, mixed states, Jira key formatting, and skipped-not-actionable display.

Fixes: USHIFT-7291, USHIFT-7292

Test plan

  • Run /microshift-release:pre-check this week — advisory CVEs show as pending, OCPBUGS enriched via MCP, final recommendations table rendered
  • Run against a version with a Done-Errata CVE — should SKIP, not ASK ART
  • Run against a version with a Done CVE — should ASK ART with CVE-XXXX (OCPBUGS-XXXXX) format
  • Unit tests pass (python -m pytest)

@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 Jul 13, 2026
@openshift-ci

openshift-ci Bot commented Jul 13, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci

openshift-ci Bot commented Jul 13, 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 Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 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

Walkthrough

The MicroShift release precheck now retrieves advisory data through Python, deduplicates CVEs, distinguishes actionable, non-actionable, and pending Jira states, supports CVE enrichment output, updates Jira MCP workflow instructions, and bumps plugin versions to 1.4.2.

Changes

MicroShift release precheck

Layer / File(s) Summary
Advisory retrieval and precheck integration
plugins/microshift-release/scripts/lib/advisory.py, plugins/microshift-release/scripts/precheck_xyz.py, plugins/microshift-release/scripts/lib/git_ops.py
Advisories are extracted from shipment and GitLab YAML data and consumed directly by the precheck as pending CVE entries.
CVE state classification and recommendations
plugins/microshift-release/scripts/precheck_xyz.py
CVE processing deduplicates IDs, counts non-actionable Jira tickets, tracks pending enrichment, removes needs_review, and includes Jira IDs in recommendation and impact text.
CVE enrichment command and workflow
plugins/microshift-release/scripts/enrich_cves.py, plugins/microshift-release/scripts/precheck.sh, plugins/microshift-release/skills/pre-check/SKILL.md
A new command classifies Jira-enriched CVEs and renders markdown output; the skill uses Jira MCP tools to perform enrichment.
Behavior validation and release metadata
plugins/microshift-release/scripts/unit_tests/test_logic.py, .claude-plugin/marketplace.json, plugins/microshift-release/.claude-plugin/plugin.json
Tests cover deduplication, CVE impact states, pending enrichment, and Jira-aware reasons; both plugin manifests are updated to version 1.4.2.

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

Possibly related PRs

Suggested labels: ready-for-human-review

Suggested reviewers: ggiguash, jaypoulz

🚥 Pre-merge checks | ✅ 9 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.35% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Ai-Attribution ⚠️ Warning PR/commits mention Claude Code, but the commits use Co-Authored-By: Claude Opus 4.6 and I found no Assisted-by: or Generated-by: trailer. Replace AI Co-Authored-By trailers with the required Red Hat Assisted-by: or Generated-by: trailer in each AI-assisted commit.
✅ Passed checks (9 passed)
Check name Status Explanation
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 No MD5/SHA1/DES/RC4/3DES/Blowfish, ECB, custom crypto, or secret/token comparisons were introduced in the touched files.
Container-Privileges ✅ Passed No container/K8s manifests were changed; the PR only touches .py, .sh, and .md files, and diff scans found no privileged settings.
No-Sensitive-Data-In-Logs ✅ Passed PASS: The touched code only logs versions, branches, commit hashes, and CVE/Jira IDs; no passwords, tokens, emails, session IDs, or hostnames are logged.
No-Hardcoded-Secrets ✅ Passed Scanned all touched files; found no hardcoded credential literals, embedded-auth URLs, private keys, or token/password string assignments.
No-Injection-Vectors ✅ Passed Changed files contain no SQL concat, shell=True, eval/exec, pickle.loads, unsafe yaml.load, os.system, or dangerouslySetInnerHTML; YAML uses safe_load and subprocess calls use argv lists.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two main changes: moving the advisory report in-tree and updating CVE recommendation logic.
✨ 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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/microshift-release/scripts/precheck_xyz.py (1)

203-205: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Update tests for the removed needs_review contract.

test_cve_needs_review still expects "needs_review" although in-progress resolutions now return "none". test_needs_review_cve_in_progress also passes the removed impact and will now receive SKIP. Update or remove those cases and add explicit Done, Done-Errata, Not a Bug, and in-progress coverage.

Per CONTRIBUTING.md: parsing and interpretation changes require positive and negative tests.

🤖 Prompt for 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.

In `@plugins/microshift-release/scripts/precheck_xyz.py` around lines 203 - 205,
Update the tests covering CVE impact interpretation to remove the obsolete
"needs_review" expectation and input, including test_cve_needs_review and
test_needs_review_cve_in_progress. Add positive and negative coverage for Done,
Done-Errata, Not a Bug, and in-progress states, asserting in-progress cases
return "none" and removed impacts produce SKIP as required.

Source: Path instructions

🤖 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 164-170: Add regression tests for the must-release path through
compute_recommendation and _build_reason, using CVE details with a Jira value
and asserting the reason includes the formatted “CVE (Jira)” text. Also add a
no-Jira case asserting the reason falls back to the CVE alone, with positive and
negative coverage so both formatting behaviors are protected.
- Around line 90-101: Update the precheck function’s contract docstring to
include the "unknown" impact outcome for skipped reports and replace “any other
status” with “any other resolution.” Remove the unused status assignment from
the CVE processing logic, including any now-unnecessary references, so the
Python code passes Ruff.

---

Outside diff comments:
In `@plugins/microshift-release/scripts/precheck_xyz.py`:
- Around line 203-205: Update the tests covering CVE impact interpretation to
remove the obsolete "needs_review" expectation and input, including
test_cve_needs_review and test_needs_review_cve_in_progress. Add positive and
negative coverage for Done, Done-Errata, Not a Bug, and in-progress states,
asserting in-progress cases return "none" and removed impacts produce SKIP as
required.
🪄 Autofix (Beta)

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: ef8b0206-9c72-4036-a0fc-41dd31f32138

📥 Commits

Reviewing files that changed from the base of the PR and between b9c7414 and 7cc091a.

📒 Files selected for processing (1)
  • plugins/microshift-release/scripts/precheck_xyz.py

Comment thread plugins/microshift-release/scripts/precheck_xyz.py
Comment thread plugins/microshift-release/scripts/precheck_xyz.py
@coderabbitai coderabbitai Bot added ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review and removed ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review labels Jul 13, 2026

@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/unit_tests/test_logic.py`:
- Around line 247-254: Update test_in_progress_cves_skip to capture the
recommendation reason returned by compute_recommendation and assert the expected
skipped-in-progress-CVE reason, distinguishing it from the generic SKIP path
covered by test_skip_commits_no_cves.
🪄 Autofix (Beta)

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: 3cf236e8-5fc5-4840-a480-866dd39e1d79

📥 Commits

Reviewing files that changed from the base of the PR and between f728463 and 892ce5a.

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

Comment thread plugins/microshift-release/scripts/unit_tests/test_logic.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: 3

🤖 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 145-146: Update the preceding terminal-status branch handling
Done-Errata and Not a Bug to increment skipped_not_actionable before continuing,
so these CVEs are counted as skipped rather than omitted. Extend
test_cve_done_errata_skipped to assert the updated skipped count and resulting
no actionable CVEs output.
- Around line 107-108: Update the skipped-result branch in the advisory report
handling around advisory_report so it returns the documented default payload
shape: use an empty details list and include advisory_types and
skipped_not_actionable with their documented default values, while preserving
impact as unknown.
- Around line 66-77: Replace the manual brace-depth extraction in the advisory
parsing flow with a JSON-aware decoder that can locate and parse the valid
payload despite warning-prefixed stdout and braces inside quoted string values.
Preserve missing/invalid-payload handling, and add positive and negative
coverage for quoted-brace output and warning-prefixed output.
🪄 Autofix (Beta)

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: 4cb1b8b1-ba7c-4ae4-8603-372465249e7f

📥 Commits

Reviewing files that changed from the base of the PR and between 892ce5a and 4094091.

📒 Files selected for processing (2)
  • plugins/microshift-release/scripts/precheck_xyz.py
  • plugins/microshift-release/scripts/unit_tests/test_logic.py

Comment thread plugins/microshift-release/scripts/precheck_xyz.py Outdated
Comment thread plugins/microshift-release/scripts/precheck_xyz.py Outdated
Comment thread plugins/microshift-release/scripts/precheck_xyz.py 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 Jul 13, 2026

@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: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/microshift-release/scripts/precheck_xyz.py (1)

103-116: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Terminal non-actionable resolutions (Done-Errata, Not a Bug) still aren't counted as skipped.

Only the catch-all else branch increments skipped_not_actionable; Done-Errata/Not a Bug fall through the continue at line 110 uncounted. As a result, a CVE list containing only these terminal resolutions renders as "no CVEs" instead of "no actionable CVEs (n not actionable)" in compute_recommendation/_build_reason. This mirrors a prior review comment that has no recorded fix commit.

🤖 Prompt for 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.

In `@plugins/microshift-release/scripts/precheck_xyz.py` around lines 103 - 116,
Count terminal non-actionable resolutions in the resolution handling around the
CVE classification logic: before continuing for “Done-Errata” or “Not a Bug”,
increment skipped_not_actionable. Preserve the existing continue behavior and
ensure compute_recommendation/_build_reason receives the correct non-actionable
count.
♻️ Duplicate comments (1)
plugins/microshift-release/scripts/precheck_xyz.py (1)

70-71: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Skipped advisory-report result still omits documented keys.

This early return only provides impact/details, but the docstring (lines 62-68) documents advisory_types, skipped_not_actionable, and pending_cve_enrichment as part of the return contract. Downstream code (compute_recommendation, _build_reason) uses .get(..., default) so it won't crash, but the shape is inconsistent with what callers/tests expect for an "unknown" impact.

🩹 Proposed fix
     if not advisory_report or advisory_report.get("skipped"):
-        return {"impact": "unknown", "details": ["Advisory report was skipped"]}
+        return {
+            "impact": "unknown",
+            "details": ["Advisory report was skipped"],
+            "advisory_types": [],
+            "skipped_not_actionable": 0,
+            "pending_cve_enrichment": [],
+        }
🤖 Prompt for 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.

In `@plugins/microshift-release/scripts/precheck_xyz.py` around lines 70 - 71,
Update the skipped or missing advisory-report branch in the relevant precheck
function to return every key documented by its return contract: advisory_types,
skipped_not_actionable, and pending_cve_enrichment, alongside impact and
details. Use the documented empty/default values for these fields while
preserving the existing unknown impact and skipped-report details.
🤖 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/enrich_cves.py`:
- Around line 60-63: Update the summary extraction in the enrichment render to
treat an explicit null jira_ticket.summary the same as a missing value before
slicing and replacing text. Preserve the existing truncation and escaping
behavior for non-null summaries, using the fallback already established by the
surrounding jira fields.
- Around line 37-48: 添加针对 classify_cve 的单元测试,覆盖无 jira_ticket、resolution 为
Done、Done-Errata、Not a Bug 以及未知或缺失 resolution 的正反向场景;断言返回结果中的 release_action 和
actionable,同时确认原始 entry 字段被保留。

In `@plugins/microshift-release/scripts/lib/advisory.py`:
- Line 46: Update the external HTTPS request in _get_shipment_mr_url to use the
default TLS certificate verification by removing verify=False from requests.get,
while preserving the existing URL and timeout behavior.
- Around line 206-217: Update the token check in the advisory flow before
_get_advisories so GITLAB_API_TOKEN is required only when the parsed minor
version meets the documented 4.20+ threshold, comparing parts[1] numerically
rather than merely checking that it is digits. Preserve the existing
missing-token response and avoid gating versions below 4.20.

In `@plugins/microshift-release/skills/pre-check/SKILL.md`:
- Line 6: Update the allowed-tools declaration in the pre-check skill to include
mcp__atlassian__searchJiraIssuesUsingJql, which is still invoked by the Step 2
and Step 3 ART-ticket resolution flows, while retaining the existing tools and
keeping the list limited to tools actually used.

---

Outside diff comments:
In `@plugins/microshift-release/scripts/precheck_xyz.py`:
- Around line 103-116: Count terminal non-actionable resolutions in the
resolution handling around the CVE classification logic: before continuing for
“Done-Errata” or “Not a Bug”, increment skipped_not_actionable. Preserve the
existing continue behavior and ensure compute_recommendation/_build_reason
receives the correct non-actionable count.

---

Duplicate comments:
In `@plugins/microshift-release/scripts/precheck_xyz.py`:
- Around line 70-71: Update the skipped or missing advisory-report branch in the
relevant precheck function to return every key documented by its return
contract: advisory_types, skipped_not_actionable, and pending_cve_enrichment,
alongside impact and details. Use the documented empty/default values for these
fields while preserving the existing unknown impact and skipped-report details.
🪄 Autofix (Beta)

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: abd7dc69-16f9-4eb3-849a-c493904155e4

📥 Commits

Reviewing files that changed from the base of the PR and between 4094091 and c6d0a80.

📒 Files selected for processing (7)
  • plugins/microshift-release/scripts/enrich_cves.py
  • plugins/microshift-release/scripts/lib/advisory.py
  • plugins/microshift-release/scripts/lib/git_ops.py
  • plugins/microshift-release/scripts/precheck.sh
  • plugins/microshift-release/scripts/precheck_xyz.py
  • plugins/microshift-release/scripts/unit_tests/test_logic.py
  • plugins/microshift-release/skills/pre-check/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/microshift-release/scripts/unit_tests/test_logic.py

Comment thread plugins/microshift-release/scripts/enrich_cves.py Outdated
Comment on lines +60 to +63
jira = c.get("jira_ticket") or {}
jid = jira.get("id", "--")
resolution = jira.get("resolution", "--")
summary = jira.get("summary", "--")[:80].replace("|", "\\|").replace("\n", " ")

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Guard against explicit null summary crashing the render.

If jira_ticket.summary is explicitly null (key present, value None), .get("summary", "--") returns None, and None[:80] raises TypeError, aborting the whole enrichment render for all CVEs in the batch.

🛡️ Proposed fix
-        summary = jira.get("summary", "--")[:80].replace("|", "\\|").replace("\n", " ")
+        summary = (jira.get("summary") or "--")[:80].replace("|", "\\|").replace("\n", " ")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
jira = c.get("jira_ticket") or {}
jid = jira.get("id", "--")
resolution = jira.get("resolution", "--")
summary = jira.get("summary", "--")[:80].replace("|", "\\|").replace("\n", " ")
jira = c.get("jira_ticket") or {}
jid = jira.get("id", "--")
resolution = jira.get("resolution", "--")
summary = (jira.get("summary") or "--")[:80].replace("|", "\\|").replace("\n", " ")
🤖 Prompt for 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.

In `@plugins/microshift-release/scripts/enrich_cves.py` around lines 60 - 63,
Update the summary extraction in the enrichment render to treat an explicit null
jira_ticket.summary the same as a missing value before slicing and replacing
text. Preserve the existing truncation and escaping behavior for non-null
summaries, using the fallback already established by the surrounding jira
fields.

Comment thread plugins/microshift-release/scripts/lib/advisory.py Outdated
Comment thread plugins/microshift-release/scripts/lib/advisory.py
Comment thread plugins/microshift-release/skills/pre-check/SKILL.md
agullon added a commit to agullon/edge-tooling that referenced this pull request Jul 21, 2026
- Complete Atlassian → Jira MCP migration in SKILL.md (Steps 2-3,
  fallback, Notes, Prerequisites still referenced old tool names)
- Fix branch ordering in advisory.py: try source_branch before
  target_branch so unmerged MRs read MR content, not stale base
- Add AttributeError guard to chained .get() in _get_advisories,
  matching the pattern in _get_shipment_mr_url
- Use os.path.basename for advisory type matching instead of
  substring match against full file path
- Map 'pending_enrichment' to 'pending' in verbose table display
- Remove unused 'import os' from precheck_xyz.py

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

pre-commit.check-secrets: ENABLED
@agullon
agullon marked this pull request as ready for review July 21, 2026 16:31
@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 Jul 21, 2026
agullon added 2 commits July 21, 2026 18:32
Move advisory report generation from shelling out to MicroShift's
advisory_publication_report.sh to an in-tree advisory.py that extracts
CVE data from OCP shipment MRs (GitHub releases.yml + GitLab). This
removes the ATLASSIAN_API_TOKEN dependency — Jira CVE lookup is
deferred to the skill layer via MCP.

CVE interpretation changes:
- Skip in-progress CVE fixes instead of flagging NEEDS REVIEW
- Deduplicate CVEs across advisories (extras + image)
- Handle Done-Errata as already-shipped (no action needed)
- Include OCPBUGS tracker key in recommendation output
- Track skipped/pending counts for visibility

Fixes: USHIFT-7291, USHIFT-7292

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

pre-commit.check-secrets: ENABLED
- Rename test_cve_needs_review → test_cve_in_progress_skipped
- Rename test_cve_needs_review_status_verified → test_cve_verified_but_unresolved_skipped
- Add tests: CVE deduplication across advisories, pending enrichment,
  mixed must_release+skipped, Jira key in recommendations,
  skipped_not_actionable display, pending_enrichment reason formatting

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

pre-commit.check-secrets: ENABLED
@agullon
agullon force-pushed the microshift_release_asdlc_fixes branch from 6a7fac1 to d2d7063 Compare July 21, 2026 16:32
@agullon

agullon commented Jul 21, 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 Jul 21, 2026
@agullon agullon changed the title fix: pre-check CVE recommendation improvements pre-check: move advisory report in-tree and fix CVE recommendations Jul 21, 2026
@agullon agullon changed the title pre-check: move advisory report in-tree and fix CVE recommendations USHIFT-7291, USHIFT-7292: move advisory report in-tree and fix CVE recommendations Jul 21, 2026
agullon added 2 commits July 21, 2026 18:36
- Replace Atlassian MCP tool references with Jira MCP equivalents
  (jira_get_issue, jira_search)
- Enforce ISO 8601 Monday-based weeks in time range parsing
- Add Step 7: advisory CVE enrichment via Jira MCP search
- Add Step 8: final recommendations table (one row per version)

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

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

pre-commit.check-secrets: ENABLED
@agullon
agullon force-pushed the microshift_release_asdlc_fixes branch from d2d7063 to de44312 Compare July 21, 2026 16:36
@openshift-ci openshift-ci Bot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Jul 22, 2026
Comment thread plugins/microshift-release/skills/pre-check/SKILL.md
Comment thread plugins/microshift-release/scripts/lib/git_ops.py Outdated
Advisory report logic moved in-tree (advisory.py), so the
sparse-checkout of scripts/advisory_publication is no longer needed.
The --filter=blob:none partial clone already avoids downloading blobs.

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

pre-commit.check-secrets: ENABLED
@kasturinarra

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 22, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit afefbc1 into openshift-eng:main Jul 22, 2026
6 checks passed
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. lgtm Indicates that a PR is ready to be merged. 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.

3 participants