Public | Automated Build

Last pushed: a year ago
Short Description
PhantomJS and ZAP owasp to automated security tests
Full Description

This image is intended for automated test security with Codeception BDD.
Currently the ports are fixed, port 4444 for PhanthomJS and port 8090 for ZAP Owasp.

Docker compose config:

  • name: PhantomJS and ZAP security
    docker:
    name: phantomJsZAP
    image: rmrbest/phantomjs-zap
    ports:
    - "4444:4444"
    - "8090:8090"
    

A sample configuration for the acceptance test Codeception would be:

class_name: AcceptanceTester
modules:
enabled:

    - WebDriver:
        url: 'https://172.17.0.1'
        browser: phantomjs
        http_proxy: 'localhost'
        http_proxy_port: '8090'
        capabilities:
          webStorageEnabled: true
          acceptSslCerts: true
    - Asserts
    - \Helper\Acceptance

Using https://packagist.org/packages/zaproxy/php-owasp-zap-v2 library we can do testing:

$this->zap = new \Zap\Zapv2('tcp://127.0.0.1:8090');
$alerts = $this->zap->core->alerts();

$I->assertEquals(0, count($alerts));

Good luck!

Docker Pull Command
Owner
rmrbest
Source Repository

Comments (0)