File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ include "jenkins";
2424 workflow_ref : "docker-library/meta/.github/workflows/build.yml@refs/heads/\( $payload .ref ) " ,
2525 workflow_sha : "0123456789abcdef0123456789abcdef01234567" ,
2626 } as $github
27+ | {
28+ environment : "github-hosted" ,
29+ } as $runner
2730
28- | github_actions_provenance ($github ; $digest )
31+ | github_actions_provenance ($github ; $runner ; $ digest )
2932]
Original file line number Diff line number Diff line change 11# input: "build" object with platform and image digest
22# $github: "github" context; CONTAINS SENSITIVE INFORMATION (https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context)
3+ # $runner: "runner" context; https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context
34# $digest: the OCI image digest for the just-built image (normally in .build.resolved.annotations["org.opencontainers.image.ref.name"] but only post-push/regeneration and we haven't pushed yet)
45#
56# output: in-toto provenance statement (https://slsa.dev/spec/v1.0/provenance)
67# see also: https://github.com/actions/buildtypes/tree/main/workflow/v1
7- def github_actions_provenance ($github ; $digest ):
8+ def github_actions_provenance ($github ; $runner ; $ digest ):
89 if $github .event_name != "workflow_dispatch" then error ("error: '\( $github .event_name ) ' is not a supported event type for provenance generation" ) else
910 {
1011 _type : "https://in-toto.io/Statement/v1" ,
@@ -48,7 +49,7 @@ def github_actions_provenance($github; $digest):
4849 event_name : $github .event_name ,
4950 repository_id : $github .repository_id ,
5051 repository_owner_id : $github .repository_owner_id ,
51- runner_environment : "github-hosted" ,
52+ runner_environment : $runner .environment ,
5253 },
5354 },
5455 resolvedDependencies : [
You can’t perform that action at this time.
0 commit comments