class App

Overview

Main application class for generating CycloneDX SBOMs from Crystal Shard files. Handles command-line argument parsing, file reading, and SBOM generation.

Defined in:

app.cr

Constant Summary

AUTHORS_MIN_VERSION = "1.6"

The structured component.authors array was introduced in 1.6.

COMPONENT_TYPE_APPLICATION = "application"
COMPONENT_TYPE_LIBRARY = "library"
COMPOSITION_INCOMPLETE = "incomplete"

shard.lock cannot express transitive edges, so the dependency graph is always declared incomplete. See build_compositions.

DEFAULT_FORMAT = "json"
DEFAULT_LOCK_FILE = "shard.lock"
DEFAULT_SHARD_FILE = "shard.yml"
DEFAULT_VERSION = "1.6"
PURL_BITBUCKET_PREFIX = "pkg:bitbucket/"
PURL_GITHUB_PREFIX = "pkg:github/"
PURL_GITLAB_PREFIX = "pkg:gitlab/"
REF_TYPE_VCS = "vcs"
REF_TYPE_WEBSITE = "website"
REPRODUCIBLE_SERIAL_NUMBER = "urn:uuid:00000000-0000-0000-0000-000000000000"
REPRODUCIBLE_TIMESTAMP = "1970-01-01T00:00:00Z"

Under --reproducible the two fields that would otherwise change on every run are pinned: the timestamp to the Unix epoch and the serial number to the RFC 4122 nil UUID, which is the conventional "no identity assigned" value.

SCOPE_OPTIONAL = "optional"
SCOPE_REQUIRED = "required"
SUPPORTED_FORMATS = ["json", "xml", "csv"]
SUPPORTED_VERSIONS = CycloneDX::BOM::SUPPORTED_VERSIONS
VERSION = "1.4.0"

Instance Method Summary

Instance Method Detail

def run #

Runs the main application logic.


[View source]