object

# `sbom`

This tool generates a Software Bill of Materials (SBOM) for an application.

Availability:
`logtalk_load(sbom(loader))`
Author: Paulo Moura
Version: 1:1:0
Date: 2026-06-15
Compilation flags:
`static, context_switching_calls`
Imports:
`public` options
Uses:
json
json_schema
list
os
packs
term_io
url(Representation)
user
uuid
Remarks:
(none)
Inherited public predicates:
check_option/1 check_options/1 default_option/1 default_options/1 option/2 option/3 valid_option/1 valid_options/1

## Public predicates

### `document/2`

Returns an SPDX 2.3 or a CycloneDX 1.6 JSON term describing the currently loaded application using the given options. The JSON term represents objects using curly terms, pairs using a dash, and strings using atoms.

Compilation flags:
`static`
Template:
`document(Document,Options)`
Mode and number of proofs:
`document(-compound,+list(compound))` - `one`

### `document/1`

Returns an SPDX 2.3 JSON term describing the currently loaded application using default options. The JSON term represents objects using curly terms, pairs using a dash, and strings using atoms.

Compilation flags:
`static`
Template:
`document(Document)`
Mode and number of proofs:
`document(-compound)` - `one`

### `export/2`

Exports an SPDX 2.3 or a CycloneDX 1.6 JSON document describing the currently loaded application to the specified sink using the given options. Valid sinks are `codes(List)`, `stream(Stream)`, `file(Path)`, `chars(List)`, and `atom(Atom)`.

Compilation flags:
`static`
Template:
`export(Sink,Options)`
Mode and number of proofs:
`export(++compound,+list(compound))` - `one`

### `export/1`

Exports an SPDX 2.3 JSON document describing the currently loaded application to the specified sink using default options. Valid sinks are `codes(List)`, `stream(Stream)`, `file(Path)`, `chars(List)`, and `atom(Atom)`.

Compilation flags:
`static`
Template:
`export(Sink)`
Mode and number of proofs:
`export(++compound)` - `one`

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

### `spdx_license_schema_/1`

Caches the parsed schema used to validate SPDX license identifiers for CycloneDX exports.

Compilation flags:
`dynamic`
Template:
`spdx_license_schema_(Schema)`
Mode and number of proofs:
`spdx_license_schema_(-term)` - `zero_or_one`

## Operators

(none)