Skip to content
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

Maintenance: Hardening of dependant workflows to run on base repo only #1349

Closed
2 tasks done
heitorlessa opened this issue Jul 22, 2022 · 1 comment
Closed
2 tasks done
Labels
tech-debt Technical Debt tasks

Comments

@heitorlessa
Copy link
Contributor

Summary

GitHub Actions workflow_run event allows running workflows in response to other workflows. This makes it easier to secure PR automation where we can split workflows to extract PR details and to act on PR, instead of using pull_request_target that would send a write token to any fork.

However, the challenge with workflow_run is that GitHub doesn't allow restricting where such dependency (workflow) can be run. For example, Run Tests could be a workflow that runs in the base repo or any fork.

on:
  workflow_run:
    workflows: [Run Tests]
    types:
      - completed

Besides the practice of manually approving fork workflows to run on a per PR basis (we already do), we can do better by creating an additional security layer to only allow sensitive dependant workflows to run in the base repo.

Why is this needed?

Increases our security posture by not relying on human approval step only. It also provides an example to suggest a feature request to the GitHub Actions team.

Which area does this relate to?

Automation, Governance

Solution

No response

Acknowledgment

@heitorlessa heitorlessa added triage Pending triage from maintainers internal Maintenance changes labels Jul 22, 2022
@heitorlessa heitorlessa added pending-release Fix or implementation already in dev waiting to be released and removed triage Pending triage from maintainers pending-release Fix or implementation already in dev waiting to be released labels Jul 22, 2022
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@heitorlessa heitorlessa added tech-debt Technical Debt tasks and removed internal Maintenance changes labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Technical Debt tasks
Projects
None yet
Development

No branches or pull requests

1 participant