← Back to Pull requests

Fix MIG-2057/2066: vendor dnspython and azure-core wheels for hermetic build #52

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

Summary

Reworks the fix from #51, which broke the build.

What went wrong in #51

#51 used pip3 install --upgrade to pull the patched packages from PyPI. MTC images build hermetically — group.yml on mtc-1.8 sets konflux.network_mode: hermetic for the whole group — so there is no network at build time:

ERROR: Could not find a version that satisfies the requirement dnspython>=2.9.0 (from versions: none)
ERROR: No matching distribution found for dnspython>=2.9.0
Error: building at STEP "RUN pip3 install --upgrade 'dnspython>=2.9.0' 'azure-core>=1.38.0'": exit status 1

RPMs are fine because cachi2 prefetches them via the rpm lockfile, but no pip prefetch is configured, so anything from PyPI is unreachable.

The fix

Vendor the wheels into the repo and install from local files — the same pattern mig-operator already uses in hack/build/third-party/pip3-install-dir:

COPY hack/build/third-party/pip3-install-dir/ /tmp/pip3-install-dir/
RUN pip3 install --no-index --no-deps /tmp/pip3-install-dir/*.whl && rm -rf /tmp/pip3-install-dir/

| Package | Base image | Vendored | CVE |
|---------|-----------|----------|-----|
| dnspython | 2.6.1 | 2.9.0 | CVE-2026-114605 (MIG-2057) |
| azure-core | 1.31.0 | 1.38.0 | CVE-2026-21226 (MIG-2066) |

Both are pure-Python wheels with no build step. --no-deps is safe because their dependencies are already satisfied in the base image — requests 2.31.0, six 1.17.0, typing_extensions 4.15.0, against requirements of >= 2.21.0, >= 1.11.0 and >= 4.6.0. dnspython has no required dependencies.

Testing

Ran the install inside the base image with networking disabled, to mimic the hermetic build:

$ podman run --rm --network=none --user root \
    -v ./hack/build/third-party/pip3-install-dir:/tmp/pip3-install-dir:ro \
    registry.redhat.io/ansible-automation-platform-25/platform-resource-runner-rhel8:latest \
    sh -c "pip3 install --no-index --no-deps /tmp/pip3-install-dir/*.whl && pip3 list"

Successfully installed azure-core-1.38.0 dnspython-2.9.0

azure-core    1.38.0
dnspython     2.9.0

Jira

Resolves: MIG-2057, MIG-2066

Diff: 268 lines (+201 / -67) across 3 files Reviewer: awels Review duration: 220m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 268 lines diff across 3 files
0.39
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.335
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #52"
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: 39.4% (MEDIUM) · Higher = larger blast radius
39.4%
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: 15.6% · Safe to merge
15.6%