Repository navigation
Conversation
GitHub resolves the owner and repository in `uses:` case-insensitively, but trustedOwners (ISSUE-701), trustedGithubActions and the official actions/github owners (ISSUE-713) were compared literally, so `SomeOwner/x` or `Actions/checkout` was reported although trusted. The owner and repository now match case-insensitively; a path below the repository and the ref stay exact. The stats counter follows, and the lowercase aliases in the default trustedGithubActions are dropped. Closes #623 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Exypte
requested review from
Totara-thib,
coconux3 and
thomasboni
as code owners
November 20, 2026 10:45
The action-pinning counter compared only the owner of a reference with each trustedOwners entry, so an `owner/repo` or deeper entry exempted a reference from ISSUE-701 but not from actionRefsTotal. It now compares segment by segment like _is_trusted_owner, with strings.ToLower to match Rego's lower(). The docs no longer say an entry matches the ref: the ref is cut off before matching. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What type of PR is this?
fix
What this PR does / why we need it:
GitHub resolves the owner and repository in
uses:without regard to case, but three allowlist checks compared them literally, so a differently spelled trusted owner was reported (false positives only):The ref and any path below the repository stay case-sensitive, as on GitHub (tested in the issue comment).
Also:
isTrustedOwnerincontrol/github_stats.gonow matches entries the same way as the Rego: segment by segment, ignoring case in the owner and repository. Before, it compared only the owner, so anowner/repoentry exempted a reference from ISSUE-701 but still counted it inactionRefsTotal.defaultConfig/.plumber.yaml: the "CASE-SENSITIVE" note and the 17 lowercase case-aliases (azure/*,apple-Actions/*, …) are gone; each has its canonical entry in the list.docs/GITHUB_ISSUES.mdand theschema_docs.godescriptions (catalog golden regenerated).Which issue(s) this PR is related to:
Closes #623
Special notes for your reviewer:
trustedOwnersentries with a path (owner/repo/sub) keep the old prefix semantics; only their first two segments ignore case.make lintwith golangci-lint 2.15.0 locally reports 7reflect.Ptrinlining hints inconfiguration/schema.go,configuration/schema_test.goandcontrol/catalog.go. These files are untouched, and the hints most likely come from the newer local linter.Does this PR introduce a user-facing change?
How was this tested?
policies/trusted_owner_case_test.go: steps and reusable workflows with mixed-case owners against both lists, plus a path-exactness case (myorg/tools/subdoes not covermyorg/tools/Sub/x). NewTestAggregate_TrustedOwnersIgnoreCaseincontrol/github_stats_test.go.TestAggregate_TrustedOwnersMatchLikeRegocoversowner/repoand path entries in the counter. All three failed before the fix.go test ./...passes.plumber analyzeon a local clone ofgetplumber-examples/cli-working-labwith the issue's config (trustedOwners: [actions, github, someowner],trustedGithubActions: [someowner/*]):uses:SomeOwner/some-action@v1Actions/checkout@v4someowner/other-action@v1AI usage disclosure:
YES. Claude Code reproduced the bug, wrote the fix and tests, and drafted this description; the author reviewed the changes and is responsible for them.
🤖 Generated with Claude Code