Documentation ¶
Index ¶
- Constants
- Variables
- func Exists(environment map[string]any, field string) bool
- func GetAsString(environment map[string]any, field string) (string, error)
- func GetBranch(environment map[string]any, upperEnv bool) (string, error)
- func GetEventPayload(environment map[string]any, upperEnv bool) (map[string]any, error)
- func GetTag(environment map[string]any, upperEnv bool) (string, error)
- func GetWorkflowInputs(environment map[string]any, upperEnv bool) (map[string]any, error)
Constants ¶
View Source
const ( // ProvenanceV02Type is the SLSA v0.2 predicate type. ProvenanceV02Type = "https://slsa.dev/provenance/v0.2" // ProvenanceV1Type is the SLSA v1.0 predicate type. ProvenanceV1Type = slsa1.PredicateSLSAProvenance )
Variables ¶
View Source
var ( // GenericGeneratorBuilderID is the builder ID for the Generic Generator. GenericGeneratorBuilderID = trustedBuilderRepository + "/.github/workflows/generator_generic_slsa3.yml" // ContainerGeneratorBuilderID is the builder ID for the Container Generator. ContainerGeneratorBuilderID = trustedBuilderRepository + "/.github/workflows/generator_container_slsa3.yml" // GoBuilderID is the SLSA builder ID for the Go Builder. GoBuilderID = trustedBuilderRepository + "/.github/workflows/builder_go_slsa3.yml" // ContainerBasedBuilderID is the SLSA builder ID for the Container-Based Builder. ContainerBasedBuilderID = trustedBuilderRepository + "/.github/workflows/builder_container-based_slsa3.yml" // NpmCLILegacyBuilderID is the legacy builder ID for the npm CLI. NpmCLILegacyBuilderID = "https://github.com/actions/runner" // NpmCLIHostedBuilderID is the builder ID for the npm CLI on Hosted GitHub Actions. NpmCLIHostedBuilderID = NpmCLILegacyBuilderID + "/github-hosted" // NpmCLISelfHostedBuilderID is the builder ID for the npm CLI on Self-hosted GitHub Actions. NpmCLISelfHostedBuilderID = NpmCLILegacyBuilderID + "/self-hosted" // GenericDelegatorBuilderID is the SLSA builder ID for the BYOB Generic Low-Permissions Delegated Builder. GenericDelegatorBuilderID = trustedBuilderRepository + "/.github/workflows/delegator_generic_slsa3.yml" // GenericLowPermsDelegatorBuilderID is the SLSA builder ID for the BYOB Generic Low-Permissions Delegated Builder. GenericLowPermsDelegatorBuilderID = trustedBuilderRepository + "/.github/workflows/delegator_lowperms-generic_slsa3.yml" )
View Source
var ( // BYOBBuildTypeV0 is the base buildType for BYOB delegated builders. BYOBBuildTypeV0 = "https://github.com/slsa-framework/slsa-github-generator/delegator-generic@v0" // ContainerBasedBuildTypeV01Draft is the buildType for the container-based builder. ContainerBasedBuildTypeV01Draft = "https://slsa.dev/container-based-build/v0.1?draft" // GoBuilderBuildTypeV1 is the buildType for the Go builder. GoBuilderBuildTypeV1 = "https://github.com/slsa-framework/slsa-github-generator/go@v1" // GenericGeneratorBuildTypeV1 is the buildType for the generic generator. GenericGeneratorBuildTypeV1 = "https://github.com/slsa-framework/slsa-github-generator/generic@v1" // ContainerGeneratorBuildTypeV1 is the buildType for the container generator. ContainerGeneratorBuildTypeV1 = "https://github.com/slsa-framework/slsa-github-generator/container@v1" // NpmCLIBuildTypeV1 is the buildType for provenance generated by the npm cli. NpmCLIBuildTypeV1 = "https://github.com/npm/cli/gha@v1" // NpmCLIBuildTypeV2 is the buildType for provenance generated by the npm cli. NpmCLIBuildTypeV2 = "https://github.com/npm/cli/gha/v2" )
View Source
var ( // LegacyGoBuilderBuildTypeV1 is a legacy Go builder buildType. LegacyGoBuilderBuildTypeV1 = "https://github.com/slsa-framework/slsa-github-generator-go@v1" // LegacyBuilderBuildTypeV1 is a legacy generic build type for slsa-github-generator. LegacyBuilderBuildTypeV1 = "https://github.com/slsa-framework/slsa-github-generator@v1" )
Legacy buildTypes.
Functions ¶
func GetAsString ¶
GetAsString returns the value in the given environment as a string.
func GetEventPayload ¶
GetEventPayload retrieves the GitHub event payload from the environment map that contains the GitHub context payload.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.