Only allow whitelisted commands to be run #967
Merged
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.
This is a spike into #966, which adds a configuration option to Empire to require commands to be whitelisted for
emp run
to work.If a command is not whitelisted,
emp run
will have this behavior:To whitelist a command, you add it to the Procfile:
It's recommended that you use the extended Procfile and set the
noservice: true
flag to prevent it from being scaled up (and it won't create any AWS resources).In this initial spike, it allows any command in the Procfile to be run. For example, if you use the new scheduled tasks, you can spin up a one off of the scheduled task easily like so:
Any extra arguments will be appended to the command provided in the procfile. For example:
$ emp run migrate up
TODO