Sources/PackageManagerDocs/Documentation.docc/Package/PackageGenerateSBOM.md
Generate a Software Bill of Materials (SBOM).
package generate-sbom [--package-path=<package-path>]
[--cache-path=<cache-path>] [--config-path=<config-path>]
[--security-path=<security-path>]
[--scratch-path=<scratch-path>]
[--swift-sdks-path=<swift-sdks-path>]
[--toolset=<toolset>...]
[--pkg-config-path=<pkg-config-path>...]
[--enable-dependency-cache] [--disable-dependency-cache]
[--enable-build-manifest-caching] [--disable-build-manifest-caching]
[--manifest-cache=<manifest-cache>]
[--enable-experimental-prebuilts] [--disable-experimental-prebuilts]
[--verbose] [--very-verbose|vv] [--quiet] [--color-diagnostics] [--no-color-diagnostics]
[--disable-sandbox]
[--netrc] [--enable-netrc] [--disable-netrc] [--netrc-file=<netrc-file>]
[--enable-keychain] [--disable-keychain]
[--resolver-fingerprint-checking=<resolver-fingerprint-checking>]
[--resolver-signing-entity-checking=<resolver-signing-entity-checking>]
[--enable-signature-validation] [--disable-signature-validation]
[--enable-prefetching] [--disable-prefetching]
[--force-resolved-versions|disable-automatic-resolution|only-use-versions-from-resolved-file]
[--skip-update]
[--disable-scm-to-registry-transformation]
[--use-registry-identity-for-scm]
[--replace-scm-with-registry]
[--default-registry-url=<default-registry-url>]
[--configuration=<configuration>]
[--=<Xcc>...] [--=<Xswiftc>...] [--=<Xlinker>...] [--=<Xcxx>...]
[--triple=<triple>] [--sdk=<sdk>]
[--toolchain=<toolchain>]
[--swift-sdk=<swift-sdk>]
[--sanitize=<sanitize>...]
[--auto-index-store] [--enable-index-store] [--disable-index-store]
[--enable-parseable-module-interfaces]
[--jobs=<jobs>]
[--use-integrated-swift-driver]
[--explicit-target-dependency-import-check=<explicit-target-dependency-import-check>]
[--build-system=<build-system>]
[--=<debug-info-format>]
[--enable-dead-strip] [--disable-dead-strip]
[--disable-local-rpath]
[--traits=<traits>] [--enable-all-traits] [--disable-default-traits]
[--product=<product>]
[--sbom-spec=<sbom-spec>...]
[--sbom-output-dir=<sbom-output-dir>]
[--sbom-filter=<sbom-filter>]
[--sbom-warning-only]
[--version]
Specify the package path to operate on (default current directory). This changes the working directory before any other operation.
Specify the shared cache directory path.
Specify the shared configuration directory path.
Specify the shared security directory path.
Specify a custom scratch directory path. (default .build)
Path to the directory containing installed Swift SDKs.
Specify a toolset JSON file to use when building for the target platform. Use the option multiple times to specify more than one toolset. Toolsets will be merged in the order they're specified into a single final toolset for the current build.
Specify alternative path to search for pkg-config .pc files. Use the option multiple times to
specify more than one path.
Use a shared cache when fetching dependencies.
Do not use a shared cache when fetching dependencies.
term --enable-build-manifest-caching:
term --disable-build-manifest-caching:
term --manifest-cache=<manifest-cache>:
Caching mode of Package.swift manifests. Valid values are: (shared: shared cache, local: package's build directory, none: disabled)
Use prebuilt swift-syntax libraries for macros.
Do not use prebuilt swift-syntax libraries for macros.
Increase verbosity to include informational output.
Increase verbosity to include debug output.
Decrease verbosity to only include error output.
Enables color diagnostics when printing to a TTY. By default, color diagnostics are enabled when connected to a TTY and disabled otherwise.
Disables color diagnostics when printing to a TTY. By default, color diagnostics are enabled when connected to a TTY and disabled otherwise.
Disable using the sandbox when executing subprocesses.
Use netrc file even in cases where other credential stores are preferred.
Load credentials from a netrc file.
Do not load credentials from a netrc file.
Specify the netrc file path.
Search credentials in macOS keychain.
Do not search credentials in macOS keychain.
term --resolver-fingerprint-checking=<resolver-fingerprint-checking>:
term --resolver-signing-entity-checking=<resolver-signing-entity-checking>:
term --enable-signature-validation:
Validate signature of a signed package release downloaded from registry.
Do not validate signature of a signed package release downloaded from registry.
term --enable-prefetching:
term --disable-prefetching:
term --force-resolved-versions|disable-automatic-resolution|only-use-versions-from-resolved-file:
Only use versions from the Package.resolved file and fail resolution if it is out-of-date.
Skip updating dependencies from their remote during a resolution.
Disable source control to registry transformation.
Look up source control dependencies in the registry and use their registry identity when possible to help deduplicate across the two origins.
Look up source control dependencies in the registry and use the registry to retrieve them instead of source control when possible.
Default registry URL to use, instead of the registries.json configuration file.
Build with configuration
Pass flag through to all C compiler invocations.
Pass flag through to all Swift compiler invocations.
Pass flag through to all linker invocations.
Pass flag through to all C++ compiler invocations.
term --triple=<triple>:
term --sdk=<sdk>:
term --toolchain=<toolchain>:
term --swift-sdk=<swift-sdk>:
Filter for selecting a specific Swift SDK to build with.
Turn on runtime checks for erroneous behavior.
Enable or disable indexing-while-building feature.
Enable or disable indexing-while-building feature.
Enable or disable indexing-while-building feature.
term --enable-parseable-module-interfaces:
term --jobs=<jobs>:
The number of jobs to spawn in parallel during the build process.
term --use-integrated-swift-driver:
term --explicit-target-dependency-import-check=<explicit-target-dependency-import-check>:
A flag that indicates this build should check whether targets only import their explicitly-declared dependencies.
Specify the build system to use.
The Debug Information Format to use.
Disable/enable dead code stripping by the linker.
Disable/enable dead code stripping by the linker.
Disable adding $ORIGIN/@loader_path to the rpath by default.
Enables the passed traits of the package. Multiple traits can be specified by providing a comma separated list, for example, --traits Trait1,Trait2. When enabling specific traits the default traits also need to be explictily enabled as well by passing defaults to this command.
Enables all traits of the package.
Disables all default traits of the package.
The product to generate an SBOM for.
Set the SBOM specification(s) and generate SBOM(s).
The absolute or relative directory path to generate the SBOM(s) in. Must be used with --sbom-spec. (default: <build_output>/sboms).
Filter the SBOM components and dependencies by products and/or packages. Must be used with --sbom-spec.
Treat SBOM generation errors as warnings. Must be used with --sbom-spec. (default: false).
Show the version.