Class Provenance

java.lang.Object
org.apache.commons.release.plugin.slsa.v1_2.Provenance

public class Provenance extends Object
Root predicate of an SLSA v1.2 provenance attestation, describing what was built and how.

This predicate combines a BuildDefinition (the inputs) with RunDetails (the execution context). It is intended to be used as the predicate field of an in-toto Statement.

Since:
1.10.0
See Also:
  • Field Details

  • Constructor Details

    • Provenance

      public Provenance()
      Creates a new Provenance instance.
    • Provenance

      public Provenance(BuildDefinition buildDefinition, RunDetails runDetails)
      Creates a new Provenance with the given build definition and run details.
      Parameters:
      buildDefinition - inputs that defined the build.
      runDetails - details about the build invocation.
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getBuildDefinition

      Gets the build definition describing all inputs that produced the build output.

      Includes source code, dependencies, build tools, base images, and other materials.

      Returns:
      The build definition, or null if not set.
    • getRunDetails

      Gets the details about the invocation of the build tool and the environment in which it was run.
      Returns:
      The run details, or null if not set.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setBuildDefinition

      public Provenance setBuildDefinition(BuildDefinition buildDefinition)
      Sets the build definition describing all inputs that produced the build output.
      Parameters:
      buildDefinition - The build definition.
      Returns:
      this for chaining.
    • setRunDetails

      public Provenance setRunDetails(RunDetails runDetails)
      Sets the details about the invocation of the build tool and the environment in which it was run.
      Parameters:
      runDetails - The run details.
      Returns:
      this for chaining.
    • toString

      public String toString()
      Overrides:
      toString in class Object