Skip to content

Latest commit

 

History

History
executable file
·
103 lines (87 loc) · 3.76 KB

CONTRIBUTING.md

File metadata and controls

executable file
·
103 lines (87 loc) · 3.76 KB

OWASP Security Knowledge Framework

SKF Logo

Table of Contents

Wow you landed on the contribution page how awesome you must be to help out and add value to his project! We thank you very much for this and we really appreciate your help. We will reward contributors with recognition on the contributors list of SKF and for people who add new feutures or fix / report security issues we will give you a free OWASP-SKF t-shirt! If you are really bad ass and you add major improvements then you will receive a hoodie of OWASP-SKF with your name on it!

Below are the 2 different parts of SKF and how you can contribute to it, please always make sure that the quality we try to achieve remains intact. Also when you have questions or want to discuss your implementation / contribution please locate us on Gitter.im chat: Join the chat at https://gitter.im/Security-Knowledge-Framework/Lobby

Again thank you for your help, you rock!

Development SKF-API

  1. Fork and clone https://github.com/blabla1337/skf-flask
  2. pip3 install -r requirements.txt
  3. export FLASK_APP=skf/app.py
  4. export PYTHONPATH=.:$PYTHONPATH
  5. export FLASK_DEBUG=1
  6. export SKF_JWT_SECRET='True'
  7. python3 skf/app.py
  8. Run the manual test first to verify if everything is good
coverage run tests/run.py test
  1. Create your changes and write a unit test, commit and open a PR from your fork to the master repo. All CI test must pass before we accept pull requests.

Development SKF-ANGULAR

  1. Fork and clone https://github.com/blabla1337/skf-flask
  2. cd Angular2
  3. npm install
  4. ng serve --host=0.0.0.0
    OR
    edit the package.json in Angular folder and remove --env=prod example: "start": "ng serve --host=0.0.0.0"
  5. npm start
  6. Run the manual test in the Angular2 dir first to verify if everything is good
npm test
  1. Create your changes and write a unit test, commit and open a PR from your fork to the master repo. All CI test must pass before we accept pull requests.

Testing

TESTING SKF-API
Go to the SKF root dir and run:

export FLASK_APP=skf/app.py
export PYTHONPATH=.:$PYTHONPATH
export FLASK_DEBUG=1
export SKF_JWT_SECRET='True'
coverage run tests/run.py test

TESTING SKF-ANGULAR
Go to the Angular dir in the SKF root dir and run:

npm test

END 2 END TESTING SELENIUM

Testing SKF App End to End with Selenium
We need to start the SKF API first
Go to the SKF root dir and run:

export FLASK_APP=skf/app.py
export PYTHONPATH=.:$PYTHONPATH
export FLASK_DEBUG=1
export SKF_JWT_SECRET='True'
python3 skf/app.py

Now we need to start the SKF Angular
Go to the Angular dir in the SKF root dir and run:

npm start

First we need to download the ChromeDriver for our OS
Always pick the last version available:
http://chromedriver.chromium.org/downloads
Then download your OS driver:
https://chromedriver.storage.googleapis.com/index.html?path=73.0.3683.20/
Unzip it and place it in a good location
Now add it to the Path (Windows):

set PATH=%PATH%;C:\WHERE_I_PUT_THEDRIVER

Or for Mac/Linux add it to the Path:

export PATH=$PATH:/usr/local/bin/WHERE_I_PUT_THEDRIVER

Go to the SKF root dir and run:

export FLASK_APP=skf/app.py
export PYTHONPATH=.:$PYTHONPATH
export FLASK_DEBUG=1
python3 tests/selenium/run.py