3 ms·
I'm surprised they are not identifying the service in the token. A lot of services are scanning GitHub for committed tokens, and being able to tell if that toke
by remram 6y ago
I'm surprised they are not identifying the service in the token. A lot of services are scanning GitHub for committed tokens, and being able to tell if that token is a fake/testing one or a real one for a specific company would make those scans more useful.
For example, SendGrid tokens start with "SG", Amazon tokens with "AKIA", etc. Why not build that into the URL scheme?
This scheme will have services stick to well-known unformatted prefixes in the token itself, and prevent small actors from being notified by GitHub and other security scanners.
See also https://news.ycombinator.com/item?id=25016838 https://news.ycombinator.com/item?id=25016838
- advisedwang 6y agoI guess because then you need a registry to keep those strings unique?
- dfox 6y agoThe stated purpose is to allow detection of strings that should not be publicly disclosed. If such string would also plainly identify what it is good for it would essentially defeat the purpose. Ie. the authors want to encourage creation of automated tools that prevent disclosure of such tokens, not encourage creation of automated tools that will harvest such tokens from publicly accessible data.
- danielheath 6y agoYes, but there's also value in services automatically revoking leaked credentials, which is made easier by including such an identifier.
- remram 6y agoThe purpose is to detect secret strings in source code. If you have the source code, the purpose of the secret is easy to figure out.
- acrooks 6y agoCouldn’t you protect against that with something like com-amazon-secret-token?
- remram 6y agoUsing a domain name would have been enough, e.g. secret-token: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 vs secret-token:sendgrid.com/wQsmLe_tnOiByt8JUO4Kro.S_kyH0U2yBC54LHXoUoI4ppe3T5SFsiNmcWiu4xaVt0 Then you could even standardize that scanners should use sendgrid.com/.well-known/revoke-token to notify of secret tokens found in the wild.