Ecosystem Guides

For each language, what to prepare for the Lifecycle scan, and the Tier 1 job that prepares it.

What these guides are

Under the Pull Request CI & Secrets standard, a Tier 1 job (no secrets) prepares a scan input, and a separate Tier 2 job (with secrets) hands it to Sonatype Lifecycle. Which files Lifecycle can accurately evaluate depends on the language. These guides record, for each one:

  • What Lifecycle reads, and so what the scan input must contain.
  • A prepare-scan-input job to paste into your ci.yaml (see Reference Workflows).
  • What accuracy you give up compared with scanning a full build, so that nobody is surprised.

The Tier 2 workflow is the same for every language. Only the preparation differs.

Two kinds of ecosystem

KindExamplesWhat the scan input isAccuracy
ManifestGo, Rust, PHP, Ruby, Python, .NET, RA lockfile or a dependency list, produced by the language’s own toolingGood, if the lockfile or list pins exact versions. Transitive dependencies depend on what the file contains.
BinaryJava, npm with node_modules, DockerThe built artifact, or the installed dependenciesBest. Lifecycle fingerprints the files themselves, which also finds modified or repackaged dependencies.

Binary inputs are large. Allow for that in the artifact limits (see Reference Workflows).

The guides

EcosystemUsed byGuide
GoNancy, Cheque, Terraform providers, API clientsGo
Java (Maven, Gradle)Sherlock Trunks, Nexus CasC Plugin, API clientsJava
JavaScript (npm, Yarn)AuditJS, API clientsJavaScript
PythonJake, API clientsPython
.NET (NuGet)No current Project.NET
Rust (Cargo)Cargo PantsRust
Ruby (Bundler)ChelseaRuby
PHP (Composer)BachPHP
R (CRAN)OysterRR
C/C++ (Conan)No current ProjectC/C++
Docker imagesContainer image ProjectsDocker

Terraform providers are written in Go, so their Lifecycle scan is the Go guide.

Not yet covered: Dart and Flutter, Swift, Objective-C, Conda, RPM, and Hugging Face. Sonatype supports these. If your Project needs one of them, or uses a tool or ecosystem not listed at all, see Your tool or ecosystem is not covered.

Adding a guide

Each guide follows the same shape so they can be compared: what Lifecycle reads, the prepare-scan-input job, what you give up, and a link to the Sonatype page it came from. Quote Sonatype’s documentation, and say “not documented” where it is silent.


.NET

Preparing the Lifecycle scan input for NuGet projects.

C/C++

Preparing the Lifecycle scan input for Conan-based C and C++ projects.

Docker

Preparing the Lifecycle scan input for container images.

Go

Preparing the Lifecycle scan input for Go modules, including Terraform providers.

Java

Preparing the Lifecycle scan input for Maven and Gradle projects.

JavaScript

Preparing the Lifecycle scan input for npm and Yarn projects.

PHP

Preparing the Lifecycle scan input for Composer projects.

Python

Preparing the Lifecycle scan input for Python projects using pip or Poetry.

R

Preparing the Lifecycle scan input for R (CRAN) packages.

Ruby

Preparing the Lifecycle scan input for Bundler projects.

Rust

Preparing the Lifecycle scan input for Cargo projects.