Skip to content

Commit

Permalink
Added nmap scanner
Browse files Browse the repository at this point in the history
  • Loading branch information
mandeepdhiman123 committed Aug 26, 2020
1 parent 36cb980 commit d8c60b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions mosip-security-playbook/playbooks/nmap-scanning-cluster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This play perform all the tasks needed for docker security scanning.
# Here we have split tasks and roles into seperate
# play as tasks only run after roles if they are in the same play (for some reason)
# and for us sequencing is important.

- hosts: security-console
gather_facts: true
tasks:
- {name: 'nmap scanning report folder', file: {name: "{{ nmap_report_dir }}", state: directory}}

- hosts: scancluster
gather_facts: true
become_user: root
become: yes
roles:
- {role: nmap-scanning, tags: [nmap-scanning]}
2 changes: 2 additions & 0 deletions mosip-security-playbook/roles/nmap-scanning/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- name: Run port scanning using nmap
command: "nmap -p- -Pn -sS -A --script banner -oX - {{ inventory_hostname }} | xsltproc -o {{nmap_report_dir}}/1.html -"

0 comments on commit d8c60b3

Please sign in to comment.