Brewless Brewless Docs

Running your application

Running external security scans

Let an agreed scan, such as Thuiswinkel.org or a pentester, test an environment behind Shield, with a narrow exception that ends by itself.

On this page

A certification body such as Thuiswinkel.org, or a pentester you hired, may want to scan your application. With the firewall on, bunny.net Shield blocks or slows down most of what a scanner sends, and the scan says little about the application itself. Turning the firewall off for the scan would open it to everyone.

A scan session is the narrow way in between. For the hours you agreed, Shield lets the scanner's own addresses through, and every other visitor keeps the whole firewall. The session ends by itself at its end time, whether anyone is there or not.

Note

A web application firewall does not replace secure code, vulnerability scans or penetration tests. A scan session is there so the scan tests your application, not to hide what it finds.

Agree on the scan first

Before you request a session, agree on these with whoever scans. The form asks for most of them.

  • Who scans and who to call while it runs.
  • Their addresses: public IP addresses, or ranges no wider than a /24 (IPv4) or a /48 (IPv6), at most 10. Brewless refuses a wildcard, a private address and anything wider: the exception is for the scanner, never for everyone.
  • When: a start and an end, at most 72 hours apart and at most 90 days ahead.
  • How fast: the requests per second you agreed. Brewless records it; it does not enforce it.
  • Which paths: for the record and the report. Shield lets the scanner through on every path.
  • What the WAF does with the scanner (see below).
  • The most replicas the web container may get while the scan runs, so the costs stay predictable.
  • How to stop it: the emergency stop on the Security scans page.

What the WAF does with the scanner

During a session, rate limiting, the challenge and bot detection are off for the scanner's addresses. For the WAF you choose:

Choice What happens to the scanner's requests
The scanner gets past the WAF The WAF neither blocks nor logs them. The scan tests the application itself.
The WAF keeps blocking the scanner The WAF judges them as it judges everyone. The scan tests the application behind the WAF.

Every other visitor keeps the WAF, the rate limit and the rest of Shield in both cases.

Request, approve, run

  1. Open the environment in the console and choose Security scans, then Request a scan. Anyone who may see the applications may ask; nothing changes yet. The form shows what the session can cost at most.
  2. An owner or admin of the organisation approves or rejects it. Owners, admins and whoever asked get a mail at each step.
  3. At the start time, Brewless puts an edge rule named brewless: scan session <id> on the pull zone, with the scanner's addresses as its only trigger, and lowers the web container's maximum replicas to the cap. The dashboard of the environment's overview says that a scan runs.
  4. At the end time, Brewless removes the rule and puts the container's maximum back. A request nobody approved before its end expires.

The start and the end are put on the queue for their minute; once an hour Brewless also looks at every session, starts or ends what the clock passed, and tries again what did not get through. If the rule or the cap is still there more than 10 minutes after the end, owners and admins get a mail once, and Brewless keeps trying every hour.

A deploy while a session runs sets the maximum replicas of brewless.yml again. Brewless then leaves that maximum alone at the end.

A pull zone takes at most 50 edge rules. When yours already has 50, the session has no place for its rule; the operation says so, and the scanner is treated like any other visitor.

Emergency stop

Emergency stop on the Security scans page ends a running or approved session at once and starts removing the rule and the cap. Owners, admins, whoever asked for the session and members who may change the applications can press it. bunny.net takes a moment to spread the change over its edge servers.

Costs

A scan wakes the container and may scale it up. The estimate is the web container at its size, with every replica the cap allows running for the whole session, at Scaleway's list prices. A scan that comes in slower costs less. Without a cap, the container's own maximum counts.

At bunny.net, the scanner's requests count toward the clean requests of the pull zone like those of any other visitor.

The report

Once a session ran, Report on the Security scans page shows:

  • when the exception stood, and whether it was stopped;
  • how long the web container ran in the hours of the session and what that cost at list prices, next to the estimate. An hour counts once it is over;
  • what Shield stopped on the days of the session: WAF matches, rate limit breaches and DDoS requests, read live from bunny.net. bunny.net counts these per day and for the whole pull zone, so they are all visitors of those days, not the scanner alone.

bunny.net does not count requests per address, so the report does not say how many requests the scanner sent.

What Brewless keeps

The scanner's addresses are kept while the session lives. Once it is over, rejected or withdrawn, Brewless forgets them and keeps only their number. The audit trail of the organisation keeps every step: the request with the addresses, the approval or rejection, the start, the rule, the cap, the end or the stop.