Skip to content
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

feat: support parsing pom.xml / maven / java #81

Merged
merged 5 commits into from
May 9, 2022
Merged

feat: support parsing pom.xml / maven / java #81

merged 5 commits into from
May 9, 2022

Conversation

G-Rath
Copy link
Owner

@G-Rath G-Rath commented Apr 9, 2022

While I've done a bit of Java (mainly from my uni days), I've never done a lot with the ecosystem so didn't know much about how dependencies were actually managed other than them coming from Maven, and so I didn't really realise that Java / Maven doesn't actually have a lockfile.

This results in the all the standard caveats of not having a lockfile: there's no way of knowing the actual exact versions of libraries being used, so it's not possible to give a completely accurate report on what known vulnerabilities impact a project.

This doesn't mean this parser is useless, just that it's going to be the worst for "casual use" (e.g. "just scan my project") as for best results developers are going to have to craft a detailed pom.xml that specifies all their dependencies in as exact versions as possible.

I imagine it would be somewhat straightforward to write a script that builds this based on the output of mvn dependency:tree, and users of plugins like https://github.com/vandmo/dependency-lock-maven-plugin should be fine so long as they're using the pom.xml output format.

Having this parser also means the ecosystem is known now, so the detector will be able to support it once #13 is landed.

Resolves #33

@G-Rath G-Rath force-pushed the support-maven branch 2 times, most recently from 186e364 to e8d3f5e Compare April 10, 2022 00:51
@G-Rath G-Rath force-pushed the support-maven branch 2 times, most recently from a786486 to 3c7fdb4 Compare May 2, 2022 19:42
@G-Rath G-Rath marked this pull request as ready for review May 6, 2022 02:25
@G-Rath G-Rath merged commit 098a69f into main May 9, 2022
@G-Rath G-Rath deleted the support-maven branch May 9, 2022 18:32
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.

Support parsing pom.xml / maven / java
1 participant