summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/fetch/injection/avoid_slurp_return.yml
blob: af62dcf4b8b00ed90da4e80d5d0dc4962b7bb7be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- name: ensure that 'fake slurp' does not poison fetch source
  hosts: localhost
  gather_facts: False
  tasks:
    - name: fetch with relative source path
      fetch: src=../injection/here.txt dest={{output_dir}}
      become: true
      register: islurp

    - name: fetch with normal source path
      fetch: src=here.txt dest={{output_dir}}
      become: true
      register: islurp2

    - name: ensure all is good in hollywood
      assert:
        that:
            - "'..' not in islurp['dest']"
            - "'..' not in islurp2['dest']"
            - "'foo' not in islurp['dest']"
            - "'foo' not in islurp2['dest']"

    - name: try to trip dest anyways
      fetch: src=../injection/here.txt dest={{output_dir}}
      become: true
      register: islurp2