Skip to content
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

Merged
merged 2 commits into from
Mar 29, 2022
Merged

template: disallow writeToFile by default #12312

merged 2 commits into from
Mar 29, 2022

Commits on Mar 29, 2022

  1. template: disallow writeToFile by default

    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.
    schmichael committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    f87ec7e View commit details
    Browse the repository at this point in the history
  2. template: fix comments and docs

    Review notes from @lgfa29
    
    Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
    schmichael and lgfa29 committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    3ca38ee View commit details
    Browse the repository at this point in the history