Add vulnerable dependency with multiple paths in dependency graph #5
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.
Overview
This PR adds a package with known security vulnerabilities (
commons-collections:3.2.1) that appears in multiple paths within the dependency graph. This enhancement demonstrates how dependency scanning tools like GitHub Dependabot and CodeQL detect vulnerabilities across complex dependency chains.What Changed
Added the following Maven dependencies to
pom.xml:commons-collections:3.2.1- Direct dependency with known CVE-2015-7501 deserialization vulnerabilitycommons-beanutils:1.9.2- Transitively depends oncommons-collections:3.2.1commons-digester:2.1- Depends oncommons-beanutils:1.8.3, creating another path tocommons-collectionscommons-configuration:1.10- Additional dependency for graph complexityMultiple Dependency Paths
The vulnerable package now appears in three distinct paths:
Verification
Run the following command to see the multiple paths:
Expected output shows
commons-collections:3.2.1appearing multiple times with annotations like "omitted for duplicate", confirming it's pulled through different dependency chains.Documentation
Why This Matters
In real-world scenarios, vulnerable dependencies often appear through multiple transitive paths, making them:
This repository now provides a realistic example for testing and demonstrating dependency scanning capabilities.
Testing
mvn clean compile)Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.