Skip to content

chore(integration): bump cryptography to 46.0.6#8892

Open
EhteshamSid wants to merge 3 commits intoaws:developfrom
EhteshamSid:fix/bump-cryptography-to-46-0-6
Open

chore(integration): bump cryptography to 46.0.6#8892
EhteshamSid wants to merge 3 commits intoaws:developfrom
EhteshamSid:fix/bump-cryptography-to-46-0-6

Conversation

@EhteshamSid
Copy link
Copy Markdown

A few dependencies in the requirements file have CVEs fixed in newer versions:

Bumped each one to the minimum safe version.

There's a mutable default argument in samcli/lib/sync/infra_sync_executor.py. The default value is shared across all calls that don't pass that argument, so mutations in one call silently affect the next. Changed the default to None with an if arg is None guard inside the function.

Changed files: samcli/lib/sync/infra_sync_executor.py, samcli/local/lambdafn/remote_files.py, tests/integration/durable_integ_base.py, tests/integration/local/start_api/test_start_api.py, tests/integration/logs/test_logs_command.py and 8 more

@EhteshamSid EhteshamSid requested a review from a team as a code owner April 5, 2026 20:21
@github-actions github-actions bot added area/local/start-api sam local start-api command area/local/invoke sam local invoke command area/local/start-invoke pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Apr 5, 2026
@EhteshamSid EhteshamSid force-pushed the fix/bump-cryptography-to-46-0-6 branch from 0eea2bc to f2b00de Compare April 6, 2026 20:01
reedham-aws
reedham-aws previously approved these changes Apr 7, 2026
@reedham-aws reedham-aws dismissed their stale review April 7, 2026 22:35

Accidental approval

@EhteshamSid EhteshamSid force-pushed the fix/bump-cryptography-to-46-0-6 branch from f2b00de to 6baf6cc Compare April 7, 2026 22:39
Copy link
Copy Markdown
Contributor

@reedham-aws reedham-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, are there any more places that would require an update to the cryptography version? I'm not understanding why it's just tests/integration/testdata/buildcmd/asset.b998895901bf33127f2c9dce715854f8b35aa73fb7eb5245ba9721580bbe5837/requirements.txt.

Another example of a place with an old version is here:

@EhteshamSid
Copy link
Copy Markdown
Author

Thanks for the review! To answer your question about the other files:

The cryptography==3.3.2 pins in tests/integration/testdata/buildcmd/ (PyLayer, Python, PythonImage, etc.) are intentional test fixtures - they simulate a sample user Lambda function with a specific pinned dependency to test SAM CLI's build pipeline behavior. Bumping those would change what the tests are validating rather than fix a real exposure.

The requirements/reproducible-linux.txt, reproducible-mac.txt, and reproducible-win.txt files (SAM CLI's own dependency lockfiles) are already at 46.0.6 - that was handled upstream before this PR.

The asset.b998895.../requirements.txt file was the outlier - it's a CDK-generated integration test asset that actually gets installed during the test run, so it represented a genuine vulnerable dependency being pulled in. That's the one we updated.

Let me know if you'd like any of the other fixture files updated as well - happy to do so if that's preferred.

@reedham-aws
Copy link
Copy Markdown
Contributor

I don't think the 3.3.2 version is necessarily intentional, just a long time since it was updated 😅. I also don't see the difference between the CDK generated requirements file and the one that I linked before, both should get installed in the buildcmd tests via sam build. I think it might just be easier to update all instances.

Also I'd like to note that there are some linting errors in the CI. You can test those locally by running make pr.

@EhteshamSid
Copy link
Copy Markdown
Author

Fair point - updated all the remaining 3.3.2 pins in the buildcmd test fixtures too. Also fixed the linting issues (unused imports + import ordering in durable_integ_base.py and regression_deploy_base.py).

@EhteshamSid EhteshamSid force-pushed the fix/bump-cryptography-to-46-0-6 branch from 60c6abe to 1fa1643 Compare April 7, 2026 23:13
@EhteshamSid EhteshamSid force-pushed the fix/bump-cryptography-to-46-0-6 branch from fcbc60e to f3468cf Compare April 7, 2026 23:36
@reedham-aws reedham-aws removed the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants