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

fix: gradle lockfile parser groupId handling #1995

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

kzantow
Copy link
Contributor

@kzantow kzantow commented Aug 3, 2023

This PR corrects an issue where the Gradle lockfile parser was neither taking into account the groupId nor creating a JavaMetadata object, despite indicating the MetadataType was java metadata. This resulted in, among other things, CPEs being generated incorrectly for the entries in the lockfile.

Fixes: #1957

@kzantow kzantow requested a review from a team August 3, 2023 22:45
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Benchmark Test Results

Benchmark results from the latest changes vs base branch
goos: linux%0Agoarch: amd64%0Apkg: github.com/anchore/syft/test/integration%0Acpu: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz%0A                                                              │ ./.tmp/benchmark-707b71f.txt │%0A                                                              │            sec/op            │%0AImagePackageCatalogers/alpmdb-cataloger-2                                        12.18m ± 2%25%0AImagePackageCatalogers/apkdb-cataloger-2                                         712.9µ ± 4%25%0AImagePackageCatalogers/binary-cataloger-2                                        205.6µ ± 1%25%0AImagePackageCatalogers/dpkgdb-cataloger-2                                        623.8µ ± 3%25%0AImagePackageCatalogers/dotnet-portable-executable-cataloger-2                    22.85µ ± 4%25%0AImagePackageCatalogers/go-module-binary-cataloger-2                              97.70µ ± 9%25%0AImagePackageCatalogers/java-cataloger-2                                          13.67m ± 1%25%0AImagePackageCatalogers/graalvm-native-image-cataloger-2                          97.65µ ± 3%25%0AImagePackageCatalogers/javascript-package-cataloger-2                            403.5µ ± 3%25%0AImagePackageCatalogers/nix-store-cataloger-2                                     286.4µ ± 3%25%0AImagePackageCatalogers/php-composer-installed-cataloger-2                        823.4µ ± 1%25%0AImagePackageCatalogers/portage-cataloger-2                                       495.5µ ± 2%25%0AImagePackageCatalogers/python-package-cataloger-2                                3.443m ± 1%25%0AImagePackageCatalogers/r-package-cataloger-2                                     216.6µ ± 3%25%0AImagePackageCatalogers/rpm-db-cataloger-2                                        569.7µ ± 1%25%0AImagePackageCatalogers/ruby-gemspec-cataloger-2                                  950.5µ ± 1%25%0AImagePackageCatalogers/sbom-cataloger-2                                          122.8µ ± 1%25%0Ageomean                                                                          500.5µ%0A%0A                                                              │ ./.tmp/benchmark-707b71f.txt │%0A                                                              │             B/op             │%0AImagePackageCatalogers/alpmdb-cataloger-2                                       5.122Mi ± 0%25%0AImagePackageCatalogers/apkdb-cataloger-2                                        204.7Ki ± 0%25%0AImagePackageCatalogers/binary-cataloger-2                                       30.49Ki ± 0%25%0AImagePackageCatalogers/dpkgdb-cataloger-2                                       172.5Ki ± 0%25%0AImagePackageCatalogers/dotnet-portable-executable-cataloger-2                   3.696Ki ± 0%25%0AImagePackageCatalogers/go-module-binary-cataloger-2                             9.906Ki ± 0%25%0AImagePackageCatalogers/java-cataloger-2                                         2.841Mi ± 0%25%0AImagePackageCatalogers/graalvm-native-image-cataloger-2                         8.594Ki ± 0%25%0AImagePackageCatalogers/javascript-package-cataloger-2                           94.21Ki ± 0%25%0AImagePackageCatalogers/nix-store-cataloger-2                                    49.14Ki ± 0%25%0AImagePackageCatalogers/php-composer-installed-cataloger-2                       186.6Ki ± 0%25%0AImagePackageCatalogers/portage-cataloger-2                                      119.9Ki ± 0%25%0AImagePackageCatalogers/python-package-cataloger-2                               1.003Mi ± 0%25%0AImagePackageCatalogers/r-package-cataloger-2                                    53.29Ki ± 0%25%0AImagePackageCatalogers/rpm-db-cataloger-2                                       180.9Ki ± 0%25%0AImagePackageCatalogers/ruby-gemspec-cataloger-2                                 144.0Ki ± 0%25%0AImagePackageCatalogers/sbom-cataloger-2                                         14.20Ki ± 0%25%0Ageomean                                                                         100.5Ki%0A%0A                                                              │ ./.tmp/benchmark-707b71f.txt │%0A                                                              │          allocs/op           │%0AImagePackageCatalogers/alpmdb-cataloger-2                                        87.74k ± 0%25%0AImagePackageCatalogers/apkdb-cataloger-2                                         4.181k ± 0%25%0AImagePackageCatalogers/binary-cataloger-2                                         848.0 ± 0%25%0AImagePackageCatalogers/dpkgdb-cataloger-2                                        3.141k ± 0%25%0AImagePackageCatalogers/dotnet-portable-executable-cataloger-2                     132.0 ± 0%25%0AImagePackageCatalogers/go-module-binary-cataloger-2                               281.0 ± 0%25%0AImagePackageCatalogers/java-cataloger-2                                          40.19k ± 0%25%0AImagePackageCatalogers/graalvm-native-image-cataloger-2                           228.0 ± 0%25%0AImagePackageCatalogers/javascript-package-cataloger-2                            1.342k ± 0%25%0AImagePackageCatalogers/nix-store-cataloger-2                                      895.0 ± 0%25%0AImagePackageCatalogers/php-composer-installed-cataloger-2                        4.079k ± 0%25%0AImagePackageCatalogers/portage-cataloger-2                                       2.268k ± 0%25%0AImagePackageCatalogers/python-package-cataloger-2                                16.44k ± 0%25%0AImagePackageCatalogers/r-package-cataloger-2                                      929.0 ± 0%25%0AImagePackageCatalogers/rpm-db-cataloger-2                                        3.989k ± 0%25%0AImagePackageCatalogers/ruby-gemspec-cataloger-2                                  2.447k ± 0%25%0AImagePackageCatalogers/sbom-cataloger-2                                           394.0 ± 0%25%0Ageomean                                                                          2.060k

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different CPEs between java-cataloger and java-gradle-lockfile-cataloger
2 participants