fix: FIPS-compatible workaround for paramiko MD5 fingerprint issue #6430
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 367 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.353
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #6430"
general
weight: 0.35
geetikakay
##### What this PR does / why we need it:
On FIPS-enabled clusters, the
ocp-virt-validation-checkup-rhel9image uses RHEL 9.8 as base with the system Python interpreter. The system Python linkshashlibagainst RHEL's system OpenSSL, which enforces FIPS mode when the cluster has FIPS enabled (/proc/sys/crypto/fips_enabled = 1).In FIPS mode,
hashlib.md5()withoutusedforsecurity=FalseraisesUnsupportedDigestmodError, causing all SSH connectivity checks into VMs to fail:Root cause:
paramiko.pkey.md5(imported fromhashlib) is called by:PKey.get_fingerprint()— used for display/logging of host key fingerprints in all host key policies (AutoAddPolicy,RejectPolicy,WarningPolicy) and during SSH client authPKey._read_private_key_pem()— used for password-protected PEM key decryptionCI (Jenkins) uses the
openshift-virtualization-tests:latestimage (Fedora 41 +uvstandalone Python) which bundles its own OpenSSL that does not inherit the host FIPS policy — hence no failure there.Upstream status: Known paramiko bug (issue #396, open since 2014). Multiple PRs submitted (#1928, #2189, #2496, #2624) — none merged. No fix in
paramiko 5.0.0.Fix: Patch
paramiko.pkey.md5at import time viavars()to useusedforsecurity=False. This tells OpenSSL FIPS that the MD5 usage is not for security purposes (fingerprint display/logging only).Validated on a FIPS-enabled cluster:
test_clone_from_block_to_fs_using_dv_templatefails without the patch and passes with it on theocp-virt-validation-checkup-rhel9image.##### Which issue(s) this PR fixes:
CNV-98463
##### Special notes for reviewer:
vars(paramiko.pkey).update(...)is used instead of direct attribute assignment to avoid mypyattr-defined/method-assignerrors on third-party module patching, without requiring# type: ignore(prohibited by AGENTS.md) or a broadignore_errorsmypy override.##### jira-ticket:
CNV-98463
🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Chores
Improved compatibility for automated test runs in FIPS-enabled environments. Application behavior and user-facing functionality are unchanged; this update affects test setup only and does not alter security protections. No new end-user features or other behavior changes are included.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->