From 997073fd2dd761669127a389a3a7f06e88c4de7f Mon Sep 17 00:00:00 2001 From: John Andersen Date: Wed, 13 Sep 2023 21:46:16 +0000 Subject: [PATCH] Validation of OIDC claims via JSON schema validator Related: https://github.com/actions/runner/issues/2417#issuecomment-1718369460 Signed-off-by: John Andersen --- .github/workflows/notarize.yml | 46 +++++++++++++++++++++++++++++++++- scitt_emulator/oidc.py | 5 +++- setup.py | 1 + tests/test_cli.py | 39 +++++++++++++++++++++++++--- 4 files changed, 86 insertions(+), 5 deletions(-) diff --git a/.github/workflows/notarize.yml b/.github/workflows/notarize.yml index 74c64813..402c76ae 100644 --- a/.github/workflows/notarize.yml +++ b/.github/workflows/notarize.yml @@ -66,11 +66,54 @@ jobs: - name: Submit claim env: OIDC_TOKEN: '${{ steps.github-oidc.outputs.token }}' + WORKFLOW_REF: '${{ github.workflow_ref }}' + # Use of job_workflow_sha blocked by + # https://github.com/actions/runner/issues/2417#issuecomment-1718369460 + JOB_WORKFLOW_SHA: '${{ github.sha }}' + REPOSITORY_OWNER_ID: '${{ github.repository_owner_id }}' + REPOSITORY_ID: '${{ github.repository_id }}' run: | # Create the middleware config file - cat > oidc-middleware-config.json <