Independent re-verification of §12.3: GlitchTip 6.2.5, second lane
Why this file exists. §12.3 (unknown 3 / §10 row 5) is the one measurement of the three that is a source read, not a running observation, no GlitchTip was deployed for it, by design (the mission asked for the API surface read from source, no deploy). A source read is only as good as its citations, so this lane re-cloned the tag from scratch and checked every line number the appendix prints. Rows 1 and 3 needed no re-run: their evidence is container logs and HTTP responses committed beside this file, which a second reading cannot strengthen.
Corpus
Section titled “Corpus”git clone --depth 1 --branch v6.2.5 https://gitlab.com/glitchtip/glitchtip-backend.gitgit rev-parse HEAD -> dc9b50a3ad29dffcab036b9b788ce43974e020a3git describe --tags -> v6.2.5Fresh clone, no relation to whatever the first session read.
Citation check: every claim in §12.3
Section titled “Citation check: every claim in §12.3”| §12.3 claim | Command | Result | Verdict |
|---|---|---|---|
routes + scopes, apps/alerts/api.py 44/62/100/149/172 | grep -n "router.get|router.post|router.put|router.delete|has_permission" apps/alerts/api.py | 44:@router.get / 49:@has_permission(["project:read","project:write","project:admin"]) / 62:@router.post / 67:@has_permission(["project:write","project:admin"]) / 100:@router.put / 105: same / 149:@router.delete / 153:@has_permission(["project:admin"]) / 172:@router.post (…/test/) / 177: write|admin | exact |
RecipientType.GENERAL_WEBHOOK, constants.py:9 | grep -n GENERAL_WEBHOOK apps/alerts/constants.py | 9: GENERAL_WEBHOOK = "webhook", _("General Slack-compatible webhook") | exact |
unique_together, models.py:44 | grep -n unique_together apps/alerts/models.py | 44: unique_together = ("alert", "recipient_type", "url") | exact |
SSRF flag default False, settings.py:304 | grep -n "GLITCHTIP_ALLOW_PRIVATE_IPS = " glitchtip/settings.py | 304:GLITCHTIP_ALLOW_PRIVATE_IPS = env.bool("GLITCHTIP_ALLOW_PRIVATE_IPS", False) | exact (this is §10 row 2, settled from source rather than the proposed docker run probe) |
creation-time URL validation, schema.py:41–45 | grep -n "validate_public_url|_validate_recipient_url" apps/alerts/schema.py | 8:from glitchtip.url_validation import validate_public_url, 14:def _validate_recipient_url, 16: validate_public_url(str(url), allow_private=settings.GLITCHTIP_ALLOW_PRIVATE_IPS), applied at 45: and 60: via @field_validator("url") (42–45) | holds |
send-time recheck + no redirects, webhooks.py:19–48 | grep -n "_is_url_allowed|allow_redirects" apps/alerts/webhooks.py | 19:async def _is_url_allowed, 42:if not await _is_url_allowed(url), 48:session.post(url, allow_redirects=False, **kwargs) | exact; the “checked twice” claim verifies |
payload shape text first | grep -n -A4 "class WebhookPayload" apps/alerts/webhooks.py | 115:class WebhookPayload: / 116: text: str / 117: attachments: list[WebhookAttachment] | None | exact, the zero-transform fit to hookshot’s transformHookData |
PUT upsert, api.py:126–142 | grep -n aupdate_or_create apps/alerts/api.py | 136: new_recipient, created = await AlertRecipient.objects.aupdate_or_create(**lookup, defaults=prepared), lookup keyed on alert/recipient_type/url, absent recipients deleted after the loop | holds |
router mounted at prefix 0 under api/ | grep -n 'add_router("0", alerts_router)' glitchtip/api/api.py ; grep -n 'path("api/", api.urls)' glitchtip/urls.py | 58: and 43: respectively | exact |
Bearer APIToken auth, 64-char, BitField scopes | grep -n "class TokenAuth" glitchtip/api/authentication.py ; apps/api_tokens/models.py | 44:class TokenAuth(HttpBearer); 15:class APIToken(CreatedModel), 21: max_length=64, unique=True, editable=False, default=generate_token, 25: scopes = BitField( | holds (§12.3 cites models.py:15 for the model, exact) |
| scope check applies to token auth only | sed -n '19,24p' glitchtip/api/permissions.py | 20: if request.auth.auth_type == "token": then the scope test; session auth falls through unconditionally | exact |
Verdict: §12.3 re-verifies with zero corrections. Every line number is either exact or inside the range printed. No claim was found overstated.
What this file does NOT upgrade
Section titled “What this file does NOT upgrade”It is still a source read. Nothing here was executed against a running
GlitchTip: no token was minted, no POST …/alerts/ was issued, no recipient
was created, and no delivery was attempted. The API shape is measured; the
API’s behaviour under a plug’s credentials is not, and the token-minting
path a headless plug would need is not even read (see the readiness doc’s
open-unknowns list, item 8).