Conversation
juliobbv
reviewed
Oct 1, 2020
juliobbv
reviewed
Oct 1, 2020
juliobbv
reviewed
Oct 1, 2020
juliobbv
reviewed
Oct 1, 2020
juliobbv
reviewed
Oct 1, 2020
juliobbv
reviewed
Oct 1, 2020
Contributor
juliobbv
left a comment
There was a problem hiding this comment.
Left you some comments. I'll take another look once they're addressed 👍
Collaborator
Author
|
Should have responded to all your feedback @juliobbv |
thboop
commented
Oct 1, 2020
| } | ||
|
|
||
| var allowUnsecureCommands = false; | ||
| bool.TryParse(Environment.GetEnvironmentVariable(Constants.Variables.Actions.AllowUnsupportedCommands), out allowUnsecureCommands); |
Collaborator
Author
There was a problem hiding this comment.
@ericsciple this pulls from the .env file in the layout folder of the runner. Users won't be able to set it in their workflow job env.
ericsciple
reviewed
Oct 2, 2020
ericsciple
reviewed
Oct 2, 2020
|
|
||
| public void ProcessCommand(IExecutionContext context, string line, ActionCommand command, ContainerInfo container) | ||
| { | ||
| var serverUrl = context.GetGitHubContext("server_url"); |
Collaborator
There was a problem hiding this comment.
var configurationStore = HostContext.GetService<IConfigurationStore>();
var isHostedServer = configurationStore.GetSettings().IsHostedServer;
Collaborator
There was a problem hiding this comment.
^ better for consistency with the other places in the runner
ericsciple
reviewed
Oct 2, 2020
ericsciple
reviewed
Oct 2, 2020
ericsciple
reviewed
Oct 2, 2020
ericsciple
reviewed
Oct 2, 2020
| { | ||
| throw new Exception(String.Format(Constants.Runner.UnsupportedCommandMessageDisabled, this.Command)); | ||
| } | ||
| else if(!allowUnsecureCommands) |
Collaborator
There was a problem hiding this comment.
kind of weird that allow is false, and then we warn but allow anyway
wondering whether the default value of allow should be based on whether is hosted server. And then if the env var is specified, respect it.
ericsciple
approved these changes
Oct 2, 2020
juliobbv
approved these changes
Oct 2, 2020
AdamOlech
pushed a commit
to antmicro/runner
that referenced
this pull request
Jan 28, 2021
* notify on unsecure commands
TingluoHuang
pushed a commit
that referenced
this pull request
Apr 21, 2021
* notify on unsecure commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The purpose of this PR is to add telemetry and notify PR's when they are using the unsecure commands in the runner. Eventually, we will need to disable these commands, but getting people to migrate off of them is the first step. This pr will create annotations on runs where these commands are used. For example:

Testing