-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix dispatcher test policy to ensure we have the proper subject #22033
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| issuer: https://token.actions.githubusercontent.com | ||
|
|
||
| subject: repo:DataDog/integrations-core:ref:refs/heads/master | ||
| subject_pattern: repo:DataDog/integrations-core:(pull_request|ref:refs/head/master) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subject pattern rejects master branch tokens
The new subject_pattern uses ref:refs/head/master (missing the s in heads), but GitHub OIDC sub claims for branch runs are repo:DataDog/integrations-core:ref:refs/heads/<branch>. Because the regex no longer matches the actual master subject, push or workflow_dispatch runs on master will fail to obtain STS credentials and the dispatcher workflow cannot manage runs except when invoked from pull_request. This regressively blocks the intended master events.
Useful? React with 👍 / 👎.
f9dc89f to
e201517
Compare
Review from lucia-sb is dismissed. Related teams and files:
- agent-integrations
- .github/chainguard/self.test-dispatcher.sts.yaml
|
Just fixed a typo and since this is for testing I am merging now, lucia is busy with the release shadowing. |
What does this PR do?
Fix subject in policy to allow pull requests to use it.
Motivation
Review checklist (to be filled by reviewers)
qa/skip-qalabel if the PR doesn't need to be tested during QA.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged