r/ProgrammerHumor • • Oct 07 '26

Meme moreLikeProgrammerNightmare

Post image
829 Upvotes

42 comments sorted by

71

u/DoGooderMcDoogles Oct 07 '26

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

10

u/polaarbear Oct 07 '26

"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 Oct 07 '26

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

21

u/lolcrunchy Oct 07 '26

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

17

u/Fanal-In Oct 07 '26

I .gitignore my whole project just to be sure

3

u/NotAskary Oct 08 '26

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 Oct 07 '26

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 Oct 08 '26

Ahh, hard-earned defenestration...

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

3

u/lolcrunchy Oct 07 '26

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

3

u/NotAskary Oct 07 '26

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

1

u/ttlanhil Oct 08 '26

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

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

2

u/NotAskary Oct 08 '26

1

u/ttlanhil Oct 08 '26

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

1

u/NotAskary Oct 08 '26

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 Oct 08 '26

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

1

u/NotAskary Oct 08 '26 edited Oct 08 '26

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 Oct 08 '26

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

16

u/LordAmir5 Oct 07 '26

Git may ignore that but you shouldn't.

3

u/NotAskary Oct 07 '26

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

4

u/JonathanMovement Oct 07 '26

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

1

u/NotAskary Oct 08 '26

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 Oct 08 '26

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

3

u/NotAskary Oct 08 '26

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

11

u/Stormraughtz Oct 07 '26

Oh nooo my weather app

6

u/sebovzeoueb Oct 07 '26

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 Oct 07 '26

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 Oct 08 '26

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 Oct 13 '26

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

1

u/Arclite83 Oct 08 '26

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 Oct 08 '26 edited Oct 09 '26

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

2

u/Tolik1111 Oct 07 '26

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

1

u/dfinkelstein Oct 07 '26

Follow the rules.

1

u/Mountain-Ox Oct 07 '26

"No, I didn't" Back to sleep

1

u/wardenpat Oct 08 '26

bro this is a repost from my old account 😡

1

u/Frost-Freak Oct 08 '26

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

2

u/Maximusisnoice Oct 08 '26

So happy for the existence of git ammend

1

u/ZunoJ Oct 08 '26

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

1

u/Arclite83 Oct 08 '26

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 Oct 08 '26

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 Oct 13 '26

.env + .gitignore ♥️

1

u/recurrence Oct 07 '26

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