Skip to content

SBOM and SCA

Clarive generates the Software Bill of Materials (SBOM) of your applications and runs a Software Composition Analysis (SCA) on it: it lists every third-party component an application ships with and checks each one against a database of known vulnerabilities.

You can do it in four places, the code does not need to be in a Git repository:

  • In a job, with the Generate SBOM and Scan Vulnerabilities op, on the job directory after the checkout or the build: whatever the job put there (a Git or SVN checkout, the artifacts of a release, a .war or a bin folder of DLLs built). The op can fail the job when it finds vulnerabilities of a given severity.
  • In the project, under Source > SBOM: Generate SBOM analyzes the Git and artifact repositories of the project, each Git one at its default branch or at the branch or tag you pick.
  • From a topic: More > Analyze Dependencies (SBOM), on the topics with revisions Clarive can read (see below).
  • From the command line, with cla sbom-scan, on a repository or on any directory of the server.

Topics

The More menu of a topic offers Analyze Dependencies (SBOM) when the topic has revisions Clarive can read and the user has action.sbom.generate in the project they go to, for their repository. The revisions are grouped by repository and each repository gets its report:

Repository What is analyzed
Git The whole tree of the newest commit among the revisions of the topic
Local artifacts The files of the revisions
GenExus The objects of the revisions (an XPZ export each), and the files they generated
Others (SVN, mainframe and the repositories of features and plugins) What the repository gives through the checkouts of the jobs: the files of the revisions, usually; the report says so

Each report goes to the projects of the topic that hold its repository; when none does, to the projects of the repository; and when the repository has none, to the projects of the topic. The reports of a topic do not replace the report of the repository, they are listed apart, with the topic and the revision they come from.

The analysis of a topic, as the Generate SBOM, Scan and Scan All of a project, runs in the background: the dialog shows which repository is being analyzed and the results when it ends.

Supported Technologies

Clarive walks the whole directory tree and reads every manifest, lockfile and binary package it understands. A directory can mix technologies (a Java backend and an Angular frontend in the same repository, for instance): the SBOM holds all of them.

Technology Files read Vulnerabilities
Java Maven pom.xml, *.pom (properties, <parent> and dependencyManagement resolved) Yes
Java Gradle, Android build.gradle, build.gradle.kts, gradle.lockfile, gradle/libs.versions.toml Yes
Java binaries *.jar, *.war, *.ear, including the jars nested in WEB-INF/lib Yes
JavaScript npm, yarn, pnpm package-lock.json, npm-shrinkwrap.json, yarn.lock, pnpm-lock.yaml, package.json Yes
JavaScript Bower bower.json Yes
.NET, NuGet *.csproj, *.vbproj, *.fsproj, Directory.Packages.props, packages.config, packages.lock.json, *.deps.json Yes
.NET binaries *.dll, *.exe (version read from the assembly) Yes
Python requirements*.txt, Pipfile.lock, poetry.lock, uv.lock, pyproject.toml Yes
Go go.mod Yes
PHP Composer composer.lock, composer.json Yes
Ruby Gemfile.lock, Gemfile Yes
Rust Cargo.lock Yes
Dart, Flutter pubspec.lock Yes
iOS CocoaPods Podfile.lock, Podfile No
Perl cpanfile.snapshot, cpanfile No
Docker Dockerfile, Containerfile, docker-compose.yml (base images) No
GenExus GenExus runtime jars (gx*.jar) and XPZ contents of topic revisions No

When a directory has a lockfile and its manifest (package-lock.json and package.json, for instance), the lockfile wins: it holds the exact versions installed, the transitive dependencies included.

The tree scan skips the directories that hold installed copies of dependencies already declared in a manifest: node_modules, bower_components, vendor, Pods, .venv, site-packages, .gradle, .m2 and the version control directories (.git, .svn...). More directories can be excluded in the op.

Binaries

Repositories often hold libraries committed as binaries, with no manifest. Clarive identifies them too:

  • Jars are identified by the META-INF/maven/.../pom.properties they carry, else by their MANIFEST.MF, else by their file name (commons-io-2.6.jar). When the name gives no Maven group, Clarive uses a list of well known libraries; the jars it can't place are listed in the SBOM but not scanned.
  • .NET assemblies are identified by their file name and the version stored in the assembly. The version of an assembly is not always the version of the NuGet package it comes from, so take these findings as a hint to check.

