Dockerfile Optimizations for DAST and Browserker

To make the Dockerfile more clean and smaller:

  • Replace Firefox with Chrome (for Browserker)
  • Don't use Ubuntu as the base image (a slim version of Debian would be preferred)

Technical Details

Replace Firefox with Chrome

  1. Leave Firefox on the Docker image (for now)
  2. Configure ZAP Crawljax to use Chrome, not Firefox.
    • it's not clear yet how this is done - probably start by looking for options we can pass to ZAP in ZAPServer
    • This should be under the feature flag. i.e.
         if config.dast_major_version > 1
              selenium = "--selenium... chrome"
         else 
              selenium = "--selenium... firefox"   
  3. Ensure ZapWebdriver uses Chrome, not Firefox.

Use Debian, not Ubuntu

  1. Create a Future release of Browserker. Follow the example in gitlab-org/security-products/dast!373 (merged)
    • This might already be done by the time this issue is worked on
  2. Update the future release of Browserker to use Debian, not Ubuntu (more on this in a moment).
  3. Update the build future DAST job to depend on the future release of Browserker, i.e.
    script:
       ...
       - docker build --build-arg BUILDING_FOR=future --build-arg=$BROWSERKER_IMAGE -t $IMAGE .
       ...
    variables:
       BROWSERKER_IMAGE="registry.gitlab.com/gitlab-org/security-products/analyzers/dast/browserker:1.0.0-alpha"
  4. Write an end-to-end test that only runs on CI and runs a smoke test of the DAST alpha image running Chrome/Debian

To do

Edited by Avielle Wolfe