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
Disable set-env and add-pathcommands #779
Conversation
58328f2
to
c7f8980
Compare
var configurationStore = HostContext.GetService<IConfigurationStore>(); | ||
var isHostedServer = configurationStore.GetSettings().IsHostedServer; | ||
|
||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this method only has one line?
throw new Exception(String.Format(Constants.Runner.UnsupportedCommandMessageDisabled, this.Command));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above :)
@@ -184,9 +184,6 @@ public sealed class SetEnvCommandExtension : RunnerService, IActionCommandExtens | |||
|
|||
public void ProcessCommand(IExecutionContext context, string line, ActionCommand command, ContainerInfo container) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this method only has one line?
throw new Exception(String.Format(Constants.Runner.UnsupportedCommandMessageDisabled, this.Command));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because we want users to be able to set ACTIONS_ALLOW_UNSECURE_COMMANDS
to use the old commands if needed, some actions may not have updated already and giving users a workaround is helpful until they do get updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirmed with @chrispat
APPROVED.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM 👍
* Disable Old Runner Commands set-env and add-path * update dotnet install scripts * update runner version and release notes
* Disable Old Runner Commands set-env and add-path * update dotnet install scripts * update runner version and release notes
* Disable Old Runner Commands set-env and add-path * update dotnet install scripts * update runner version and release notes
Context
A moderate security vulnerability has been identified in the GitHub Actions runner that can allow environment variable and path injection in workflows that log untrusted data to stdout. This can result in environment variables being introduced or modified without the intention of the workflow author. To address this issue we have introduced a new set of files to manage environment and path updates in workflows. This PR disables the old commands.
Blog Post
Mitigation
If you are using these old commands, the steps that use them in your workflow will fail. You will want to move towards using Environment Files.
You may also opt into unsecure command execution as well, at a job level or for all jobs on your self hosted runner. We recommend you do not choose to do this, and instead update to the new Environment Files.
ACTIONS_ALLOW_UNSECURE_COMMANDS
totrue
ACTIONS_ALLOW_UNSECURE_COMMANDS=true
in the.env
file found at the root of the runner, much like you would set an http_proxy