Skip to content

caddy: refuse the AI crawler that pegged forgejo - #1448

Merged
aaylward merged 1 commit into
mainfrom
forgejo-crawler-guards
Aug 24, 2026
Merged

caddy: refuse the AI crawler that pegged forgejo#1448
aaylward merged 1 commit into
mainfrom
forgejo-crawler-guards

Conversation

@aaylward

@aaylward aaylward commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Closes #1447, which has the analysis and the logs.

git.muchq.com now 403s the meta-externalagent User-Agent, 57.141.0.0/16, and any self-identified crawler on the six routes that fork git. The first two overlap on purpose — the agent self-identifies today and may stop, the range is Meta's today and may move.

Replaying the 23,788 requests from the incident windows against the rules refuses 23,670 of them and removes 53,117 of 53,120 server-seconds; what survives is browser assets and issue pages, and no browser User-Agent matches. Only HTTP is affected — git over SSH reaches Forgejo on port 222 without passing through Caddy.

Deliberately left open: /issues/ and /raw/, a database read and a file read, worth more indexed than blocked. The Postgres suites skipped locally with the URLs unset, so CI is their first run.

@aaylward
aaylward force-pushed the forgejo-crawler-guards branch from dfddaec to 61b8489 Compare August 24, 2026 21:37
meta-externalagent held forgejo against its 0.5-CPU cap for hours, crawling
the git-backed routes from ~70 addresses in 57.141.0.0/16. robots.txt is not
the lever: Forgejo serves one disallowing /*/*/src/ and /user/, and the
crawler requests both anyway.

git.muchq.com now 403s that User-Agent, that subnet, and any self-identified
crawler on the six routes that fork git.
@aaylward
aaylward force-pushed the forgejo-crawler-guards branch from 61b8489 to ebccae3 Compare August 24, 2026 21:41
@aaylward
aaylward enabled auto-merge (squash) August 24, 2026 21:52
@aaylward
aaylward disabled auto-merge August 24, 2026 21:57
@aaylward
aaylward merged commit 337542d into main Aug 24, 2026
20 checks passed
@aaylward
aaylward deleted the forgejo-crawler-guards branch August 24, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

forgejo pegged at its CPU cap for hours: meta-externalagent crawling the git-backed routes

1 participant