-
Notifications
You must be signed in to change notification settings - Fork 14
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
Allow shell expanded .conf values #14
Allow shell expanded .conf values #14
Conversation
This one should be merged after #13 and conflicts have been resolved |
3e9230c
to
3c8439a
Compare
@lukebakken this is all i have in the pipe for |
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.
My feeling is that executing arbitrary shell commands will not be appreciated by end-users (cc @michaelklishin)
@lrascao can you give a concrete example of the kinds of problems this change addresses?
src/cuttlefish_conf.erl
Outdated
% first get the current cwd so we can restore it later | ||
{ok, Cwd0} = file:get_cwd(), | ||
file:set_cwd(filename:dirname(Filename)), | ||
ShellValue = os:cmd(Cmd), |
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.
I can hear the screams of the security review now.
d225b66
to
776479a
Compare
I hadn't really considered the security aspect of it, i guess mostly due to the fact that a malicious actor that is able to add arbitrary shell commands to the
Sure, a specific one i'm currently working on is running the Erlang VM on Kubernetes. Without getting into too much detail, k8s offers two features (
If the security restriction is a concern i suppose a viable alternative would be to make use the |
Yes, let's do that. Please use the same syntax as what
|
So coveralls can shut up already and green light this PR.
Allows defining .conf values in the format `$(<FILENAME)`, the included file contents will be read and used as the setting value.
776479a
to
0de26f1
Compare
@lukebakken reworked as agreed |
…the path to the file includes whitespace
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.
@lrascao if you have time to review the commits I added to handle some edge-cases, I would appreciate it!
👍 changes look good, let's hope coveralls doesn't come back with more coverage demands |
@lukebakken that's the end of my pipeline, if there's nothing else that you intend do add could you please cut a |
@lrascao I am blocked by this issue - erlef/rebar3_hex#194 |
Allow for shell commmand substitution of .conf values,
only the `ShellCommand` form is allowed.