Skip to content

Conversation

@alzimmermsft
Copy link
Member

Description

Replace single, basic API usage from commons-io to remove dependency on it, removing a CVE warning from our scanning system.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@alzimmermsft alzimmermsft self-assigned this Nov 24, 2025
Copilot AI review requested due to automatic review settings November 24, 2025 20:08
@alzimmermsft alzimmermsft requested review from a team as code owners November 24, 2025 20:08
Copilot finished reviewing on behalf of alzimmermsft November 24, 2025 20:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the commons-io dependency from the Azure Cosmos Spark connector to eliminate CVE warnings. The single usage of IOUtils.toString() has been replaced with a custom implementation that reads from a Reader and converts it to a String.

Key Changes

  • Removed commons-io dependency from pom.xml (both dependency declaration and allowedExternalDependency list)
  • Implemented custom readerToString method to replace IOUtils.toString(Reader)
  • Added internal StringBuilderWriter class to support the custom implementation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sdk/cosmos/azure-cosmos-spark_3/src/main/scala/com/azure/cosmos/spark/ChangeFeedInitialOffsetWriter.scala Replaced IOUtils.toString with custom readerToString implementation and added StringBuilderWriter helper class
sdk/cosmos/azure-cosmos-spark_3/pom.xml Removed commons-io dependency from both dependencies section and allowed external dependencies list

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.

1 participant