GithubHelp home page GithubHelp logo

jaspreet99 / zap-webdriver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iriusrisk/zap-webdriver

0.0 0.0 0.0 31.9 MB

Example security tests using Selenium WebDriver and OWASP ZAP

License: Other

Java 100.00%

zap-webdriver's Introduction

zap-webdriver

Example security tests using JUnit, Selenium WebDriver and OWASP ZAP to test the Bodgeit store (https://code.google.com/p/bodgeit/) The tests use selenium to navigate and login to the app, then spider the content with ZAP and perform a security scan using ZAP's scanner. Tests pass or fail based on vulnerabilities found.

Getting started

  1. Download and start the bodgeit store on port 8080
  2. Download and start OWASP ZAP at least version 2.4
  3. In the ZAP Options change the local proxy port to 8888
  4. Download this repository
  5. Look through the src/test/java/net/continuumsecurity/ZapScanTest class and check that the static fields match your setup. In particular, change the CHROME_DRIVER_PATH to point to the chrome driver instance appropriate for your platform, the driver/ directory contains versions for Linux, Mac and Windows.
  6. Run: mvn test

Details

The Selenium steps to navigate the application and submit forms is contained in the MyAppNavigation class. The JUnit testing steps are defined in ZapScanTest. Keeping these two aspects separate makes test maintenance easier. If your testing team already has Selenium code to perform navigation (e.g. Page Objects), you can then drop those in to the MyAppNavigation class.

The ZapScanTest class should be regarded as a starting point for your own test cases and it makes some wild assumptions about which alerts to ignore. If you're going to use these tests as part of a Continuous Integration/Continuous Delivery process then please make sure that the build will fail for important security vulnerabilities.

For a more comprehensive security testing framework with security requirements specified in plain English and many more pre-written tests, consider the BDD-Security framework instead.

zap-webdriver's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.