Fix vulnerable Cosmos Spark dependencies - #49998
Open
arnabnandy7 wants to merge 2 commits into
Open
Conversation
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Contributor
|
Thank you for your contribution @arnabnandy7! We will review the pull request and get back to you soon. |
|
Azure Pipelines: Successfully started running 2 pipeline(s). 32 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets dependency-vulnerability remediation for the Cosmos DB Spark 4 connectors by preventing commons-lang:commons-lang:2.6 from being pulled into the shaded connector JARs, and documenting the change in the Spark 4 connector changelogs.
Changes:
- Exclude transitive
commons-lang:commons-langfrom the Spark 4.0 and 4.1 dependency graphs. - Add
org.apache.commons:commons-lang3:3.18.0to the shared Cosmos Spark parent POM. - Document the remediation in both Spark 4 connector changelogs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/cosmos/azure-cosmos-spark_4-1_2-13/pom.xml | Excludes transitive commons-lang:commons-lang from Spark 4.1 dependency graph. |
| sdk/cosmos/azure-cosmos-spark_4-1_2-13/CHANGELOG.md | Adds an “Other Changes” entry describing shaded-JAR dependency remediation. |
| sdk/cosmos/azure-cosmos-spark_4-0_2-13/pom.xml | Excludes transitive commons-lang:commons-lang from Spark 4.0 dependency graph. |
| sdk/cosmos/azure-cosmos-spark_4-0_2-13/CHANGELOG.md | Adds an “Other Changes” entry describing shaded-JAR dependency remediation. |
| sdk/cosmos/azure-cosmos-spark_3/pom.xml | Adds commons-lang3 dependency at the shared parent level. |
Signed-off-by: Arnab Nandy <arnab_nandy7@yahoo.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
sdk/cosmos/azure-cosmos-spark_3/pom.xml:144
commons-lang3is added with<scope>test</scope>, which prevents it from participating in the main (compile/runtime) dependency graph and from being included in the shaded connector JAR (the shade plugin uses non-test scopes). If the intent is to ensure the connector ships with Commons Lang 3 after excludingcommons-lang:commons-lang, this should be a regular (compile) dependency (i.e., remove the scope element).
<version>3.18.0</version> <!-- {x-version-update;org.apache.commons:commons-lang3;external_dependency} -->
<scope>test</scope>
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.
Description
Fixes #49865.
This pull request updates dependencies bundled in the shaded Cosmos DB Spark 4 connector JARs:
commons-lang:commons-lang:2.6dependency from the Spark 4.0 and Spark 4.1 dependency graphs.org.apache.commons:commons-lang3:3.18.0to the shared Cosmos DB Spark parent.4.1.135.Finalthroughazure-core-http-netty:1.16.5.1.23.1throughazure-identity:1.18.4.These changes prevent the vulnerable Commons Lang 2.6 classes from being included in the shaded Spark connector JARs while retaining the supported Commons Lang 3 dependency.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines
Testing was limited to XML validation and
git diff --check. The existing CI dependency validation and packaging checks will verify the resolved dependency graph and shaded JAR contents.