attestation
π€ AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
flavor.psp.format_2025.attestation
¶
Attestation slot assembly: combines SBOM + provenance and computes the slot digest.
Functions¶
build_attestation
¶
build_attestation(
package_info: dict[str, Any],
*,
signing_key_fingerprint: str | None = None,
sbom_enabled: bool = True,
) -> tuple[bytes, str]
Build the attestation slot content and compute its SHA-256 digest.
package_info is passed to :func:build_sbom as-is. The provenance
record is assembled from the individual fields extracted from
package_info so that callers only need to supply a single dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package_info
|
dict[str, Any]
|
Dict with keys understood by :func: |
required |
signing_key_fingerprint
|
str | None
|
Hex fingerprint of the Ed25519 signing key,
or |
None
|
sbom_enabled
|
bool
|
When False the |
True
|
Returns:
| Type | Description |
|---|---|
bytes
|
A 2-tuple of: |
str
|
|
tuple[bytes, str]
|
|
Source code in flavor/psp/format_2025/attestation.py
parse_attestation
¶
Parse attestation slot content bytes into a dict.