SBOM Format

The SBOMs follow the CycloneDX v1.5 JSON specification. Each component has its Package URL (PURL), its scope (required or optional, for development and test dependencies), whether it is a direct dependency, the file where it was found and, for binaries, its SHA-1 hash.

The CycloneDX document can be downloaded from the SBOM page, written to a file by the job op, and is attached to the job log.

Component Detail

Click a row of the components or the vulnerabilities of a report to see the context of that component:

  • Where the code uses it: the imports of the package found in the source files (import, require, use, using...), by module (the folder of the nearest manifest, or the first two folders when the only manifest is the root one), with some of the lines. The Refs column of the components shows the count. A direct dependency no file imports may be unused, or used only by the build tools or the configuration.
  • Declared in: the manifests or lockfiles that declare it.
  • Brought by: for a transitive dependency, the chains of packages from the direct dependency that brings it, as the npm, yarn and pnpm lockfiles tell (antd → rc-editor-core → immutable).
  • Vulnerabilities: its findings, with the version that fixes each one.
  • A link to the package in the public registry of its ecosystem (npm, PyPI, Maven Central, NuGet, pkg.go.dev, Packagist, RubyGems, crates.io, pub.dev, MetaCPAN, CocoaPods, Docker Hub), not for the private packages.

The imports tell the package, not its version: every version of a package found in the tree shows the same usage. The Java imports are matched to the artifacts by their group and the words of the artifact in the package (org.springframework.jdbc is spring-jdbc); an import that names no artifact of a group of several is not counted. The usage is found when the SBOM is generated: the reports generated before show it after generating them again.

Vulnerability Scanning

The components are checked against OSV.dev, the open vulnerability database that gathers the GitHub, npm, PyPI, Go, RubyGems, NuGet and Maven advisories. The scan:

  • Only queries the components with an exact version: a version range would answer every vulnerability the package ever had.
  • Gets the severity from the CVSS v3 score (CRITICAL from 9.0, HIGH from 7.0, MEDIUM from 4.0, LOW below), or from the severity of the advisory.
  • Gets the version that fixes each vulnerability, when there is one.
  • Keeps the details of each vulnerability for 24 hours, so the next scans only ask OSV.dev for what is new.

The scan runs on the Clarive server, never on the user's workstation: in a job, the job process reads the job directory; from the SBOM page, the web server does it. The source code never leaves the server. OSV.dev only gets the ecosystem, name and version of each component, and the ids of the vulnerabilities found to fetch their details.

The server needs to reach https://api.osv.dev. Through a proxy, set the https_proxy environment variable of the Clarive server. The URL can point to another service that answers the OSV API (/v1/querybatch and /v1/vulns/<id>), a relay in the DMZ for instance.

Local Vulnerability Database

