-
Notifications
You must be signed in to change notification settings - Fork 2k
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
template: disallow writeToFile
by default
#12312
Conversation
a9833ce
to
31ae1ff
Compare
31ae1ff
to
c768060
Compare
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.
Minor tweaks, but LGTM 👍
c768060
to
65958e5
Compare
Resolves #12095 by WONTFIXing it. This approach disables `writeToFile` as it allows arbitrary host filesystem writes and is only a small quality of life improvement over multiple `template` stanzas. This approach has the significant downside of leaving people who have altered their `template.function_denylist` *still vulnerable!* I added an upgrade note, but we should have implemented the denylist as a `map[string]bool` so that new funcs could be denied without overriding custom configurations. This PR also includes a bug fix that broke enabling all consul-template funcs. We repeatedly failed to differentiate between a nil (unset) denylist and an empty (allow all) one.
65958e5
to
f87ec7e
Compare
Review notes from @lgfa29 Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Resolves #12095 by WONTFIXing it.
This approach disables
writeToFile
as it allows arbitrary hostfilesystem writes and is only a small quality of life improvement over
multiple
template
stanzas.This approach has the significant downside of leaving people who have
altered their
template.function_denylist
still vulnerable! I addedan upgrade note, but we should have implemented the denylist as a
map[string]bool
so that new funcs could be denied without overridingcustom configurations.
This PR also includes a bug fix that broke enabling all consul-template
funcs. We repeatedly failed to differentiate between a nil (unset)
denylist and an empty (allow all) one.