One does not commit or compile credentials

Template

Context:

This meme was brought to you by the PyPI Director of Infrastructure who accidentally hardcoded credentials - which could have resulted in compromissing the entire core Python ecosystem.

You are viewing a single thread.
View all comments View context
9 points

This sounds like a really useful solution, how do you implement something like this? Especially with linter integration

permalink
report
parent
reply
7 points
*

I’m not sure, sorry. The source control team at work set it up a long time ago. I don’t know how it works - I’m just a user of it.

The linter probably just runs git diff | grep @nocommit or similar.

permalink
report
parent
reply
4 points

Depending on which stack you’re using, you could use https://danger.systems to automatically fail PRs.

permalink
report
parent
reply
4 points

PRs? Isn’t the point of @nocommit that something does not get committed, and therefore no credentials are stored in the git repository? Even if the PR does not get merged, the file is still stored as a hit object and can be restored.

permalink
report
parent
reply
2 points

I read the lint part and my brain forgot about everything else. You could stick the danger call in a pre commit hook though.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 7K

    Monthly active users

  • 730

    Posts

  • 11K

    Comments