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
  • Auth
    none required

Headers

Github-Public-Key-Identifier, string required

Identifier of the GitHub signing key.

Github-Public-Key-Signature, string required

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

Request body

object[] required
token, string required
type, string required
url, string
source, string

Response

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

object[] required
token_hash, string required

Hex SHA-256 of the reported token.

token_type, string required
label, 'true_positive' | 'false_positive' required

Changes

No recorded changes to this operation across all 110 revisions of this API.