apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.18k stars 10.21k forks source link

Bump com.thoughtworks.xstream:xstream from 1.4.20 to 1.4.21 to fix CVE-2024-47072 #5280

Closed nisiyong closed 5 days ago

nisiyong commented 6 days ago

What's the purpose of this PR

fix CVE-2024-47072

Follow this checklist to help us incorporate your contribution quickly and easily:

Summary by CodeRabbit

coderabbitai[bot] commented 6 days ago

Walkthrough

The changes in this pull request primarily involve updates to the Apollo version 2.4.0, including new features, fixes, and dependency updates. Key modifications include enhancements to server configuration, the introduction of a REST template client connection pool, and global search capabilities. Fixes address issues with configuration management and namespace links, while new limits and caching functions have been added. The RefreshAdminServerAddressTask has been improved for dynamic configuration, and the xstream library has been updated for security reasons.

Changes

File Change Summary
CHANGES.md Updated for Apollo version 2.4.0 with new features, fixes, and enhancements, including global search, namespace limits, and caching statistics.
pom.xml Updated xstream dependency version from 1.4.20 to 1.4.21 to address CVE-2024-47072.

Possibly related PRs

Suggested labels

size:S, lgtm

🐇 In the fields where rabbits play,
New features hop in, brightening the day.
With limits and fixes, we leap with glee,
A safer, smarter Apollo, oh what a spree!
Let's gather the carrots, the code is now fine,
Hopping along, our future will shine! 🌟


📜 Recent review details **Configuration used: CodeRabbit UI** **Review profile: CHILL**
📥 Commits Reviewing files that changed from the base of the PR and between a90fb6ba3ee0d7c02602adbbfbcd57d4fe5e13ec and 0f21455bd27cfb0044bcf3e3c2ec287ea9b430f0.
📒 Files selected for processing (2) * `CHANGES.md` (1 hunks) * `pom.xml` (1 hunks)
🔇 Additional comments (2)
CHANGES.md (1) `23-23`: **LGTM! The changelog entry accurately documents the security update.** The entry follows the established format and clearly indicates the version bump and the CVE being addressed. Let's verify if there are any other files that might reference the xstream version:
✅ Verification successful **✅ Version bump to xstream 1.4.21 is correctly implemented** The verification confirms that: - The xstream dependency in pom.xml is already updated to version 1.4.21 - No other instances of version 1.4.20 exist in the codebase except in the changelog entry - The dependency update is properly documented with a comment "to fix CVE-2024-47072"
🏁 Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Search for any other files that might reference the old xstream version # to ensure complete version bump coverage. # Search for xstream version references in pom.xml files echo "Checking pom.xml files for xstream version references:" rg -l "xstream" -g "pom.xml" # Search for any direct references to version 1.4.20 echo -e "\nChecking for specific references to the old version 1.4.20:" rg "1\.4\.20" # Search for any Maven dependency declarations of xstream echo -e "\nChecking for xstream dependency declarations:" ast-grep --pattern 'dependency { $$$ groupId { $$ } artifactId { "xstream" } $$$ }' ``` Length of output: 632 --- Script: ```shell #!/bin/bash # Let's check the content of pom.xml to see the current xstream version echo "Checking xstream dependency in pom.xml:" rg -A 5 -B 5 "xstream" pom.xml # Also check for any properties defining xstream version echo -e "\nChecking for xstream version property:" rg "xstream.*version" pom.xml ``` Length of output: 607
pom.xml (1) `203-208`: **Security fix looks good, let's verify the version.** The update to XStream 1.4.21 to address CVE-2024-47072 is appropriate. Let's verify if this is the latest secure version and check for any breaking changes:
✅ Verification successful **XStream 1.4.21 is the latest version and properly addresses CVE-2024-47072** The verification confirms: - 1.4.21 is currently the latest version available on Maven Central - This version specifically patches CVE-2024-47072 (DoS via stack overflow) - No known high or critical vulnerabilities exist in version 1.4.21 - No breaking changes were found between 1.4.20 and 1.4.21 in the project documentation
🏁 Scripts executed The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify XStream version and check for known vulnerabilities # Check latest version from Maven Central echo "Latest version from Maven Central:" curl -s "https://search.maven.org/solrsearch/select?q=g:com.thoughtworks.xstream+AND+a:xstream&rows=1&wt=json" | jq -r '.response.docs[0].latestVersion' # Check for any known vulnerabilities in version 1.4.21 echo -e "\nChecking for known vulnerabilities in 1.4.21:" gh api graphql -f query=' { securityVulnerabilities(first: 5, ecosystem: MAVEN, package: "com.thoughtworks.xstream:xstream", severities: [CRITICAL, HIGH]) { nodes { advisory { summary severity publishedAt } vulnerableVersionRange firstPatchedVersion { identifier } } } }' # Check for any breaking changes between 1.4.20 and 1.4.21 echo -e "\nSearching for potential breaking changes:" rg -i "breaking.*changes|migration|upgrade" --type md ``` Length of output: 4138

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.