Webhooks

Revoke service keys that GitHub secret scanning reports as leaked

GitHub secret-scanning partner callback (#1147). Mounted only when GITHUB_SECRET_SCANNING_ALERTS_ENABLED=true; otherwise 404. There is no bearer session. GitHub signs the exact raw request bytes with an ECDSA P-256 key named in Github-Public-Key-Identifier; the key is fetched from https://api.github.com/meta/public_keys/secret_scanning and the signature is verified before the body is parsed. Only a token that parses as the mdn_svc_v1_ service format (checksum included) and matches its stored hash exactly is revoked; every other token is labelled false_positive and nothing changes. Repeat deliveries are idempotent. Token values are never logged or echoed; the response carries SHA-256 hashes.

post/webhooks/github/secret-scanning

Request

  • Base URL: https://api.medianfi.com/api/v1
  • URL: https://api.medianfi.com/api/v1/webhooks/github/secret-scanning
  • Auth: none required

Headers

Github-Public-Key-Identifierstring required

Identifier of the GitHub signing key.

Github-Public-Key-Signaturestring required

Base64 DER ECDSA (SHA-256) signature over the raw body.

Request body

tokenstring required
typestring required
urlstring
sourcestring

Response

Token analysis, one entry per distinct token (GitHub partner response format).

token_hashstring required

Hex SHA-256 of the reported token.

token_typestring required
label'true_positive' | 'false_positive' required

Changes

No recorded changes to this operation across all 1 revision of this API.