Skip to content

fix: correct Spring LDAP group ID in purl generation#4908

Open
jonasboos wants to merge 1 commit into
anchore:mainfrom
jonasboos:fix-spring-ldap-purl
Open

fix: correct Spring LDAP group ID in purl generation#4908
jonasboos wants to merge 1 commit into
anchore:mainfrom
jonasboos:fix-spring-ldap-purl

Conversation

@jonasboos
Copy link
Copy Markdown

Summary

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.

Fix

  • Corrected the spring-ldap entry from org.springframework to org.springframework.ldap
  • Added missing Spring LDAP artifacts to the DefaultArtifactIDToGroupID map:
    • spring-ldap-core
    • spring-ldap-core-tiger
    • spring-ldap-ldif-core
    • spring-ldap-odm
    • spring-ldap-test

All map to org.springframework.ldap per Maven Central: https://central.sonatype.com/namespace/org.springframework.ldap

Testing

  • Verified the artifact group IDs against Maven Central
  • Existing Test_groupIDFromJavaMetadata test covers the groupIDFromKnownPackageList path

Closes #4030

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>
Copilot AI review requested due to automatic review settings May 10, 2026 19:39
Copy link
Copy Markdown

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

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-ldap mapping to use group ID org.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 to org.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",
@jonasboos
Copy link
Copy Markdown
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wrong purl for spring-ldap-core dependency

2 participants