For servers without Internet, or that must not send the names of their packages anywhere, Clarive keeps a copy of the OSV database and checks the components against it: nothing leaves the server. Set it up in Admin > System > SBOM (permission action.sbom.admin):

  1. Pick Local (copy in Clarive) in the vulnerability database combo, and check the ecosystems your applications use. Clarive tests whether the server reaches the OSV downloads (https://storage.googleapis.com/osv-vulnerabilities).
  2. If it does, the Download button gets the full dump of each ecosystem the first time; afterwards the button is Update and fetches only the records changed since the last load. Downloads run in the background, the page shows their progress.
  3. If it does not, the page lists the download link of each ecosystem: download the all.zip files on your workstation and drop them on the page. They are uploaded in parts and loaded in the background. To update, download and upload the newer files again: the records no longer in a file are removed.

The records are kept in a database of their own, named like the Clarive database with -sbom at the end (clarive-sbom for clarive). The full dumps of the nine ecosystems take about 290 MB to download, npm alone 210 MB. The updates can also be scheduled with cla sbom-update.

In local mode, the scans warn in the job log and in the report when an ecosystem of the components is not loaded (those components are not checked), and when the local database was last updated more than 7 days ago (local_max_age_days in the sbom section of the configuration file).

Private Packages

The names of your own libraries (com.example:core-utils, @example/ui) are internal information: list them as private packages and Clarive will never send them to OSV.dev. They are still listed in the SBOM, flagged as private, and the job log tells how many were left out.

Private packages are patterns, case insensitive, where * matches any text and ? one character:

Pattern Matches
com.example.* Maven packages of the groups starting with com.example.
@example/* npm packages of the @example scope
npm:example-* npm packages starting with example-, only npm
Example.* NuGet packages starting with Example.
pkg:pypi/example-* package urls, for the cases the name is not enough

They add up from three levels:

  • Global, for every project: in Admin > System > SBOM, or in the configuration file.
  • Per project: the Private Packages button of the project SBOM page, for users with action.sbom.private_packages in the project.
  • Per job: the Private Packages of the job op.

The configuration file takes the global settings in the sbom section; the admin page overrides them, and the patterns of both add up:

sbom:
  exclude:
    - com.example.*
    - '@example/*'
  mode: remote             # or local
  osv_url: https://api.osv.dev/v1
  local_max_age_days: 7
  osv_timeout: 30          # seconds per request
  osv_cache_hours: 24      # how long the vulnerability details are kept
  osv_max_fetches: 2000    # most vulnerability details fetched in one scan

Vulnerability Triage

Each finding has a status, set from the vulnerability table:

  • Open -- the vulnerability needs attention.
  • Acknowledged -- the team knows about it and accepts the risk.
  • Suppressed -- the vulnerability doesn't apply (a false positive, or not exploitable in this context).

The status sticks: the next SBOM of the same repository or application keeps the findings acknowledged or suppressed. Suppressed findings are left out of the counts, of the CycloneDX document and of the job threshold.

Permissions

The SBOM actions go by project and repository: a role holds the action bound to some repositories (the Repository bound, empty for any), and the role is given to the user in some projects. The report of a repository in a project needs the action in a role of the user in that project, bound to that repository or to any.

Action Allows
action.sbom.read (View SBOMs and Vulnerabilities) The SBOM page of the project, the reports, their components and findings, the CycloneDX download
action.sbom.generate (Generate SBOMs) Generate SBOM of the project and Analyze Dependencies (SBOM) of the topics
action.sbom.scan (Scan SBOMs for Vulnerabilities) Scan and Scan All; the scan after generating needs it too
action.sbom.triage (Change the Status of Vulnerabilities) Open, acknowledge and suppress the findings
action.sbom.delete (Delete SBOM Reports) Delete reports
action.sbom.private_packages (Manage the Private Packages of the Project) Edit the private packages of the project (by project, no repository bound)
action.sbom.admin (Administer SBOM) The Admin > System > SBOM page
  • Generate, scan, triage and delete include read: a user that may scan a repository sees its reports.
  • A repository can be denied in a role that gives the action for any: the role reaches every repository of its projects but that one.
  • The reports of no repository (a directory analyzed by a job or by cla sbom-scan --path) need the action bound to any repository.
  • A topic analysis only analyzes the repositories the user may generate in the projects they go to, and only scans them when the user may scan them all.
  • The job op and the cla sbom-* commands run with no user: whoever writes the rule or runs the command decides.

Events

  • event.sbom.generated fires when an SBOM is stored, with sbom_mid, source_mid, ecosystem and component_count.
  • event.sbom.scan_complete fires when a scan ends, with sbom_mid and vuln_count.

API, CLI and MCP

The sbom namespace of the Clarive API publishes the SBOMs to the REST API (/api/v2), the clarive CLI and the MCP server (as sbom_* tools), with the permissions above: each user and token only reaches the reports of the repositories they may see.

Op What it does Action (action.sbom.*)
sbom.release The SBOM of a release, package by package (see below) read
sbom.list The reports, by project, topic, source, ecosystem or status read
sbom.get A report with a page of its components (by name, only the vulnerable ones) read
sbom.component A component in context: usage, manifests, chains and findings read
sbom.vulnerabilities The findings of a report, or of the current reports of a project, topic or source read
sbom.totals The totals of the current reports read
sbom.cyclonedx The CycloneDX document of a report read
sbom.targets What sbom.analyze would analyze in a topic (or a release and its changesets) generate
sbom.analyze Analyze a topic, or a release and its changesets (changesets), in the background generate
sbom.scan Scan reports again, in the background scan
sbom.task The progress and results of an analysis or scan of the caller read
sbom.set_vuln_status Open, acknowledge or suppress a finding triage

The SBOM of a Release

sbom.release takes a release topic (or any topic) and gathers the current reports of the release and of its changesets (changesets: false for the release alone): the reports of the analyses of each topic. It answers:

  • packages: the vulnerable packages of all those reports (every package with all: true), the most severe first. Each one has:
  • its findings, each with the version that fixes it and its finding in each report (reports, with the vuln_id and status to triage it);
  • upgrade_to, the lowest version that fixes every finding of its vulnerable versions; empty when some finding has no fix (unfixed lists them);
  • upgrades, the same for each vulnerable version. A version not in upgrades is not vulnerable: never lower it;
  • its locations: the report, repository and topic where it was found, its version, whether it is vulnerable, the manifests and lockfiles that declare it (declared_in, relative to the root of the repository) and, for a vulnerable transitive dependency, brought_by, the chains of packages from the direct dependency to update. A scan keeps one finding per package in a report, so the other versions of a vulnerable package in the same report are listed with vulnerable: false: check them too.
  • topics: the release and its changesets, with the branches of each one by repository and their reports.
  • not_analyzed: the repositories of those topics with no report and whose last analysis did not find them empty (last_error when it failed); sbom.analyze analyzes them. An analysis that finds no components stores no report, and the current report of the same source (here, that topic and repository) is superseded.

min_severity leaves out the findings below a severity, and the suppressed findings are left out unless include_suppressed.

That is what an agent needs to fix a release: it reads sbom.release, updates the declared versions (and the lockfiles) in a branch, pushes it, runs sbom.analyze on its topic, follows sbom.task until it is done and reads the topic's findings again to check they are gone:

clarive sbom release 4067 --min-severity HIGH
clarive sbom analyze 4321
clarive sbom task <task id>
clarive sbom vulnerabilities --topic 4321

REST API

The SBOM page uses these endpoints under /sbom/:

Endpoint Description Action (action.sbom.*)
/sbom/generate_project Generate the SBOMs of the repositories of a project (id_project, repos, refs JSON { repo_mid: ref }) generate
/sbom/project_repos Repositories of a project that can be analyzed, with the default branch of the Git ones (id_project) read
/sbom/repo_refs Branches and tags of a Git repository of the project (id_project, repo_mid) read
/sbom/topic_targets Revisions of a topic that can be analyzed, by repository and project (topic_mid) generate
/sbom/analyze_topic Analyze the revisions of a topic, one report per repository (topic_mid) generate
/sbom/list List SBOM reports (id_project, source_mid, ecosystem, status) read
/sbom/view Get an SBOM report with its components (mid) read
/sbom/component A component of a report with its usage in the code, manifests, chains and findings (sbom_mid, id or purl) read
/sbom/download Download the CycloneDX JSON of a report (mid) read
/sbom/scan Scan a report for vulnerabilities (sbom_mid) scan
/sbom/vulnerabilities List findings (sbom_mid, id_project, severity, status) read
/sbom/vuln_status Change the status of a finding (vuln_id, status) triage
/sbom/delete_report Delete a report (mid) delete
/sbom/summary Totals of the current reports (id_project) read
/sbom/settings Private packages of a project, and the global ones (id_project) read
/sbom/save_settings Save the private packages of a project (id_project, exclude) private_packages
/sbom/permissions What the user may do in a project (id_project) read
/sbom/admin_settings, /sbom/admin_save Global settings and the state of the local database admin
/sbom/admin_connectivity Whether the server reaches the OSV downloads or API (mode, osv_url) admin
/sbom/admin_sync Download or update ecosystems of the local database (ecosystems) admin
/sbom/admin_upload Upload a dump in parts (upload_id, index, total, chunk) admin
/sbom/admin_task, /sbom/admin_remove Progress of the downloads and loads; remove an ecosystem admin