From dd87e1183f96f3ebc2ee854a3ab6a8b8a0363daf Mon Sep 17 00:00:00 2001 From: Enguerrand Allamel Date: Wed, 4 Dec 2024 16:13:00 +0100 Subject: [PATCH] test another predicate digest mode --- .github/workflows/slsa-generator-nodejs-custom.yaml | 2 +- .../slsa-github-generator-nodejs-predicate.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/slsa-generator-nodejs-custom.yaml b/.github/workflows/slsa-generator-nodejs-custom.yaml index 75b2286..7392feb 100644 --- a/.github/workflows/slsa-generator-nodejs-custom.yaml +++ b/.github/workflows/slsa-generator-nodejs-custom.yaml @@ -43,7 +43,7 @@ jobs: BUILDER_ID: ${{ github.workflow_ref }} # Buid is made on the same job CONFIG_SOURCE_URI: git+${{ github.event.repository.html_url }}@${{ github.ref }} CONFIG_SOURCE_DIGEST: ${{ github.sha }} - ENTRY_POINT: ${{ github.workflow }} + ENTRY_POINT: ${{ github.event.repository.html_url }} GITHUB_ACTOR_ID: ${{ github.actor_id }} GITHUB_TRIGGERING_ACTOR_ID: ${{ github.triggering_actor }} GITHUB_REPOSITORY_ID: ${{ github.repository_id }} diff --git a/.github/workflows/slsa-github-generator-nodejs-predicate.sh b/.github/workflows/slsa-github-generator-nodejs-predicate.sh index 06f38a2..6eea3bb 100644 --- a/.github/workflows/slsa-github-generator-nodejs-predicate.sh +++ b/.github/workflows/slsa-github-generator-nodejs-predicate.sh @@ -35,7 +35,15 @@ cat < predicate.json }, "metadata": { "buildInvocationId": "$BUILD_INVOCATION_ID" - } + }, + "materials": [ + { + "uri": "$CONFIG_SOURCE_URI", + "digest": { + "sha1": "$CONFIG_SOURCE_DIGEST" + } + } + ] } EOF