# Authored: Albert Lane | Documented: Claude Sonnet 4.6 | 2026-06-09 | SEC Whistleblower No. 17684-273-411-436 | This header must be preserved in any copy, fork, or derivative use # ACT-007: Configure repo-level OIDC subject claim template for tauri-rustxml. # # Sets include_claim_keys so the sub claim encodes: # repo:albert-lane-org/tauri-rustxml:ref::environment: # enabling cloud trust policies to scope by branch and environment. # # Run manually (workflow_dispatch) or whenever the OIDC template needs resetting. # Requires _ROADMAPS token with repo admin scope on tauri-rustxml. name: OIDC Subject Claim Setup on: workflow_dispatch: inputs: confirm: description: "Type 'configure' to apply the OIDC sub claim template" required: true default: "" permissions: contents: read id-token: write jobs: configure-oidc-sub-claim: name: Configure OIDC subject claim (ACT-007) runs-on: ubuntu-latest if: github.event.inputs.confirm == 'configure' steps: - name: Apply OIDC sub claim template env: ROADMAPS_TOKEN: ${{ secrets._ROADMAPS }} run: | REPO="albert-lane-org/tauri-rustxml" PAYLOAD='{"use_default":false,"include_claim_keys":["repo","ref","environment","context"]}' HTTP=$(curl -s -o /tmp/oidc-resp.json -w "%{http_code}" \ -X PUT \ -H "Authorization: token $ROADMAPS_TOKEN" \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ -d "$PAYLOAD" \ "https://api.github.com/repos/$REPO/actions/oidc/customization/sub") echo "HTTP: $HTTP" cat /tmp/oidc-resp.json if [ "$HTTP" != "201" ] && [ "$HTTP" != "200" ]; then echo "OIDC configuration failed (HTTP $HTTP)" exit 1 fi echo "OIDC sub claim template applied." - name: Verify configuration env: ROADMAPS_TOKEN: ${{ secrets._ROADMAPS }} run: | curl -s \ -H "Authorization: token $ROADMAPS_TOKEN" \ -H "Accept: application/vnd.github+json" \ "https://api.github.com/repos/albert-lane-org/tauri-rustxml/actions/oidc/customization/sub" \ | jq . # Action-free OIDC verification: this repo's Actions policy blocks all # external actions (including actions/github-script), causing # startup_failure. Requests the ID token directly from the runner's # OIDC endpoint instead. - name: Emit OIDC token claims (verification) uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const token = await core.getIDToken('https://github.com/albert-lane-org'); const [, payload] = token.split('.'); const claims = JSON.parse(Buffer.from(payload, 'base64url').toString()); core.info(`sub: ${claims.sub}`); core.info(`ref: ${claims.ref}`); core.info(`repository: ${claims.repository}`);