Skip to content

Automatically respond to crates.io API token leaks on GitHub (via GitHub secret scanning) #3400

@greysteil

Description

@greysteil

Is your feature request related to a problem? Please describe.
Token leaks happen. There's been previous discussion about avoiding them in cargo but I couldn't find any discussion about automatically responding to them.

I'd like crates.io to automatically revoke any credentials that are leaked into a GitHub public repo. I run the GitHub secret scanning team, so I can provide you with a feed of potential matches we find in public repos, if you're willing to take action on them automatically.

We have a similar setup with folks like AWS - if you leak your AWS credentials on GitHub you'll quickly get an email from AWS saying the credential has been quarantined. Under the hood, they're receiving the feed of matches from GitHub.

Describe the solution you'd like
crates.io would have an endpoint for receiving details of leaked secrets from GitHub, following the specification here. crates.io would automatically revoke leaked secrets, and would email their owners to notify them that they had been revoked. The email would include details of where the secret had been exposed (as provided by GitHub).

Describe alternatives you've considered
crates.io could notify users of leaked secrets, but not automatically revoke them. However, this would leave leaked credentials exposed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-backend ⚙️C-enhancement ✨Category: Adding new behavior or a change to the way an existing feature works

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions