Skip to content

Commit 8bf726a

Browse files
committed
Don't check priority labels in CVE check
Discussed on Slack, they don't really affect where the fix should be created in.
1 parent efd9b50 commit 8bf726a

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

mcp_server/jira_tools.py

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
TARGET_END_CUSTOM_FIELD = "customfield_12313942"
1919
EMBARGO_CUSTOM_FIELD = "customfield_12324750"
2020

21-
PRIORITY_LABELS = ["compliance-priority", "contract-priority"]
2221

2322
RH_EMPLOYEE_GROUP = "Red Hat Employee"
2423

@@ -232,27 +231,19 @@ async def check_cve_triage_eligibility(
232231
rhel_config = await load_rhel_config()
233232
current_z_streams = rhel_config.get("current_z_streams", {})
234233

234+
needs_internal_fix = False
235+
severity = fields.get(SEVERITY_CUSTOM_FIELD, {}).get("value", "")
236+
235237
# Check if z-stream is not in current z-streams - always needs internal fix
236238
if target_version.lower() not in [v.lower() for v in current_z_streams.values()]:
237239
needs_internal_fix = True
238240
reason = f"Z-stream CVE ({target_version}) not in current z-streams, needs RHEL fix first"
241+
# Determine if internal fix is needed based on severity
242+
elif severity not in [Severity.LOW.value, Severity.MODERATE.value]:
243+
needs_internal_fix = True
244+
reason = f"High severity CVE ({severity}) eligible for Z-stream, needs RHEL fix first"
239245
else:
240-
# Determine if internal fix is needed based on severity and priority
241-
severity = fields.get(SEVERITY_CUSTOM_FIELD, {}).get("value", "")
242-
priority_labels = [label for label in labels if label in PRIORITY_LABELS]
243-
244-
needs_internal_fix = (
245-
severity not in [Severity.LOW.value, Severity.MODERATE.value] or
246-
bool(priority_labels)
247-
)
248-
249-
if needs_internal_fix:
250-
if severity not in [Severity.LOW.value, Severity.MODERATE.value]:
251-
reason = f"High severity CVE ({severity}) eligible for Z-stream, needs RHEL fix first"
252-
else:
253-
reason = f"Priority CVE with labels {priority_labels} eligible for Z-stream, needs RHEL fix first"
254-
else:
255-
reason = "CVE eligible for Z-stream fix in CentOS Stream"
246+
reason = "CVE eligible for Z-stream fix in CentOS Stream"
256247

257248
return CVEEligibilityResult(
258249
is_cve=True,

0 commit comments

Comments
 (0)