Live data from Hacker News

Toyota suffered a data breach by accidentally exposing a secret key on GitHub

blog.gitguardian.com

151–160 of 272 posts

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#151

Earlier quoted context omitted.

GitGuardian actually does this, it monitors an extended perimeter of devs and their personal/open-source repos for corporate secrets or keywords – https://www.gitguardian.com/monitor-public-github-for-secret...

Yeah, because as an employee what I totally want is my employer to monitor my every digital move outside of work!

[deleted]

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#152

The access model on platforms like GitHub is flawed, a single account can be used for both professional and personal projects/repositories, leading to “fat finger” errors like this one here...

Absolutely this!

The fact that no one bats an eye that GitHub is used to store proprietary source code is so surprising to me. Conversely if that is what it is meant for, why does it default to autocompleting to all users globally instead of my org (even on the enterprise version.) why hasn’t this been fixed for years.

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#153

The access model on platforms like GitHub is flawed, a single account can be used for both professional and personal projects/repositories, leading to “fat finger” errors like this one here...

Do you have a source that this is a "fat finger" error?

I've had contractors publish my code to public Github repos to showcase their work for their next job. Even after emailing them multiple times, I kept finding my code in github with companies emailing me asking for a referral to this person...

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#154

Earlier quoted context omitted.

I actually had something similar happen to me last month. I accidentally published a discord API key to GitHub and within minutes I got a nice message from “Safety Jim” to my personal discord account letting me know they’ve found my key on a public repo and have gone ahead and revoked it. I felt like a bit of a dope but it was neat to have it happen to me. Lesson learned for sure.

GitHub PM here. Glad that was a good experience! We work with ~50 partners (details in the link below) to notify them when tokens for their service are exposed in public repos, so that they can notify you. https://docs.github.com/en/code-security/secret-scanning/sec...

I had a couple questions, as this feature is awesome!

How long does it take to get the response vs external bots pulling the data? What mechanisms does GitHub have in place to stop bots who monitor repo changes? I ask, as I have been there and it is super scary how fast someone/bot pulls repo data changes, as in minutes, and the repo we had back then was not popular.

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#155
There are software such as Trufflehog ( https://github.com/trufflesecurity/trufflehog ), that find secrets. We are using it at an organizational level, but there's always some delay from finding something and getting it reported. I've been meaning to add it both to our CI so our team can notice right away, and even to Git push hooks, to catch these cases early.

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#156
post #89

Question: Let's say I want to open source my app but a long time ago I used to have credentials hard coded. What can I do to clean this up from history?

make a new repo starting with the code in its current state.

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#157

Earlier quoted context omitted.

GitHub PM here. Glad that was a good experience! We work with ~50 partners (details in the link below) to notify them when tokens for their service are exposed in public repos, so that they can notify you. https://docs.github.com/en/code-security/secret-scanning/sec...

Awesome feature. Saved the day for us some months back when an AWS token was accidentally committed and pushed. (AWS itself also immediately notified us.)

Rant time: this isn’t directed at you. I am just replying to your comment because you said something that triggered me.

Also the “you” below is the generic you - not you personally.

Disclaimer: I work at AWS in Professional Services, all rants are my own.

Now with that out of the way, I hate the fact that there are way too many code samples floating around on the internet that have you explicitly put your access key and secret key in the initialization code for the AWS SDK.

    s3 = boto3.resource(‘s3’,aws_accesskey_id=ccxx,aws_secret_access_key_id=cccc)
Even if you put the access keys in a separate config file in your repo, this is wrong, unnecessary, and can easily lead to checking credentials in.

When all they have to do is

s3=boto3.resource(‘s3’)

All of the SDKs will automatically find your credentials locally in your .config file that is in your home directory when you run “aws configure”.

But really, you shouldn’t do that, you should use temporary access keys.

When you do get ready to run on AWS, the SDK will automatically get the credentials from the attached role.

Even when I’m integrating AWS with Azure DevOps, Microsoft provides a separate secure store that you can attach to your pipeline for your AWS credentials.

Re: Toyota suffered a data breach by accidentally exposing a secret key on GitHub

#159

The access model on platforms like GitHub is flawed, a single account can be used for both professional and personal projects/repositories, leading to “fat finger” errors like this one here...

Not really? You shouldn't be checking in secrets, period.

You shouldn't, but clearly people make this mistake all the time. I caught one last week. Security in depth is valuable.
Post reply on HN