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";
24
24
workflow_ref : "docker-library/meta/.github/workflows/build.yml@refs/heads/\( $payload .ref ) " ,
25
25
workflow_sha : "0123456789abcdef0123456789abcdef01234567" ,
26
26
} as $github
27
+ | {
28
+ environment : "github-hosted" ,
29
+ } as $runner
27
30
28
- | github_actions_provenance ($github ; $digest )
31
+ | github_actions_provenance ($github ; $runner ; $ digest )
29
32
]
Original file line number Diff line number Diff line change 1
1
# input: "build" object with platform and image digest
2
2
# $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
3
4
# $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)
4
5
#
5
6
# output: in-toto provenance statement (https://slsa.dev/spec/v1.0/provenance)
6
7
# 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 ):
8
9
if $github .event_name != "workflow_dispatch" then error ("error: '\( $github .event_name ) ' is not a supported event type for provenance generation" ) else
9
10
{
10
11
_type : "https://in-toto.io/Statement/v1" ,
@@ -48,7 +49,7 @@ def github_actions_provenance($github; $digest):
48
49
event_name : $github .event_name ,
49
50
repository_id : $github .repository_id ,
50
51
repository_owner_id : $github .repository_owner_id ,
51
- runner_environment : "github-hosted" ,
52
+ runner_environment : $runner .environment ,
52
53
},
53
54
},
54
55
resolvedDependencies : [
You can’t perform that action at this time.
0 commit comments