test(iast): validate cryptography.x509.base and unpin cryptography-latest #22393
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.59) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.59 · 199 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.317
Sensitive Paths
sensitive_paths
0.059
Real PR Conversation Timeline
1 comments
"Review active on #22393"
general
weight: 0.35
christophe-papazian
Description
Update
PackageForTesting("cryptography", ...)intests/appsec/iast_packages/test_packages.pyto validatecryptography.x509.baseinstead ofcryptography.fernet, and remove the temporarylatest_version="50.0.2"pin (andlatest_versionworkaround) introduced in #22388.cryptography>=51.0.0movedFernetandMultiFernetinto Rust (cryptography.hazmat.bindings._rust.fernet), shrinkingcryptography/fernet.pyfrom 240 lines of Python to a 15-line re-export stub. Becausecryptography.fernetno longer contains AST-patchable Python constructs,astpatch_modulereturnedNoneandtest_packages_patched[cryptography]failed on latest withAssertionError: Module cryptography.fernet was not patched.cryptography.x509.baseremains pure Python in both the pinned (42.0.7) and latest (51.0.1) releases and is AST-patched cleanly on both, unlocking unpinned testing ofcryptography>=51.Customer impact
None. Test-only change.
Existing
ddtraceinstrumentation forcryptography(Cipher.encryptorweak-cipher sink and SCAx509/pkcs12targets) remains pure Python incryptography 51.0.1.Testing
scripts/run-tests --venv 416f48c3e602 -- -k cryptography -vv(Python 3.12): passed (1 passed, 1 xfailed— both42.0.7and live51.0.1patched-import checks passed).scripts/lint fmt -- tests/appsec/iast_packages/test_packages.pyandscripts/lint checks: passed.Risks
Low. Test-only change scoped to
cryptographyinappsec_iast_packages.Additional Notes
Replaces the temporary
50.0.2pin from #22388.