fix: correct Spring LDAP group ID in purl generation#4908
Open
jonasboos wants to merge 1 commit into
Open
Conversation
The Spring LDAP artifacts use the group ID org.springframework.ldap (not org.springframework). This caused syft to generate incorrect purls like pkg:maven/spring-ldap-core/spring-ldap-core@3.1.4 instead of the correct pkg:maven/org.springframework.ldap/spring-ldap-core@3.1.4. Add all Spring LDAP artifacts to the DefaultArtifactIDToGroupID map: - spring-ldap - spring-ldap-core - spring-ldap-core-tiger - spring-ldap-ldif-core - spring-ldap-odm - spring-ldap-test Closes anchore#4030 Signed-off-by: Jonas Boos <jonasboos@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes Maven PURL generation for Spring LDAP artifacts by correcting the group ID used when Syft falls back to its known artifactId→groupId mapping.
Changes:
- Corrected the
spring-ldapmapping to use group IDorg.springframework.ldap. - Added missing Spring LDAP artifact IDs (
spring-ldap-core,spring-ldap-core-tiger,spring-ldap-ldif-core,spring-ldap-odm,spring-ldap-test) to map toorg.springframework.ldap.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+385
to
+389
| "spring-ldap-core": "org.springframework.ldap", | ||
| "spring-ldap-core-tiger": "org.springframework.ldap", | ||
| "spring-ldap-ldif-core": "org.springframework.ldap", | ||
| "spring-ldap-odm": "org.springframework.ldap", | ||
| "spring-ldap-test": "org.springframework.ldap", |
Comment on lines
+384
to
+385
| "spring-ldap": "org.springframework.ldap", | ||
| "spring-ldap-core": "org.springframework.ldap", |
Author
|
Hi maintainers! The CI workflows appear to need approval for first-time contributors. Could someone please approve the workflow runs so the tests can execute? Thank you! |
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
The Spring LDAP artifacts use the group ID
org.springframework.ldap(notorg.springframework). This caused syft to generate incorrect purls likepkg:maven/spring-ldap-core/spring-ldap-core@3.1.4instead of the correctpkg:maven/org.springframework.ldap/spring-ldap-core@3.1.4.Fix
spring-ldapentry fromorg.springframeworktoorg.springframework.ldapDefaultArtifactIDToGroupIDmap:spring-ldap-corespring-ldap-core-tigerspring-ldap-ldif-corespring-ldap-odmspring-ldap-testAll map to
org.springframework.ldapper Maven Central: https://central.sonatype.com/namespace/org.springframework.ldapTesting
Test_groupIDFromJavaMetadatatest covers thegroupIDFromKnownPackageListpathCloses #4030