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

mark entire module result untrusted as template #55717

Merged
merged 1 commit into from Apr 24, 2019

Conversation

nitzmahone
Copy link
Member

SUMMARY
  • prevents accidental templating on intra-action postprocessing of an untrusted module result
  • moves wrap_var call to the very end of ActionBase._execute_module(), just in case anything else is added in the middle.
  • makes the view of a module result within an action consistent with the way it would be stored for future use (eg facts, register)
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ActionBase

ADDITIONAL INFORMATION

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Apr 24, 2019
@abadger
Copy link
Contributor

abadger commented Apr 24, 2019

+1

Perhaps we should also add something to the documentation to say that executor doesn't trust action plugins to be written correctly and that action plugins must not trust the results from modules? If you agree, I can do that in a separate PR.

@nitzmahone
Copy link
Member Author

@abadger yeah, that'd be fine- I think at least a statement of expectation in the developer guide or whatever would be a good thing (also gives us a chance to explain what that's all about)

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed core_review In order to be merged, this PR must follow the core review workflow. labels Apr 24, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed shipit This PR is ready to be merged by Core labels Apr 24, 2019
@nitzmahone nitzmahone removed the needs_triage Needs a first human triage before being processed. label Apr 24, 2019
* prevents accidental templating on intra-action postprocessing of an untrusted module result
* makes the view of a module result within an action consistent with the way it would be stored for future use (eg facts, register)
@nitzmahone nitzmahone merged commit 03cac39 into ansible:devel Apr 24, 2019
nitzmahone added a commit to nitzmahone/ansible that referenced this pull request Apr 24, 2019
* prevents accidental templating on intra-action postprocessing of an untrusted module result
* makes the view of a module result within an action consistent with the way it would be stored for future use (eg facts, register)

(cherry picked from commit 03cac39)
abadger pushed a commit that referenced this pull request Apr 25, 2019
* prevents accidental templating on intra-action postprocessing of an untrusted module result
* makes the view of a module result within an action consistent with the way it would be stored for future use (eg facts, register)

(cherry picked from commit 03cac39)
@ansible ansible locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants