Disclosing Monitoring Bots
A bot that checks websites should be easy to recognize, slow enough to never be a burden, limited to what it was allowed to check, and one email away from a person who can stop it. This draft says how, using parts the web already has, and it is the rule GOVW Foundation's own checkers, the ants, follow.
User-Agent and From headers, the Retry-After header), RFC 9309 (robots.txt), RFC 6585 (429 Too Many Requests), RFC 9116 (security.txt), and the AWS customer policy for security testing.1Goals
- Recognizable: anyone reading a server log can tell who sent a request and where to read about it.
- Gentle: the bot never adds noticeable load, and it backs off when asked.
- In scope: it checks only sites its operator owns or was allowed in writing to check.
- Reachable: a person can be contacted, and a site can opt out.
Not a goal: load testing or attack simulation. Those need their own plan, a time box, and the host's approval.
2Say who you are
Every request MUST carry a User-Agent with the bot's name, its version, and a link to a page that describes it, in the form search engines already use:
User-Agent: GOVW-Ant2/0.3 (+https://alpq.us/specs/bots/)
From: security@govw.org
The From header (RFC 9110, section 10.1.2) SHOULD give a mailbox a person reads. The bot MUST NOT pretend to be a browser or another bot.
3Visit gently
- At most 1 request per second to the same host, one request at a time.
- At most 200 requests per host per day, unless the site owner agrees to more in writing.
- On
429or503, wait as long asRetry-Aftersays; with noRetry-After, wait at least 60 seconds. After 3 errors in a row from one host, stop for the day and report it. - Runs SHOULD be scheduled at quiet hours for the site's audience and announced in the operator's own channel.
4Check only what you may
- Your own sites: the operator MAY check anything listed in its own inventory. robots.txt rules meant for search engines MAY be skipped there, because the owner has agreed.
- Anyone else's site: only with written permission, and robots.txt MUST be honored (RFC 9309).
- The hosting provider: before checking sites on a provider's platform, read its testing policy. Where the service isn't pre-approved, ask first: say what will be checked, how often, and link this page. On AWS, Amplify is not on the pre-approved list, so GOVW asks before its ants check Amplify-hosted sites.
5Harmless probes only
A monitoring bot reads; it does not break things. It MAY send one harmless test request per site per day to confirm that the site's own protections answer as expected (for example, that a firewall refuses a textbook test pattern with 403), and only on the operator's own sites.
It MUST NOT: flood or load-test a site; try to take over subdomains, buckets or accounts; guess or reuse passwords; submit forms that send messages or charge money; or store anything personal it happens to see.
6A person, and a way out
- The page linked from the
User-AgentMUST name the operator, what the bot checks, how often, and a contact. - A site owner who writes to that contact asking to be left out MUST be removed within one business day, and gets a reply saying so.
- The operator SHOULD publish a
security.txt(RFC 9116) on the same domain as that page. - If the bot runs from shared cloud addresses (for example, GitHub Actions), the page SHOULD say so, since its IP addresses won't be fixed.
7Proving it's really you (later)
Anyone can copy a User-Agent. A later version of this draft will add signed requests, so a site can verify a request really came from the named bot. Candidates are HTTP Message Signatures (RFC 9421) and the IETF work on authenticating web bots that builds on it. Until then, the contact and the published schedule are the check.
8The GOVW ant colony
GOVW Foundation checks its own sites every day with a small colony of bots, the ants. Each has one job, and when one finds a problem it turns into a fire ant until a person fixes it. You can watch them forage at ant0.org.
| Ant | Checks | When |
|---|---|---|
| Ant0, the scout | A new release on its test site, before it goes live | After each deploy |
| Ant1 | Pages, files, redirects and every link answer as they should | Daily, 11:17 UTC |
| Ant2 | Security headers, certificates, DNS records, mail security (MTA-STS), forgotten records that could be taken over | Daily, 11:17 UTC |
| Ant3 | Wording rules on public pages | Daily, 11:17 UTC |
They run from GitHub Actions, check only GOVW Foundation's own domains, and follow this page. To reach a person: security@govw.org.
9Open questions
- Are 1 request per second and 200 a day the right defaults for small sites?
- Should a site be able to opt out with a robots.txt line for the bot's name as well as by email?
- Which signing approach to adopt first.