News for hackers. Stuff that matters.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by tough on Thursday October 13, 2022 @06:57PM (#33197559)
Is this really expensive? We're a small startup providing API keys, to our customers.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by greysteil on Thursday October 13, 2022 @07:16PM (#33197721)
It's totally free - there are details of how to join the program at https://docs.github.com/en/developers/overview/secret-scanni...
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by josephg on Thursday October 13, 2022 @08:12PM (#33198165)
Hm - this would work better if keys were easy to scan with regular expressions.

Next time I implement api keys I wonder if it’s worth going out of my way to make them easy to identify. Eg, by prefixing every key with a few well known characters. Like FMLA_xxxxx for a fastmail app key.

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by crazysim on Thursday October 13, 2022 @08:27PM (#33198274)
That's exactly what GitHub did with their own keys and their new keys fit this format.

https://github.blog/2021-04-05-behind-githubs-new-authentica...

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by tough on Thursday October 13, 2022 @09:00PM (#33198477)
I just implemented our API with a PREFIX_KEY so our self-hosted customers can change it they want to.

We will be applying thanks for sharing greystell

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by nijave on Thursday October 13, 2022 @09:43PM (#33198698)
Some services also use prefixes to provide additional context like account type and token validity length. I think Slack does this (service accounts have different prefixes than user accounts and I think temporary tokens have another prefix)
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by nmjenkins on Friday October 14, 2022 @12:22AM (#33199599)
If you go make an API key in Fastmail (Settings -> Password & Security -> API tokens), you'll see that it's prefixed very similarly to that (e.g. `fmo1-`) for this very reason! (There are some other neat things about our API key format I'd be happy to tell you about sometime if you're interested.)
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by josephg on Friday October 14, 2022 @04:10AM (#33200873)
Hah I just used that as the first example which came to mind.

Yeah absolutely - I'd love to hear about it!

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by fragmede on Friday October 14, 2022 @02:41AM (#33200298)
It's absolutely worth it, for everyone's sanity involved.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by tialaramex on Thursday October 13, 2022 @07:22PM (#33197785)
I would imagine the main expense for you will be your implementation cost:

https://docs.github.com/en/developers/overview/secret-scanni...

Your dev team would probably be able to give that a glance and estimate the work.