-
-
Notifications
You must be signed in to change notification settings - Fork 662
Improve Composer meta analyzer's ability to deal with minified metadata #5019
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: McFY49 <g.matthieu49@gmail.com>
Some Composer repositories (e.g., Satis) do not include the "minified" key in their packages.json, even though they return packages in minified format (arrays instead of versioned objects). This commit enhances the isMinified() method to heuristically detect minified metadata by inspecting the structure of the packages object. This improves compatibility with such repositories and avoids JSON parsing issues during metadata analysis. Signed-off-by: ch8matt <g.matthieu49@gmail.com>
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
@valentijnscholten Can you confirm this is okay :) ? |
Looking at the source code of And the Summarizing I don't know why we need this PR but it does solve the problem and would be safe to merge. |
@nscuro Hello, could you tell me what you think about this PR ? Would love to have the feature fixed in the future version of Dependency-Track :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ch8matt! I wasn't sure if you were more clarification from others but the PR looks good to me.
Description
Some Composer repositories (e.g., Satis) do not include the "minified" key in their packages.json,
even though they return packages in minified format (arrays instead of versioned objects).
This commit enhances the isMinified() method to heuristically detect minified metadata by inspecting
the structure of the packages object. This improves compatibility with such repositories and avoids
JSON parsing issues during metadata analysis.
Addressed Issue
Additional Details
Checklist