Newer
Older
command: ssh -f -N -L localhost:9390:192.168.187.162:9390 jenkins@scans.cloud.infn.it
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
- debug:
var: endpoints_to_scan
- name: Run scan
command: "{{ python3_script_path }} {{ endpoints_to_scan }} {{ paas_ci_workdir + '/dep.json'}} {{ paas_ci_workdir }}"
register: scan_output
- name: Find report files
find:
paths: "{{paas_ci_workdir}}"
patterns: '*report.txt'
register: report_files
- name: Show reports
debug:
msg: "{{lookup('file', item.path)}}"
with_items: "{{report_files.files}}"
- name: get Severity file content
shell: cat "{{ paas_ci_workdir + '/severity.json'}}"
register: severity
- name: import severity
set_fact:
severity_json: "{{ severity.stdout | from_json }}"
- debug:
var: severity_json
- name: Get scan outputs (if successful)
assert:
that:
- severity_json.global == 'OK'
fail_msg: "SCAN FAILED - global_severity: {{ severity_json.global_severity }}"
success_msg: "SCAN PASSED - global_severity: {{ severity_json.global_severity }}"