Debian Codegraph @

test/integration/targets/gathering_facts/test_prevent_injection.yml

raw
1 - name: Ensure clean_facts is working properly
2 hosts: facthost1
3 gather_facts: false
4 tasks:
5 - name: gather 'bad' facts
6 action: bogus_facts
7
8 - name: ensure that the 'bad' facts didn't pollute what they are not supposed to
9 assert:
10 that:
11 - "'touch' not in discovered_interpreter_python|default('')"
12 - "'touch' not in ansible_facts.get('discovered_interpreter_python', '')"
13 - "'touch' not in ansible_facts.get('ansible_facts', {}).get('discovered_interpreter_python', '')"
14 - bogus_overwrite is undefined