
Image: GitHub
Why it mattersA team that was warning its developers to rotate an Anthropic key after a commit now has that commit refused at push time, which closes a window during which the key sat in a mirror or a fork.
A commit that contains an Anthropic API key cannot be pushed to a GitHub repository with secret scanning enabled any more. GitHub added anthropic_service_api_key and anthropic_user_api_key to the detectors that push protection runs by default, so a developer who accidentally embeds either kind of key in code, in a notebook, or in a commit message is stopped at git push with an error, before the key reaches the hosted repository.
The change is live and applies to any repository on GitHub.com with secret scanning turned on, which includes free public repositories as well as paid plans. GitHub also added detection for a Cloudsmith API key and for Salesforce Marketing Cloud OAuth2 tokens in the same release, both as new detectors rather than push blocks.
What default push protection actually does
Default push protection means two things, and both are useful. First, a developer attempting to push a commit with a detected key sees a block at the client, with the file and line of the finding and either a prompt to remove the key or a one-off bypass that is logged. Second, a repository administrator who wants to let a particular key through, for example a honeypot or a test fixture, can file an exception rather than turn off the whole detector.
The default-on behaviour is a stronger setting than the alert-on-detection one it replaces for Anthropic keys. The alert catches a key after it has already landed in the repository and starts the clock on a rotation; the block refuses the push and keeps the key out. For a public repository the two outcomes are different: a key that reaches a public commit has already been copied by every crawler, mirror, and fork that watches the repository, and rotating it is the only safe response. The push block closes that window.
The Salesforce addition is a different model
The Salesforce detection is a partner integration rather than a push block. When GitHub finds a Salesforce Marketing Cloud OAuth2 token in a public repository, it forwards the detection to Salesforce, which revokes or rotates the token on its end. The developer still gets the standard alert on GitHub's side, but the vendor is in the loop as well. GitHub has run this partnership pattern with other providers for several years; Salesforce is the newest addition to the list.
For a team on an Anthropic subscription or an API account, the practical move is to confirm that secret scanning is on for every repository, including private ones, before anyone tries to push a commit that would have slipped through a week ago. The block ships enabled by default on new repositories, but a repository that pre-dates the Anthropic detectors keeps its earlier configuration. GitHub's documentation on how to turn secret scanning on at the organisation level still applies.
The step after that is to tell every developer on the team what the block looks like, so a push that fails on an Anthropic key reads as the correct outcome rather than as a mysterious tool error. A block at push time is cheaper to fix than a key leaked to a public mirror, but only if the person who hit the block knows what to do next.
Source
Secret scanning blocks Anthropic keys by default, adds Salesforce, on the GitHub changelog.
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.


