← Back to Pull requests

Fix 7 operator CVEs: make vendored wheels work on the el9 base [release-1.8] #985

Closed
unknown closed this pull request without merging on Nov 13, 2026 00:12 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 10:38 UTC
Author

Summary

Gets the vendored Python wheels building on the el9 base, which is what the seven operator CVE fixes depend on.

Paired with openshift-eng/ocp-build-data#14603, which moves the base image. This PR is the repo-side half.

What Rayford's local el9 build found

Two failures, both from wheels pinned for Python 3.6:

Processing /tmp/pip3-install-dir/PyYAML-6.0.1.tar.gz
  Installing build dependencies: finished with status 'error'

ERROR: Cannot install google-auth==2.22.0 and urllib3 2.8.0 because these
package versions have conflicting dependencies.
  google-auth 2.22.0 depends on urllib3<2.0

PyYAML-6.0.1.tar.gz is an sdist, so pip fetches build dependencies at install time — impossible in a hermetic build. And the old google-auth caps urllib3 below 2.0, which collides with the urllib3 the CVE fix requires.

The fix

Rather than refreshing all 19 wheels for Python 3.12, most turn out to be unnecessary. ose-ansible-rhel9-operator:v4.18 already ships them:

| Already in base | Version |
|---|---|
| kubernetes | 30.1.0 |
| PyYAML | 6.0.3 |
| requests | 2.32.5 |
| requests-oauthlib | 2.0.0 |
| oauthlib | 3.3.1 |
| six | 1.17.0 |
| idna | 3.11 |
| python-dateutil | 2.9.0 |
| websocket-client | 1.9.0 |
| charset-normalizer | 3.4.6 |
| cryptography | 41.0.7 |
| google-auth | 2.49.1 |

google-auth 2.49.1 has no urllib3 cap, so the conflict disappears as soon as our 2.22.0 wheel is dropped. cachetools and rsa go with it, since google-auth no longer depends on them.

What's left is only what the base doesn't provide, plus the CVE fixes:

| Wheel | Why | Base has |
|-------|-----|----------|
| openshift 0.13.2 | not in base, and the RPM is erased | — |
| python_string_utils 1.0.0 | openshift dependency | — |
| certifi 2026.10.23 | MIG-2062 | 2026.2.25 |
| urllib3 2.8.0 | MIG-2053, 2052 | 2.6.3 |
| pyasn1 0.6.5 | MIG-2063, 2060, 2059, 2058 | 0.6.3 |
| pyasn1_modules 0.4.2 | with the above | 0.4.2 |

All six are pure-Python, so nothing compiles at install time and the set stays arch independent — which also removes the sdist problem permanently.

Note the pyasn1 wheels were still at 0.5.1 / 0.3.0 before this. Since the Dockerfile installs every wheel over the base, the old ones would have downgraded the base's fixed 0.6.3 and left those four CVEs present.

Testing

Against ose-ansible-rhel9-operator:v4.18 on linux/amd64 with networking disabled, to mimic the hermetic build:

$ podman run --rm --platform linux/amd64 --network=none --user root \
    -v ./hack/build/third-party/pip3-install-dir:/tmp/pip3-install-dir:ro \
    registry.redhat.io/openshift4/ose-ansible-rhel9-operator:v4.18 \
    sh -c "pip3 install /tmp/pip3-install-dir/* && pip3 check && python3 -c 'import openshift, kubernetes'"

Successfully installed certifi-2026.10.23 openshift-0.13.2 pyasn1-0.6.5 \
  python-string-utils-1.0.0 urllib3-2.8.0
No broken requirements found.
imports ok

certifi         2026.10.23
pyasn1          0.6.5
pyasn1_modules  0.4.2
urllib3         2.8.0
kubernetes      30.1.0
openshift       0.13.2

Also confirmed dnf -y erase python3-openshift exits 0 on el9 even though the package isn't there, so that line is harmless.

Known remaining gap

dnf -y install python3-boto3 nss_wrapper still needs a repo that carries python3-boto3. On the el9 base only nss_wrapper resolves from the configured repos. That's the enabled_repos question in ocp-build-data#14603 — the pip side is now sorted, but that dnf line will still fail until the right el9 repo is enabled.

Jira

Resolves: MIG-2062, MIG-2063, MIG-2060, MIG-2059, MIG-2058, MIG-2053, MIG-2052

Diff: 455 lines (+341 / -114) across 5 files Reviewer: awels Review duration: 813m
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 455 lines diff across 5 files
0.45
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.366
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #985"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 45.5% (MEDIUM) · Higher = larger blast radius
45.5%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 18.0% · Safe to merge
18.0%