Repository navigation
Conversation
Gowri213
force-pushed
the
fix-elixir-pessimistic-version-2529
branch
from
November 25, 2026 11:07
6c7173b to
1a58985
Compare
Signed-off-by: Gowri <gowri21115@gmail.com>
nikolya-ctrl
left a comment
There was a problem hiding this comment.
Tested this locally on the PR head (WSL Ubuntu, Python 3.13).
vulnerabilities/tests/pipelines/v2_importers/test_elixir_security_importer_v2.py: 4 passed.- I also checked
expand_pessimistic_versionagainst theplug/2017-02-28example from #2529 (>= 1.3.2,~> 1.2.3,~> 1.1.7,~> 1.0.4). The resulting range isvers:hex/<1.0.4|>=1.1.0|<1.1.7|>=1.2.0|<1.2.3|>=1.3.0|<1.3.2, which matches the expected value in the issue.
Spot checks:
1.0.3 affected 1.0.5 patched
1.1.6 affected 1.1.8 patched
1.2.2 affected 1.2.4 patched
1.3.1 affected 1.3.2 patched
1.2.4, which #2529 reported as wrongly affected, is now patched. Looks good to me from a behaviour point of view.
Author
|
@nikolya-ctrl Thank you for taking the time to test this locally and run through those spot checks, Really appreciate the thorough verification and feedback. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes handling of Elixir pessimistic (
~>) version requirements inelixir_security_importer_v2(resolves #2529).Changes
expand_pessimistic_versioninvulnerabilities/pipelines/v2_importers/elixir_security_importer.pyto expand~> X.Y.Z/~> X.Yconstraints into invertedVersionConstraintbounds forHexVersionRange.ElixirSecurityImporterPipeline.process_fileto useexpand_pessimistic_versionfor~>entries inpatched_versions.test_pessimistic_patched_versions_expandedinvulnerabilities/tests/pipelines/v2_importers/test_elixir_security_importer_v2.py.Verification
pytest vulnerabilities/tests/pipelines/v2_importers/test_elixir_security_importer_v2.py(all tests passing).