4 ms·
Developers can't seem to stop exposing credentials in publicly accessible code
- bell-cot 3y agoAll too true, sadly. One simplistic "how to improve" idea: All real credentials must always be stored on an uber-secure Credentials Server. If any of your code puts them elsewhere - and Sec. Team regularly scans - it's "Instant PIP" for you.
- hooverd 3y agoWhat's the "Instant PIP" condition for the Sec Team? As a counterpoint I would suggest they run the Credentials Server themselves with ironclad SLAs and massive penalties on an SLA breach.
- sailorganymede 3y agoThis is what happens in my company (super tight on security) - except the PIP part. think we use strikes instead + training
- pknerd 3y agoFor those using GitHub, there should be some kind of "scanner" that sniff certain keywords and doesn't let the code go public
- patmorgan23 3y agoBut also put all your credentials in a .gitignored config file or use environment variables. No hard coded creds/API keys
- nlawalker 3y agoCan't tell if this is /s or not, so linking this in good faith: https://docs.github.com/en/code-security/secret-scanning https://docs.github.com/en/code-security/secret-scanning Major oversight that there's not one single mention of this specific feature in the article.
- ath3nd 3y agoThat's why there are guardrails like credentials scanning tooling, security trainings, SAST, code reviews etc. Additionally, most providers now provide out of the box tooling, see: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning https://docs.github.com/en/code-security/secret-scanning/abo... that can, within minutes, sniff out whether your commits or PR has some creds, and notify you on it. I think most of those leaks happen when credentials were given to somebody developer-adjacent (data scientist, BI, tech-y PO/PM). You know, somebody that wants to put some scripts together and call it a day. To me, that's more of an oversight on the credentials sharing process rather than a question of developer security awareness. In more enterprisey scenarios, there even is the concept of separation of responsibilities, where devs wouldn't even dream of having creds to any production system, as those are managed by a separate team. Theoretically, once you start getting into SOC2/ISO preparedness, the chance of a developer hardcoding a password/secret in code should be close to 0. Right?