You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/05/30 02:54:01 UTC
[PR] security(ci): restrict docs deployment to trusted workflow_run origins [superset]
rusackas opened a new pull request, #40533:
URL: https://github.com/apache/superset/pull/40533
### SUMMARY
- Adds a repository-origin guard to `.github/workflows/superset-docs-deploy.yml` so that `workflow_run`-triggered builds only proceed when the triggering run originated from this repository.
- `push` and `workflow_dispatch` triggers are unaffected.
### CHANGE
The `build-deploy` job's `if` condition now includes:
```
github.event.workflow_run.head_repository.full_name == github.repository
```
This ensures that when the workflow fires via `workflow_run`, the triggering run must have come from `apache/superset` itself rather than an external fork.
### TESTING INSTRUCTIONS
- [ ] Verify that a direct `push` to `master` docs paths still triggers a successful deployment
- [ ] Verify that `workflow_dispatch` still works
- [ ] Verify that an integration test run from `master` still triggers the docs deployment
- [ ] Confirm that a `workflow_run` event from a fork does not proceed past the `build-deploy` `if` check (the job shows as skipped)
### ADDITIONAL INFORMATION
- [ ] Has associated issue
- [ ] Required feature flags: none
- [ ] Changes UI: no
- [ ] Includes DB Migration: no
- [ ] Introduces new feature or API: no
- [ ] Removes existing feature or API: no
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restrict docs deployment to trusted workflow_run origins [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #40533:
URL: https://github.com/apache/superset/pull/40533#issuecomment-4581412272
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 5a11444cb476e186a7988529b388c8126b790b23 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a1a51493573d20008b889a5 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-40533--superset-docs-preview.netlify.app](https://deploy-preview-40533--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpbEkAgFADQvdxvjTwidmAZqahBt7kY0xh719_5OC9EwiNeMAIUMJMK2mWfVt_kr1Q-SNuy48PoDgzJrz4w7aze8jY27pgmk3-nKiWqdmhE35iacy5nKQcl4PsB) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-40533--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] security(ci): restrict docs deployment to trusted workflow_run origins [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40533:
URL: https://github.com/apache/superset/pull/40533#issuecomment-4581408783
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] security(ci): restrict docs deployment to trusted workflow_run origins [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #40533:
URL: https://github.com/apache/superset/pull/40533#issuecomment-4581409176
Congrats on making your first PR and thank you for contributing to Superset! :tada: :heart:
Please read our [New Contributor Welcome & Expectations](https://github.com/apache/superset/wiki/New-Contributor-Welcome-&-Expectations) guide.
We hope to see you in our [Slack](https://apache-superset.slack.com/) community too! Not signed up? Use our [Slack App](http://bit.ly/join-superset-slack) to self-register.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restrict workflow_run jobs to trusted origins and add zizmor audit [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40533:
URL: https://github.com/apache/superset/pull/40533#issuecomment-4581896664
**Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restrict workflow_run jobs to trusted origins and add zizmor audit [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on PR #40533:
URL: https://github.com/apache/superset/pull/40533#issuecomment-4581611912
LGTM. Great job, Evan!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restrict workflow_run jobs to trusted origins and add zizmor audit [superset]
Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber merged PR #40533:
URL: https://github.com/apache/superset/pull/40533
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restrict workflow_run jobs to trusted origins and add zizmor audit [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #40533:
URL: https://github.com/apache/superset/pull/40533#issuecomment-4581468188
**Why these changes were made**
Both `superset-docs-deploy.yml` and `superset-docs-verify.yml` use the `workflow_run` trigger, which fires in the context of the *target repository* (with its secrets) rather than in the context of the triggering PR. This is intentional by design — it's what allows downstream workflows to access deployment credentials that fork PRs can't touch. But it creates a trap: if the downstream workflow checks out and executes code identified by `github.event.workflow_run.head_sha`, and that sha belongs to a fork PR, the code running with elevated privileges is attacker-controlled.
The `branches: [master]` filter on the `workflow_run` trigger is not a reliable guard here. For `workflow_run`, GitHub evaluates that filter against the *head branch of the triggering run*, not its base. A fork can name its branch `master` and satisfy the filter.
The fix is a single condition added to each affected job's `if:` block:
```
github.event.workflow_run.head_repository.full_name == github.repository
```
This ensures the job only runs when the triggering workflow originated from `apache/superset` itself — not a fork. `push` and `workflow_dispatch` triggers bypass this check entirely and are unaffected.
The third commit adds `zizmor` as a pre-commit hook to catch this pattern locally going forward. CI coverage was already added in #40510.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(ci): restrict workflow_run jobs to trusted origins and add zizmor audit [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #40533:
URL: https://github.com/apache/superset/pull/40533#issuecomment-4581471089
@hainenber @dpgaspar @sha174n please review when you get a chance, and merge for me if it looks good!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org