How can we integrate Owasp ZAP & Cypress?

Viewed 1220

Is there any way we can integrate Owasp Zap security testing tool with Cypress?

1 Answers

I created a working demo of how this may be possible here - https://github.com/el-davo/cypress-zap.

Basically when you run "yarn test" the zap attack proxy gets started, then cypress starts and we tell it to send all its traffic through the proxy by passing this environment variable

HTTP_PROXY=http://localhost:8080 NO_PROXY=\"<-loopback>\"

Once the cypress tests have run then cypress waits for the attack proxy to complete its work, once zap has completed the tests shut down and a report is generated. Note this repo currently only works on linux but can easily be modified to work on windows

Related