Skip to content

Commit ad45100

Browse files
committed
docs(spec): the inbound-hook docblock states what the 404 does and does not hide
An unknown flow and a wrong hook id answer one 404, but the hook is matched before the signature is verified, so the hook id (not the flow name) is what keeps an armed flow unprobeable, and a flow on the default hook id can be probed. A uniform refusal is the hardening card's question. Claude-Session: https://claude.ai/code/session_016njDy8ozy9B9Ns5Y8kAWEK Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6c636dc commit ad45100

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎packages/spec/src/contracts/trigger-api-service.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ export interface ITriggerApiService {
4444
* today, in this order:
4545
* - It looks up the hook armed for `hook.flowName` and compares
4646
* `hook.hookId` with it in constant time. An unknown flow and a wrong
47-
* hook id answer identically, `404 RESOURCE_NOT_FOUND`, so the door is
48-
* no oracle for which flows exist.
47+
* hook id answer identically, `404 RESOURCE_NOT_FOUND`. The hook is
48+
* matched BEFORE the signature is verified, so an unsigned post that
49+
* names an armed flow and its hook id gets the `503` or `401` below
50+
* instead of that `404`: the hook id, not the flow name, is what keeps
51+
* an armed flow unprobeable. A flow left on the default hook id
52+
* (`default`, when its start node's `config.hookId` names none) can be
53+
* probed that way. Whether every unverified post should get one uniform
54+
* refusal is the hardening card's question (#22769), not this contract's.
4955
* - It reads that hook's own secret, at this moment, so a rotation applies
5056
* to the next post. A secret that cannot be read answers
5157
* `503 SERVICE_UNAVAILABLE`. ⛔ It never verifies against no secret.

0 commit comments

Comments
 (0)