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

Build mmaps for comparison on PR branch. #949

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Elemecca
Copy link

@Elemecca Elemecca commented Jan 11, 2024

The GitHub Action which generates the mmap comparison link for pull requests currently applies the YAML patches from the PR branch using the SVDs and tooling from the master branch in order to avoid running the untrusted tooling code from the PR branch in a context where it has access to secrets. For more context see #919.

This replaces that workflow with a pair that implement the pattern described in GitHub's blog post on how to combine an untrusted build with privileged actions.

Unfortunately (as is typical of CI changes) I haven't been able to test the new workflows as that would require setting up a bunch of temporary repositories.

Since this switches from the pull_request_target event to pull_request, workflows may no longer run automatically for PRs submitted by first-time contributors. You should check the setting for when to run workflows for PRs from forks.

The switch to the pull_request event also means that the job to generate the mmaps will run on a commit generated by GitHub that merges the PR head branch into master, and that it won't run at all if there are merge conflicts. I think that's probably a good thing, but if you want, I think I can change it to run on the PR head commit.

I would also recommend changing the default GITHUB_TOKEN permissions to "Restricted". That will ensure that Actions jobs don't have write access to anything unless they request it specifically with the permissons setting in their YAML file. I've looked over the other workflows and I think all of the ones that need extra permissions already request them.

@burrbull
Copy link
Contributor

update changelog, please. Add newline in the end of mmaps_pr_generate.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants