docs: fix misleading claims.workflow example in policies.md#19
Merged
Conversation
The `workflow` OIDC claim contains the workflow's `name:` field (e.g., "Deploy Production"), not the filename. This means `claims.workflow == "deploy.yml"` only works when the workflow omits the `name:` field entirely. Replace with `claims.workflow_ref` which contains the full canonical path and is reliable for security pinning. Fixes #18 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
It doesn't really make sense to tell the user the wrong way to do things
ericnorris
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replace the
claims.workflow == "deploy.yml"CEL condition example indocs/policies.mdwithclaims.workflow_ref, which is the correct claim for workflow pinning.Context / Why are we making this change?
The
workflowOIDC claim contains the workflow'sname:field (e.g., "Deploy Production"), not the filename. This meansclaims.workflow == "deploy.yml"only works when the workflow YAML omits thename:field entirely — which is uncommon. Users copying this example will get a condition that silently fails to match.claims.workflow_refcontains the full canonical path (e.g.,my-org/my-repo/.github/workflows/deploy.yml@refs/heads/main) and is reliable for security pinning.See: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#github-context
Fixes #18
Testing and QA Plan
Documentation-only change. Verified that
claims.workflow_refis used in the production policy inetsy/github-app-sts-policiesand that the CEL syntax is valid.Impact
No code changes. Corrects a misleading example that could lead to overly permissive or non-functional policies.