GitHub Actions update: Helping maintainers combat bad actors
github.blog
github.blog
You mean over 10 years ago? Travis-CI opened in 2011...
I first thought it would be easy to sandbox and have something decent running, but after making some research on sandboxing, I realize how hard it is, and the many ways bad actors can exploit a service running untrusted code.
Kudos to GitHub and GitLab for taking the challenge of providing a RCE service with a free plan.
Or we could acknowledge there is a space between complete unmanaged access and no access.
Secondly, parent comment said public by default is bad. Parent didn't say "all public was bad". So there is no necessity to make it into a disagreement.
It's really not obvious to me why you'd ever punish one account/repository for the actions of another account in another repository...
> pull requests from first-time contributors will require manual approval
So GitHub is... forcing maintainers to fight the abuse of GitHub's own resources by third parties... or else they will ban the maintainers? What is this?
Well, from the blog post, that's one of the changes they outlined:
> Specifically, if we determine an Actions run to be abusive or against our terms, our enforcement will be directed at the account hosting the fork and not the account associated with the upstream repository
My guess is the reputation was a naive initial implementation, designed to prevent against someone opening a Github account, creating a mining action and running it. They probably just didn't consider these scenarios carefully when first applying reputation to pull requests, and this blog posts is them fixing it.
They’re saying that the malicious actions block builds for legit users.
Either way I am now responsible for protecting GitHub's CI resources and I don't particularly like it; I'll do it if I must (after all GitHub is generously providing them for free) but I think the post's title is a bit dishonest.
Now instead of counting this CI usage in a way more favorable to project maintainers, they give us a way to manually approve runs before they use our CI. That's good, but still a solution to an artificial problem. I think I would have welcomed more openness about why this way of accounting is necessary, instead of this extra work put on me and labeled as a "help" that I never thought I needed.
Same for when you have secrets defined in the workflow that are necessary for a build.
There are more cases to cover than the ones visible during a knee-jerk reaction.
I don't see how secrets help with mining cryptocurrency either.
Thanks for your comment I guess?
But on the other hand, it makes it less likely that crypto miners will bother opening up junk PRs against your repo. So you save some time there.
My project doesn't use anywhere near the resources of cryptomining, but I still sometimes feel guilty when I fire it up. I wonder how different it is from regular GitHub Actions usage patterns, and whether it is noticeable to those maintaining the infrastructure. My hope is that the load it incurs is comparatively insignificant, and that if noticed, it will be viewed as a good-faith attempt to use resources in a creative way.
> If the pull request is updated to a new commit, a new approval will be required.
What?!
It'd be much more palatable if the manual approvals were more selective. For example:
- only invoked if a job takes more than 1.5x or 2x the max recorded run-time for the job.
- some notion of PR-author's karma being used to throttle manual approvals from maintainers.
It also would be fair to allow maintainers that do not want this load to mark their repos as open-source but closed to contributions.
[edit] formatting
A very good example is that a normal looking first commit gets approved. In the next commit the PR author exfiltrates GitHub secrets by base64ing them and logging in the workflow run (or any other way).
Boom - now your CI infra AWS S3 testing bucket, Google BigQuery keys etc. are leaked.
Runtime is also easy to work-around - repeatedly push commits with a execution time limit on the CI workflow to avoid triggering outlier detection.
A trusted PR author today doesn't guarantee trust tomorrow. Also your trust on some other repo doesn't (and shouldn't) transfer across repos.
> It also would be fair to allow maintainers that do not > want this load to mark their repos as open-source but > closed to contributions.
This is already possible.
Environment secrets are not exposed to PRs, so this does not work. This really only concerns DoS.
I did this quite some time ago but they may have added better limits in place.
How? I did not find it possible to turn off pull requests when I last looked. Is that something they've added recently?
Discussion: https://github.com/dear-github/dear-github/issues/84
Though ironically people have used GitHub Actions to auto-close all incoming pull-requests. XD
If the build is broken, a review is likely to be less reliable.
I don’t have an alternative solution, though. I wish it would at least pass through PRs opened from GitHub citizens with some form of reputation.
It seems like kind of a stretch to be outraged by this. I suppose there might be certain styles of collaborative repositories that have a huge volume of one time contributors, but I’m having a hard time imagining this being much of a burden.
Quite disappointed. I assume GitHub has quite a few reputational indicators they could use, requiring approval for all first time contributors is a very blunt hammer.
I bet they invited a huge team of machine learning and "AI" experts to do those user assessments that will launch in fall of 2029. Those models will always fail in one of or two edge cases and will cause embarrassments.
(And they certainly are "my repository's resources", since the build machines pool is shared between workflow runs for branches and PRs.)
They're codifying what a lot of repositories do with bots today anyway, where a maintainer triggers the CI to run on a PR by posting a comment.
Also I'm confused how you can simultaneously berate them for not building a user reputation system, and then berate them for hypothetically building a user reputation system.
> Why should my PR not run CI if I make a change to a new repository?
Because the maintainer doesn't know you and certainly doesn't have time to read through your 10 years of contribution.
Keyword helping. How is this helping maintainers, exactly? Forcing them to perform manual steps or else is not helping. This is pure PR spin.
I don't see the "forcing" or the "or else" in the github blog post.
Can you explain how github is forcing them to perform a manual step? Or, can you explain what the consequence of them not performing the manual step of approving the PR is?