feat(web-security): add webhook.site API key support to callback tool - #120
Merged
GangGreenTemperTatum merged 1 commit intoAug 13, 2026
Conversation
webhook.site now paywalls token creation (anonymous accounts are rate limited; paid Basic accounts are capped at one token per account). The callback tool now picks up a webhook.site API key from the environment (WEBHOOK_SITE_API_KEY, with WEBHOOKSITE_API_KEY / WEBHOOK_API_KEY as aliases) or a .env file and sends it as the Api-Key header on every webhook.site request. Because paid Basic accounts allow only one token, registration transparently reuses the account's existing token when the per-account cap is hit instead of failing. Anonymous behavior is unchanged when no key is configured, and interactsh remains the fallback provider. - get_callback_url now reports webhook.site auth state (authenticated vs anonymous) - reset_callback clears the cached API key - Added 14 unit tests covering key resolution, auth headers, capped token reuse, and anonymous no-reuse safety - Battle-tested end-to-end against the live webhook.site API
GangGreenTemperTatum
force-pushed
the
ads/cap-1179-add-webhooksite-api-credentials-to-callback-tool
branch
from
August 13, 2026 18:47
1ca34ae to
345312b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
webhook.site now paywalls token creation, which broke the primary OOB callback provider in the web-security capability. This adds API-key support so the callback tool keeps working with a paid webhook.site account, while preserving anonymous behavior and the interactsh fallback when no key is configured.
Verified live against the webhook.site API:
POST /tokenstill returns201but is rate-limited.{"success":false,"error":{"message":"Basic subscriptions can only have 1 URL per account, upgrade to continue"}}.Api-Keyheader to poll (require_auth: true; polling without the key302-redirects).Changes (
tools/callback.py)_resolve_webhook_site_api_key()readsWEBHOOK_SITE_API_KEY(canonical), withWEBHOOKSITE_API_KEYandWEBHOOK_API_KEYas aliases, from env or.env. Follows the same convention as the existing AgentMail tool.Api-Keyon every webhook.site request (create, list, poll)._reuse_webhook_site_token()lists the account's tokens and adopts the existing one instead of failing.get_callback_urlnow reportswebhook_site (authenticated)vs(anonymous);reset_callbackclears the cached key.Testing
check_callbacksretrieval; the capped-account reuse path; and the anonymous path — all verified against the real API.ruffclean oncallback.py(the 2 pre-existingE402in the test file come from the intentionalsys.pathsetup and are unrelated).Docs
agents/web-security.mdto documentWEBHOOK_SITE_API_KEYand the Basic-tier token-reuse behavior.