Account · Guide
If a key leaks
Keys leak the way all keys do: committed to a public repository, pasted into a ticket, printed in a log. Provenance acts on a leaked key as soon as it's reported, and tells you where it was found and what it did.
Availability: every plan, at no charge.
Before you begin: nothing to set up. Choose what a leaked live key does under Settings → Agents → Takeover protection (revoke at once by default, or tell you only).
1. Know the key formats
New keys end in a 6-character checksum, so a scanner can tell a Provenance key from random text with almost no false matches:
| Key | Format |
|---|---|
| Live API key | prv_ + 32 random characters + a 6-character checksum |
| Sandbox API key | prv_ + 32 random characters + a 6-character checksum |
| Webhook signing secret | whsec_ + 32 random characters + a 6-character checksum |
The checksum is the CRC32 of everything before it (prefix included), written as 6 base62 characters. Keys made before the checksum keep working. The console marks them under Developers → API keys: rotate them so scanners can match them too.
2. See what happens to a leaked key
| What leaked | What Provenance does |
|---|---|
| A live API key | Revokes it at once (or only tells you, if you chose that). |
| A sandbox API key | Tells you. It keeps working, so rotate it, or revoke it if nothing should use it. |
| A webhook signing secret | Rotates it. Deliveries carry a signature from the new secret and, for 24 hours, from the old one, so your receiver can switch without dropping events. |
| An agent signing key's private part | Revokes the signing key and opens a takeover check for the agent with the reason key_. |
Provenance never holds an agent's private key; a report counts only when its private part matches a registered public key.
Owners and admins get an email, a console task and the api_key.leaked webhook, with where the key was found (the URL from the report), what was done, and a link to make a new key. GET / lists your reports.
3. Report a key you found
Anyone can report a Provenance key, without an account. Send the whole key and, if you have it, where you found it:
curl -s -X POST $PROVENANCE_API/v1/public/leaked_keys \
-H "Content-Type: application/json" \
-d '{ "key": "prv_live_notarealkeyatall000000000000000", "url": "https://github.com/example/repo/blob/main/.env" }'
await fetch(`${process.env.PROVENANCE_API}/v1/public/leaked_keys`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ key: foundKey, url: "https://github.com/example/repo/blob/main/.env" }),
});
httpx.post(f"{api}/v1/public/leaked_keys", json={"key": found_key, "url": "https://github.com/example/repo/blob/main/.env"})
{
"object": "leaked_key_report_receipt",
"received": true
}
The answer is always 202 with the same body, whether the key is valid, unknown or already revoked, so the route can't be used to test keys. Each address can report 10 keys an hour.
4. GitHub secret scanning
Provenance receives GitHub's secret scanning reports at POST /v1/public/secret_scanning/github, in GitHub's partner format. It checks GitHub's ECDSA P-256 signature against the keys GitHub publishes before it acts on a report, and answers each match with GitHub's true_positive or false_positive label. A report whose signature doesn't verify changes nothing.
Availability: the endpoint answers 503 secret_scanning_not_configured until GitHub enables scanning for Provenance keys. Until then, report keys with the route in step 3.
Errors you might see
| Code | What to do |
|---|---|
rate_ | Wait for the hour's window to reset, then report again. |
secret_ | Report the key with POST /. |
secret_ | Send the report exactly as GitHub signed it. |
secret_ | The report was held, not trusted. GitHub retries it. |