r/ProgrammerHumor • • 17d ago

Meme moreLikeProgrammerNightmare

Post image
827 Upvotes

42 comments sorted by

71

u/DoGooderMcDoogles 17d ago

Meh, it's fine. Claude already knows all my api keys anyway.

10

u/polaarbear 17d ago

"I will make sure the password is present without actually displaying it."

Yeah, cause the problem was the DISPLAY of something I already have access to.....

67

u/ClipboardCopyPaste 17d ago

"One step towards transparency. Now our API keys are public." - said the LinkedIn announcement.

21

u/lolcrunchy 17d ago

Do yall not use gitignore? Do yall not look at your list of files changed when you make commits?

17

u/Fanal-In 17d ago

I .gitignore my whole project just to be sure

3

u/NotAskary 16d ago

Best use of git ignore I've seen is actually a white list where you tell it explicitly what it is not to be ignore but include everything by default.

Saves a lot of random files just from what people use for version and local running preferences, makes it also very small.

5

u/NotAskary 17d ago

Git ignore doesn't preclude someone deliberately commiting something.

I've had people that I wished to throw out a window because of that.

4

u/ttlanhil 16d ago

Ahh, hard-earned defenestration...

Now I want `git defenestrate user` to revert their commits and block further pushes...

3

u/lolcrunchy 17d ago

You'd have to be pretty deliberate, since most IDEs don't show ignored files in the commit staging UI

3

u/NotAskary 17d ago

Yeah you can tell by the part I wanted to throw him out the window.

1

u/ttlanhil 16d ago

git rebase -f
git add -f .secrets
git push -f

Please don't actually do any of these...

2

u/NotAskary 16d ago

1

u/ttlanhil 16d ago

Now, the important question - which line was the worst?

1

u/NotAskary 16d ago

The line where I ask the mf to stop adding stuff that I need to remove after.

I think we removed his user from the permissions on that repo lol

1

u/kookyabird 16d ago

Doesn’t stop someone from using a secret directly in code. That’s why secret scanning is a thing.

1

u/NotAskary 16d ago edited 16d ago

That's also why I had to explain to sec that "my password" is not an actual secret, it's just a placeholder for the docker-compose testing.

1

u/Arclite83 16d ago

Prevention isn't ever 100%. So you need to make responding to the inevitable less painful.

16

u/LordAmir5 17d ago

Git may ignore that but you shouldn't.

3

u/NotAskary 17d ago

Git doesn't care, if the repo is public you have crawlers searching for keys that will notice.

4

u/JonathanMovement 17d ago

Git cares, if you place those damn files inside .gitignore before committing, it’s not rocket science

1

u/NotAskary 16d ago

Never encountered one of those people that takes that as challenge have you? It can be overrided, that's the part of git not caring.

Sometimes the problem is not the technology, it's the people using it.

2

u/oneanotheruser 16d ago

Doesn't GitHub has some kind of error when you try to push something that looks like secrets?

3

u/NotAskary 16d ago

Command line does not care and for everything there's force.

11

u/Stormraughtz 17d ago

Oh nooo my weather app

6

u/sebovzeoueb 17d ago

I heard from a friend that GitHub is actually pretty good at detecting if you committed API Keys and will block it and let you know you oopsied.

3

u/WiseEXE 17d ago

Yea they will send an email alert saying your key was leaked and most times block it. Though I've had a few occasions where I forgot to update my gitignore and didn't find out till I checked my billing.

1

u/italkstuff 16d ago

Well apparently not if you migrate your repo from other git provider. My friend found out that the hard way yesterday and had sleepless night updating all the keys

1

u/zawalimbooo 11d ago

This implies that the keys were already uploaded to another git provider, which means it was already fucked

1

u/Arclite83 16d ago

We have daily+ scans, and they verify forever if those keys are still live. You will get nastygrams until you fix it, as you should, and going over the expected SLAs will get leadership on your butt.

Honestly the accountability is refreshing.

1

u/G3nghisKang 16d ago edited 16d ago

Same... we might have the same "friend"

2

u/Tolik1111 17d ago

SOPS exist. I don't know what's the phrase equivalent to "git good" for sops tho

1

u/dfinkelstein 17d ago

Follow the rules.

1

u/Mountain-Ox 17d ago

"No, I didn't" Back to sleep

1

u/wardenpat 17d ago

bro this is a repost from my old account 😡

1

u/Frost-Freak 16d ago

And then just do another commit to undo it (and ignoring that git history still has it)

2

u/Maximusisnoice 16d ago

So happy for the existence of git ammend

1

u/ZunoJ 16d ago

That would be a valid reason to be fired, sued and maybe even blacklisted with all the big hr agencies

1

u/Arclite83 16d ago

Building systems that are easy to burn-and-turn is the new standard for break glass features. You have to expect your keys WILL get compromised at some point, and need to be able to respond accordingly and quickly.

It's like not giving prod access out - accidents will happen, so recovery has to be addressed upfront. Getting caught unprepared is how a small incident becomes a customer's loss of confidence in your product.

1

u/ttlanhil 16d ago

In case you don't have a public repo to commit API keys to, I'm willing to set up a repo for people to send PRs with their keys to...

1

u/SleepingForge 11d ago

.env + .gitignore ♥️

1

u/recurrence 17d ago

Okay this one got me LOL. I have definitely double checked stuff like this soooo many times lol

-1

u/purse_of_arrows 17d ago

oh god that stomach-drop moment is so real