From ceafe29d8d5d4cea23623f684c167b938a7528ac Mon Sep 17 00:00:00 2001 From: Olga Lavtar Date: Tue, 2 Apr 2024 16:17:26 -0700 Subject: [PATCH] feat: added support for gradle and exhortignore Signed-off-by: Olga Lavtar --- .../expected_component_sbom.json | 105 ++++++++---------- .../expected_component_sbom.json | 92 +++++++-------- 2 files changed, 92 insertions(+), 105 deletions(-) diff --git a/src/test/resources/tst_manifests/gradle/deps_with_ignore_notations/expected_component_sbom.json b/src/test/resources/tst_manifests/gradle/deps_with_ignore_notations/expected_component_sbom.json index 2f24a725..8e846e7f 100644 --- a/src/test/resources/tst_manifests/gradle/deps_with_ignore_notations/expected_component_sbom.json +++ b/src/test/resources/tst_manifests/gradle/deps_with_ignore_notations/expected_component_sbom.json @@ -3,7 +3,7 @@ "specVersion" : "1.4", "version" : 1, "metadata" : { - "timestamp" : "2024-04-02T17:14:47Z", + "timestamp" : "2024-04-02T23:13:52Z", "component" : { "group" : "org.acme.dbaas", "name" : "postgresql-orm-quarkus", @@ -25,138 +25,125 @@ { "group" : "io.quarkus", "name" : "quarkus-hibernate-orm", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-agroal", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-resteasy", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-resteasy-jackson", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-jdbc-postgresql", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-kubernetes-service-binding", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-container-image-docker", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final" }, { "group" : "jakarta.validation", "name" : "jakarta.validation-api", - "version" : "2.0.2 (n)", - "purl" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29", + "version" : "2.0.2", + "purl" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2", "type" : "library", - "bom-ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29" + "bom-ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2" }, { "group" : "io.quarkus", "name" : "quarkus-vertx-http", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29" - }, - { - "group" : "log4j", - "name" : "log4j", - "version" : "1.2.17 (n)", - "purl" : "pkg:maven/log4j/log4j@1.2.17%20%28n%29", - "type" : "library", - "bom-ref" : "pkg:maven/log4j/log4j@1.2.17%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final" } ], "dependencies" : [ { "ref" : "pkg:maven/org.acme.dbaas/postgresql-orm-quarkus@1.0.0-SNAPSHOT", "dependsOn" : [ - "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29", - "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29", - "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29", - "pkg:maven/log4j/log4j@1.2.17%20%28n%29" + "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final", + "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2", + "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final" ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29", - "dependsOn" : [ ] - }, - { - "ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/log4j/log4j@1.2.17%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final", "dependsOn" : [ ] } ] diff --git a/src/test/resources/tst_manifests/gradle/deps_with_no_ignore_common_paths/expected_component_sbom.json b/src/test/resources/tst_manifests/gradle/deps_with_no_ignore_common_paths/expected_component_sbom.json index 31cb44e3..72575d57 100644 --- a/src/test/resources/tst_manifests/gradle/deps_with_no_ignore_common_paths/expected_component_sbom.json +++ b/src/test/resources/tst_manifests/gradle/deps_with_no_ignore_common_paths/expected_component_sbom.json @@ -3,7 +3,7 @@ "specVersion" : "1.4", "version" : 1, "metadata" : { - "timestamp" : "2024-03-25T17:41:54Z", + "timestamp" : "2024-04-02T23:16:00Z", "component" : { "group" : "org.acme.dbaas", "name" : "postgresql-orm-quarkus", @@ -25,125 +25,125 @@ { "group" : "io.quarkus", "name" : "quarkus-hibernate-orm", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-agroal", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-resteasy", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-resteasy-jackson", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-jdbc-postgresql", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-kubernetes-service-binding", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final" }, { "group" : "io.quarkus", "name" : "quarkus-container-image-docker", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final" }, { "group" : "jakarta.validation", "name" : "jakarta.validation-api", - "version" : "2.0.2 (n)", - "purl" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29", + "version" : "2.0.2", + "purl" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2", "type" : "library", - "bom-ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29" + "bom-ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2" }, { "group" : "io.quarkus", "name" : "quarkus-vertx-http", - "version" : "2.13.5.Final (n)", - "purl" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29", + "version" : "2.13.5.Final", + "purl" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final", "type" : "library", - "bom-ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29" + "bom-ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final" } ], "dependencies" : [ { "ref" : "pkg:maven/org.acme.dbaas/postgresql-orm-quarkus@1.0.0-SNAPSHOT", "dependsOn" : [ - "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29", - "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29", - "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29", - "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29" + "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final", + "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final", + "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2", + "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final" ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-hibernate-orm@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-agroal@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-resteasy@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-resteasy-jackson@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-jdbc-postgresql@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-kubernetes-service-binding@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-container-image-docker@2.13.5.Final", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2%20%28n%29", + "ref" : "pkg:maven/jakarta.validation/jakarta.validation-api@2.0.2", "dependsOn" : [ ] }, { - "ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final%20%28n%29", + "ref" : "pkg:maven/io.quarkus/quarkus-vertx-http@2.13.5.Final", "dependsOn" : [ ] } ]