fptraffic

command
v0.7.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 23 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, #707). It plays a few users of the application, each with the requests its front end (or its API clients) sends, in a browser's order and with a browser's headers. Every request is one a user of the application sends: the denials of a policy on this traffic are its false positives. The applications (-app), each in its own file:

  • juice-shop: OWASP Juice Shop, an online shop with an Angular front end and a REST API (juiceshop.go).
  • gitea: Gitea, a code forge: its web UI and its REST API, with Markdown issues and comments, code and attachments (gitea.go).
  • wordpress: WordPress, a CMS: its admin, the block editor's REST calls, media uploads, comments and searches (wordpress.go).
  • directus: Directus, a headless CMS's JSON API: REST with JSON filters, GraphQL, file uploads (directus.go).

It records the requests only, with the response's status: no response body (the application's content) is in the file, and the address it was sent to is replaced by -public-url everywhere in the requests. Free text (reviews, posts, issues, searches) is drawn from fixed lists with a fixed seed, so a recording against the same version has the same requests, apart from IDs, nonces and tokens the application hands out. Passwords are the made-up users' own; sessions and tokens are the throwaway ones of the recording's container.

docker run --rm -d -p 3000:3000 bkimminich/juice-shop:<JUICE_SHOP_VERSION>
go run ./hack/fptraffic -app juice-shop -target http://127.0.0.1:3000 -out hack/fptraffic/juice-shop.har.gz

make fp-har runs both (hack/fptraffic/record.sh, APP=<app>), with the versions in hack/versions.env, on a new application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL