This commit is contained in:
Eliezer Croitoru 2024-07-07 12:23:11 +00:00
parent e08b947761
commit 88495d0b8c
2 changed files with 11 additions and 9 deletions

2
2024-6387/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
hosts
ansible.cfg

View File

@ -28,9 +28,15 @@
register: openssh_version_output
changed_when: false
- name: Parse OpenSSH server version
- debug:
msg: "{{ openssh_version_output.stdout }}"
- name: "Parse OpenSSH server version"
set_fact:
openssh_version: "{{ openssh_version_output.stdout.split()[1].split('_')[1] }}"
openssh_version: "{{ openssh_version_output.stdout.split()[0].split('_')[1] }}"
- debug:
msg: "{{ openssh_version }}"
- name: Check if OpenSSH version is affected by CVE-2024-6387
set_fact:
@ -48,10 +54,4 @@
- name: Report OpenSSH version and CVE status
debug:
msg: >
OpenSSH version {{ openssh_version }} is
{% if is_vulnerable %}
vulnerable
{% else %}
not vulnerable
{% endif %} to CVE-2024-6387.
OpenSSH version {{ openssh_version }} is {% if is_vulnerable %} ## vulnerable ## {% else %} not vulnerable {% endif %} to CVE-2024-6387.