Profiles
The lab learns about your product from a profile: one short TOML file that describes your product as a target. Nobody writes code to plug a product into the lab. The profile says what the product is, how to reach it, what people do with it, what must always be true, what it claims, and what must never be touched. In a managed engagement we write the profile with you, starting from a draft a tool builds by looking at your site.
This page walks through a profile using the toybox as the example. The toybox is the lab's own deliberately breakable product: a small notes application with accounts, two tenants, orders, a payment webhook, a scheduled job and a classifier. It has twenty-two planted bugs, each one a switch that turns on a real kind of mistake, and the checks prove themselves against them. See Checks.
The profile's shape is fixed and strict. An unknown section name is an error, not something silently ignored, and once the file parses, every problem the checker finds is reported at once.
Who the target is
Every profile starts by naming the target.
[target]
id = "toybox"
name = "Toybox"
kind = "product"
surfaces = ["web", "api"]
The id is short, lower case, and used in the names of runs. The kind is a product, a process, an agent or infrastructure. The surfaces say where people meet it, such as the web and an API. The profile also names the company that owns the target, which the lab uses to keep its judges independent of the thing being judged.
How to reach it
The stage section says how the lab gets a running copy. For the toybox, the lab builds and starts it itself, on its own ports, and waits for its health address to answer.
[stage]
kind = "loopback"
health = "/healthz"
[stage.base_urls]
web = "http://127.0.0.1:{port:web}"
The lab can start a product's own processes, run its own start and stop scripts, or point at your own staging site once you have proven you own it (see Getting started). Running a product inside a throwaway virtual machine is planned for later.
Roles and routes
Roles are the kinds of account your product has, and which tenant each belongs to. The toybox has two tenants, each with an administrator and an ordinary member.
[[role]]
name = "admin_a"
tenant = "a"
[[role]]
name = "user_b"
tenant = "b"
Routes are the addresses your product answers, who may call each one, and whether its data belongs to a tenant.
[[routes.route]]
method = "GET"
path = "/api/notes/{id}"
allow = ["admin_a", "user_a", "admin_b", "user_b"]
tenant_scoped = true
An empty allow list means a route is public. A placeholder for an id is filled with records the roles create.
Isolation roles
To test isolation, the lab needs to know how to make an account for each role and how each role creates a record of its own. The profile gives a short recipe for each: sign up, follow the confirmation link from the captured mail, log in, and keep the token. It also gives an id that is guaranteed not to exist.
With that in place, the isolation check calls every route that takes an id, as every role, against every other role's record. It checks that each role can still read its own records, that reading another tenant's record is refused, that the refusal looks exactly like the refusal for a record that does not exist, that each route's allow list is enforced, and that anonymous callers are refused. A difference between those two refusals is an existence leak: it tells an attacker which records are real.
Journeys
Journeys are what a person actually does with your product, written as one small file each. The profile names where they are and which matter most.
[journeys]
dir = "journeys"
top = ["signup-verify-login", "reset-password", "notes-own-tenant"]
A journey is a list of steps. A step makes a request, waits for a mail and pulls a link out of it, drives a page in a real browser, lets time pass, or invents a fresh test email address and password. A step can say what it expects back and capture values for later steps. Here is the start of the toybox's sign-up journey.
id = "signup-verify-login"
title = "Someone signs up, confirms their address by mail, and signs in"
[[step]]
name = "sign up"
http = { method = "POST", path = "/api/signup", json = { email = "{{email}}", password = "{{password}}" } }
expect = { status = 201 }
[[step]]
name = "the confirmation mail arrives"
mail = { to = "{{email}}", subject_contains = "Confirm", capture_link_as = "verify_link" }
Each journey becomes exactly one finding. A failure names the step, what was expected, what came back, and a curl line that reproduces it, with tokens named rather than printed. Passwords the lab invents are hidden from the evidence the moment they exist. Your own test suites can be wrapped as well, so their results land in the same evidence trail.
Invariants
Invariants are things that must always be true about your product's own data and behaviour. Each one is a read-only database query, one recorded web request, or a command, with a sentence describing it that is read aloud in reports. Here is one of the toybox's.
[[invariant]]
id = "one-charge-per-order"
description = "Every order has exactly one charge, for the amount of the order."
kind = "sql"
blocking = true
A request invariant can be made as a particular account, so a question such as what each tier of customer may see can actually be decided. An invariant the lab cannot carry out, because a database is unreachable for example, comes back inconclusive. It never passes silently.
Claims
The claims section lists what your product must never say, what it must always say, and where to look.
[claims]
paths = ["/", "/about", "/pricing", "/app"]
forbidden = ["certified secure", "guaranteed uptime"]
required = ["Toybox is a test application"]
The lab reads the pages, scripts and compiled web modules it reaches from those paths, up to two hundred and two links deep. A claims register can also list approved and retired claims, and a retired claim that still appears anywhere is a failure. Your terms and privacy pages can be exempted from the forbidden phrases, since they often quote them on purpose.
The edge
The edge section describes your deployed front door: the security headers every page must carry, old hosts that should redirect, and pages that must load cleanly in a real browser under their own content security policy.
[edge]
paths = ["/", "/pricing", "/app", "/api/me"]
required_headers = ["strict-transport-security", "x-frame-options", "x-content-type-options", "referrer-policy", "content-security-policy"]
browser_pages = ["/app"]
Mail and payments
If your product sends mail, the profile names the settings it reads for its mail server, and the lab points them at its own capture server for the run. Mail is accepted only for reserved test domains, so a product that would have mailed a real person fails loudly instead.
If your product takes payments, the profile names the webhook address and the setting your product reads its signing secret from. The lab sets a fresh signing secret for every run, and works only in the payment provider's test mode.
Never touch
The never-touch section is your list of what the lab must leave alone.
[never_touch]
hosts = ["toybox.example"]
paths = ["{run_dir}/work/never-touch.txt"]
Hosts are production names. The guard refuses every request to them and to their sub-domains. Files, directories and SQLite databases listed here are fingerprinted before the run and again after it, and any change is a critical failure. This is the untouched proof, described in Evidence.
Secrets
A profile never contains a secret. Where a check needs one, the profile names where the secret is kept, and the lab reads it only at the moment of use. The profile loader refuses a secret entry that holds what looks like a key instead of a file path.
Gate modes
The gate turns a run's findings into one decision.
[gate]
mode = "report"
block = []
report = []
In report mode, which is where every target starts, the gate never fails a run. The verdict is pass when nothing failed and every check that matters decided, and report otherwise.
In block mode, a run fails when any failing finding is marked blocking or matches a pattern in the block list, unless it also matches a pattern in the report list, which always wins. Block mode with failures that block nothing gives report, not pass. Patterns name a check, or a check and the kind of failure, so you can block on every isolation failure but only report on missing headers. A good way to start is report mode, with the checks you intend to block on written into the report list, ready to move across.
Checking a profile
When a profile loads, every problem the checker finds is listed at once, in a sentence each. If a run reports a problem with the setup rather than with your product, such as a wrong address or a missing setting, we fix the profile and run again. Apart from the ownership record you publish to prove the site is yours, the lab never asks you to change your product to suit it.