Vulnerability reference ΒΆ

Known limitations and alternatives ΒΆ

Due to Trivy, you'll receive a simplified dependency graph, as Trivy doesn't support Gradle or Maven's dependency resolution.

Dependency-track integrates with Trivy at runtime, ensuring that vulnerabilities from the Docker container are still detected.

Trivy directly parses the .jar files without access to full dependency resolution details.

Gradle and Maven plugins provide a deeper graph of nested transitive dependencies.

Gradle Plugin ΒΆ

Gradle Plugin

Add the following plugin to your build.gradle* file.

groovy

In your workflow you can generate a SBOM with the following gradle task command:

yaml

The SBOM will be default located at build/reports/bom.json. Pass the SBOM to the nais/docker-build-push action with the following input:

yaml
1
GitHub actions should be pinned to a SHA for better security. Read more in GitHub Secure use reference.

For nais/attest-sign action:

yaml

For more info about settings check out the CycloneDx Gradle Plugin

Maven Plugin ΒΆ

Maven Plugin

Add the following to your pom.xml file.

xml

In your workflow you can generate a SBOM with the following maven command:

yaml

The SBOM will be default located at target/bom.json. Pass the SBOM to the nais/docker-build-push action with the following input:

yaml
1
GitHub actions should be pinned to a SHA for better security. Read more in GitHub Secure use reference.

For nais/attest-sign action:

yaml

For more info about settings check out the CycloneDx Maven Plugin