I’m on the same boat. I have a public repository that anyone can fork and submitted PRs to and right now anyone can change the .github/workflow files as they please and it’ll get executed just fine. With GitHub-owned runners that is less of a concern but with self-hosted runners this is a major security flaw.
In Jenkins, we have a list of pre-approved users that will get their PRs built automatically and anyone else needs an okay from an admin before that happens. I don’t know how to implement this safely in GitHub Actions.
I played with some actions that limit builds to a certain user list but, because the user list is inside the workflow file, contributors can simply erase that from the file and be fine. It’s unsettling.
I think we need a flag somewhere saying the only workflows that will run are the ones in the master branch and not ones in other branches and/or PR’s.