pub struct AttestationConfig {
pub enabled: bool,
pub mode: Option<AttestationMode>,
pub artifacts: Option<Vec<AttestationArtifactKind>>,
pub skip: Option<StringOrBool>,
}Expand description
SLSA build-provenance / attestation configuration for binaries and archives.
Two modes select how anodizer participates in attestation:
AttestationMode::Subjects(the default) emits a subjects manifest (dist/attestation-subjects.json) thatanodizer-actionfeeds to GitHub’sactions/attest-build-provenance. anodizer does NOT mint a GitHub-trusted attestation itself in this mode — the Action’s OIDC identity does. This is the path fd / biome / gping use.AttestationMode::Emitgenerates a self-contained in-toto v1 statement carrying an SLSA provenance v1 predicate over the selected artifacts, writes it as a release asset (attestation.intoto.jsonl), and lets the existingsigns:stage sign it (keyed, not OIDC). This is for users who can’t run the Action (the--with-provenancetoggle).
YAML:
attestations:
enabled: true
mode: subjects # or: emit ; default = subjects
artifacts: [archive, binary, checksum]Fields§
§enabled: boolEnable attestation. When false (the default), the stage is a no-op.
mode: Option<AttestationMode>Participation mode: subjects (default) writes a manifest for
actions/attest-build-provenance; emit generates and signs an
in-toto SLSA provenance statement as a release asset.
artifacts: Option<Vec<AttestationArtifactKind>>Which produced-artifact kinds to attest. Each entry selects a KIND
(archive, binary, checksum); the concrete subject set (filenames
- sha256) is DERIVED from the artifacts anodizer already produced.
Defaults to [archive, binary, checksum] when omitted.
skip: Option<StringOrBool>Skip the attestation stage. Accepts a bool or a template string.
Implementations§
Source§impl AttestationConfig
impl AttestationConfig
Sourcepub const SUBJECTS_MANIFEST_NAME: &'static str = "attestation-subjects.json"
pub const SUBJECTS_MANIFEST_NAME: &'static str = "attestation-subjects.json"
Filename of the subjects manifest written in subjects mode (single
crate / lockstep). Per-crate workspace mode prefixes the crate name.
Sourcepub const STATEMENT_NAME: &'static str = "attestation.intoto.jsonl"
pub const STATEMENT_NAME: &'static str = "attestation.intoto.jsonl"
Filename of the in-toto statement written in emit mode (single crate
/ lockstep). Per-crate workspace mode prefixes the crate name.
Sourcepub fn resolved_mode(&self) -> AttestationMode
pub fn resolved_mode(&self) -> AttestationMode
Resolve the participation mode, defaulting to subjects.
Sourcepub fn resolved_artifacts(&self) -> Option<Vec<AttestationArtifactKind>>
pub fn resolved_artifacts(&self) -> Option<Vec<AttestationArtifactKind>>
The configured artifact-kind selection, or None when artifacts: is
omitted.
None is NOT a hand-curated subset — the stage interprets it as “attest
every release-uploadable artifact” (the full release_uploadable_kinds()
set minus signatures/certificates and the attestation outputs
themselves), so a .deb/.rpm/SBOM/installer the user ships is attested
by default rather than silently dropped.
Trait Implementations§
Source§impl Clone for AttestationConfig
impl Clone for AttestationConfig
Source§fn clone(&self) -> AttestationConfig
fn clone(&self) -> AttestationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AttestationConfig
impl Debug for AttestationConfig
Source§impl Default for AttestationConfig
impl Default for AttestationConfig
Source§fn default() -> AttestationConfig
fn default() -> AttestationConfig
Source§impl<'de> Deserialize<'de> for AttestationConfigwhere
AttestationConfig: Default,
impl<'de> Deserialize<'de> for AttestationConfigwhere
AttestationConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AttestationConfig
impl JsonSchema for AttestationConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more