Skip to content

Commit b3fb30b

Browse files
authored
Merge pull request #147 from lcarva/EC-1160
Generate initial SLSA Provenance for Azure
2 parents 19ebd2b + 89b5ad1 commit b3fb30b

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

rhtap/att-predicate-azure.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Create attestation predicate for RHTAP Azure builds
3+
#
4+
# Useful references:
5+
# - https://slsa.dev/spec/v1.0/provenance
6+
# - https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#environment-variables
7+
# - https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services
8+
#
9+
yq -o=json -I=0 << EOT
10+
---
11+
buildDefinition:
12+
buildType: "https://redhat.com/rhtap/slsa-build-types/${CI_TYPE}-build/v1"
13+
externalParameters: {}
14+
internalParameters: {}
15+
resolvedDependencies:
16+
- uri: "git+${BUILD_REPOSITORY_URI}"
17+
digest:
18+
gitCommit: "${BUILD_SOURCEVERSION}"
19+
20+
runDetails:
21+
builder:
22+
id: "${AGENT_ID}"
23+
24+
metadata:
25+
invocationID: "${BUILD_BUILDURI}"
26+
startedOn: "$(cat $BASE_RESULTS/init/START_TIME)"
27+
finishedOn: "$(timestamp)"
28+
29+
byproducts:
30+
- name: SBOM_BLOB
31+
uri: "$(cat $BASE_RESULTS/buildah-rhtap/SBOM_BLOB_URL)"
32+
33+
EOT

rhtap/cosign-sign-attest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function cosign-cmd() {
7070
}
7171

7272
# Generates data for an attestation predicate
73-
# (CI_TYPE is expected to be one of: jenkins, gitlab, github)
73+
# (CI_TYPE is expected to be one of: jenkins, gitlab, github, azure)
7474
function create-att-predicate() {
7575
source "$SCRIPTDIR/att-predicate-$CI_TYPE.sh"
7676
}

0 commit comments

Comments
 (0)