Record Class ReleaseAttestationMetadata

java.lang.Object
java.lang.Record
org.j7m.middleware.attestation.ReleaseAttestationMetadata
Record Components:
sbomReference - SBOM URI or file reference
sbomFormat - SBOM format, such as SPDX or CycloneDX
artifactDigest - artifact digest
buildProvenanceReference - provenance reference
sourceRevision - source revision
buildTimestamp - build timestamp
signerIdentity - safe signer identity
dependencyPolicyStatus - dependency policy result
vexReference - vulnerability/VEX reference
metadata - additional safe metadata

public record ReleaseAttestationMetadata(String sbomReference, String sbomFormat, String artifactDigest, String buildProvenanceReference, String sourceRevision, Instant buildTimestamp, String signerIdentity, String dependencyPolicyStatus, String vexReference, Map<String,String> metadata) extends Record
Safe supply-chain and release attestation metadata.

The record carries references, digests, and signer identifiers only. It never contains private keys, tokens, or SBOM contents.

  • Constructor Details

    • ReleaseAttestationMetadata

      public ReleaseAttestationMetadata(String sbomReference, String sbomFormat, String artifactDigest, String buildProvenanceReference, String sourceRevision, Instant buildTimestamp, String signerIdentity, String dependencyPolicyStatus, String vexReference, Map<String,String> metadata)
      Creates immutable safe metadata.
  • Method Details

    • unavailable

      public static ReleaseAttestationMetadata unavailable()
      Returns metadata that explicitly reports unavailable SBOM/provenance.
      Returns:
      missing metadata descriptor
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sbomReference

      public String sbomReference()
      Returns the value of the sbomReference record component.
      Returns:
      the value of the sbomReference record component
    • sbomFormat

      public String sbomFormat()
      Returns the value of the sbomFormat record component.
      Returns:
      the value of the sbomFormat record component
    • artifactDigest

      public String artifactDigest()
      Returns the value of the artifactDigest record component.
      Returns:
      the value of the artifactDigest record component
    • buildProvenanceReference

      public String buildProvenanceReference()
      Returns the value of the buildProvenanceReference record component.
      Returns:
      the value of the buildProvenanceReference record component
    • sourceRevision

      public String sourceRevision()
      Returns the value of the sourceRevision record component.
      Returns:
      the value of the sourceRevision record component
    • buildTimestamp

      public Instant buildTimestamp()
      Returns the value of the buildTimestamp record component.
      Returns:
      the value of the buildTimestamp record component
    • signerIdentity

      public String signerIdentity()
      Returns the value of the signerIdentity record component.
      Returns:
      the value of the signerIdentity record component
    • dependencyPolicyStatus

      public String dependencyPolicyStatus()
      Returns the value of the dependencyPolicyStatus record component.
      Returns:
      the value of the dependencyPolicyStatus record component
    • vexReference

      public String vexReference()
      Returns the value of the vexReference record component.
      Returns:
      the value of the vexReference record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component