Documentation
¶
Overview ¶
Command fptraffic records the traffic of a real application as a HAR file, for the false-positive run (hack/fp-run.sh, make fp-run; #600). The application is OWASP Juice Shop (https://github.com/juice-shop/juice-shop, MIT), an online shop with an Angular front end and a REST API: fptraffic plays a few shoppers, each with the requests the shop's front end sends, in a browser's order and with a browser's headers. They load the pages and assets, register, answer a security question, log in, search, read and write product reviews, fill and change a basket, add an address and a card, check out, track the order, send feedback through the captcha, ask the chat bot, upload a complaint and a photo, change their password and export their data. Every request is one a user of the shop sends: the denials of a policy on this traffic are its false positives.
It records the requests only, with the response's status: no response body (the shop's content) is in the file. Free text (reviews, feedback, searches, chat) is drawn from the lists below with a fixed seed, so a recording against the same Juice Shop version has the same requests, apart from IDs and tokens the shop hands out.
docker run --rm -d -p 3000:3000 bkimminich/juice-shop:<JUICE_SHOP_VERSION> go run ./hack/fptraffic -target http://127.0.0.1:3000 -out hack/fptraffic/juice-shop.har.gz
make fp-har runs both (hack/fptraffic/record.sh), with the version in hack/versions.env, on a new shop.