-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
This would be a large change. To avoid package builds gaining write permissions to the GH assets we currently clean out the env, so they can't get to the token easily (
msys2-autobuild/msys2_autobuild/build.py
Lines 97 to 108 in 1ed7c15
| def clean_environ(environ: Dict[str, str]) -> Dict[str, str]: | |
| """Returns an environment without any CI related variables. | |
| This is to avoid leaking secrets to package build scripts we call. | |
| While in theory we trust them this can't hurt. | |
| """ | |
| new_env = environ.copy() | |
| for key in list(new_env): | |
| if key.startswith(("GITHUB_", "RUNNER_")): | |
| del new_env[key] | |
| return new_env |
Ideally we would separate the third party code into an environment that doesn't have write permissions.
Metadata
Metadata
Assignees
Labels
No labels