Skip to content

Commit

Permalink
Basic project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mandeepdhiman123 committed Aug 19, 2020
1 parent 5d3deb2 commit 3f6b305
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 13 deletions.
5 changes: 3 additions & 2 deletions mosip-security-playbook/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
#
tmp_dir: '/tmp/'
logs_dir: '/tmp/'
tools_dir: '/home/mosipuser/securitytools'

reporting_user: 'mosipdocs@gmail.com'
reporting_user_secret: ''

install_dir: '/home/mosipuser/mosip-security/mosip-security-playbook/'
roles_dir: '{{install_dir}}/roles'
utils_dir: '{{install_dir}}/utils'
lib_dir: '{{install_dir}}/utils/python-lib'
python_lib-dir: '/./usr/local/lib/python2.7/dist-packages/'
lib_dir: '{{utils_dir}}/python-lib/'
python_lib_dir: '/usr/local/lib/python2.7/dist-packages/'
6 changes: 4 additions & 2 deletions mosip-security-playbook/playbooks/security-console.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
tasks:
- {name: 'Create tmp folder', file: {name: "{{tmp_dir}}", state: directory}}
- {name: 'Create logs folder', file: {name: "{{logs_dir}}", state: directory}}
- {name: 'Create tools folder', file: {name: "{{tools_dir}}", state: directory}}

- hosts: security-console
gather_facts: true
gather_facts: true
become: yes
roles:
- {role: packages/python, tags: [python]} # Needed for letsencrypt and test scripts
- {role: packages/pip, tags: [pip]}
- {role: packages/pip-packages, tags: [pip-packages]}
- {role: packages/copy-python-libs, tags: [copy-python-libs]}
-
- {role: packages/zap-download, tags: [zap-download]}
Empty file.
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
*** Settings ***
#Library ThreatPlaybook Mosip
Library Collections
Library RoboZap https://127.0.0.1:8081 8081
Library RoboZap https://127.0.0.1:8090 8090
Library RoboFunctionalTest
#Library RoboNmap
Library Process

*** Variables ***
${TARGET_NAME} MOSIP
${TARGET_NAME} Mosip
${TARGET_URI} https://qa.mosip.net/
${TARGET_HOST} qa.mosip.net

#CONFIG
${RESULTS_PATH} /home/mosipuser/mosip/reports

#ZAP
${ZAP_PATH} /home/mosipuser/mosip/zap/
${ZAP_PATH} /home/mosipuser/securitytools/
${APPNAME} qa.mosip.net
${CONTEXT} qa.mosip.net
${REPORT_TITLE} MOSIP Test Report - ZAP
Expand Down
4 changes: 4 additions & 0 deletions mosip-security-playbook/roles/api-scanning/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Run Api Scanning using Zap
command: "robot {{ roles_dir }}/api-scanning/robot-file/play.robot"
- become: yes

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- name: Copy python libraries to python lib
copy:
src: "{{ lib_dir }}"
src: "{{ item }}"
dest: "{{ python_lib_dir }}"
mode: 0774
with_fileglob:
- *.py
- "{{ lib_dir }}/*.py"
14 changes: 14 additions & 0 deletions mosip-security-playbook/roles/packages/zap-download/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#- name: Download Zap
# get_url:
# url: https://github.com/zaproxy/zaproxy/releases/download/v2.9.0/ZAP_2.9.0_Linux.tar.gz
# dest: "{{ tools_lib}}"
# mode: 0755
# checksum: 4c72ba9d9ba60f58dc7eb26c5818cf98a38ba58b9bf2313aadd69832d85e9cb1
# group: mosipuser
# owner: mosipuser
- name: Download and Unarchive zap
unarchive:
src: https://github.com/zaproxy/zaproxy/releases/download/v2.9.0/ZAP_2.9.0_Linux.tar.gz
dest: "{{ tools_lib }}/zap/"
mode: 0755
remote_src: yes

0 comments on commit 3f6b305

Please sign in to comment.