News for hackers. Stuff that matters.
Re:A Hacker Has Wiped a Spyware Company’s Servers by bshacklett on Monday February 19, 2018 @01:20PM (#16414563)
It should be mentioned that none of that should ever make its way into a Git repo in the first place. If a secret is committed to Git, it's compromised, period. Suck it up and generate a new secret.
Re:A Hacker Has Wiped a Spyware Company’s Servers by smoyer on Monday February 19, 2018 @04:55PM (#16416063)
Agreed ... use a pre-commit hook to scan your repository for high-entropy strings before they are forever enshrined in your history (https://github.com/dxa4481/truffleHog).
Re:A Hacker Has Wiped a Spyware Company’s Servers by tachyoff on Monday February 19, 2018 @09:13PM (#16417328)
To be fair, though, history can be rewritten, albeit sometimes with some difficulty.
Re:A Hacker Has Wiped a Spyware Company’s Servers by ameliaquining on Monday February 19, 2018 @09:41PM (#16417461)
If a secret has ever been in Git then you probably can't know where it's been copied to and should treat it as likely to have been leaked.
Re:A Hacker Has Wiped a Spyware Company’s Servers by djglass on Monday February 19, 2018 @09:48PM (#16417485)
Great idea! Thanks for linking to that tool.
Re:A Hacker Has Wiped a Spyware Company’s Servers by chrisweekly on Monday February 19, 2018 @02:45PM (#16415175)
Re:A Hacker Has Wiped a Spyware Company’s Servers by cat199 on Monday February 19, 2018 @01:51PM (#16414780)
only if your git is published.. I assume this is what you mean - that said:

separate integration repo containing encrypted keys + separate, manual managment/configuration of the decryption process is fine for most cases.

but yes, bare and in mainline and published, I will agree this is terrible.

see also:

http://docs.ansible.com/ansible/2.4/vault.html

Re:A Hacker Has Wiped a Spyware Company’s Servers by shkkmo on Monday February 19, 2018 @06:19PM (#16416559)
No, you should never commit your secrets, not even to a private github repo, and not even to a privately hosted git server. Doing so increases your attack surface, sometimes in surprising ways.

Now, if your secrets are encrypted before being committed (using something like ansible vault) and the encryption key is not stored in the repo, that may be ok. However, you still need to be aware that any time you rotate that key, you also should to rotate every secret hidden behind that key.

Re:A Hacker Has Wiped a Spyware Company’s Servers by kuschku on Tuesday February 20, 2018 @12:30AM (#16418070)
So how do you do version the configuration management for the cluster that runs everything? It needs to be versioned, and yet with just the data in it you need to be able to recreate your entire environment from scratch.
Re:A Hacker Has Wiped a Spyware Company’s Servers by shkkmo on Tuesday February 20, 2018 @02:30PM (#16423326)
If you want your secrets under version control, then they should be encrypted.

There are lots of ways of doing this. git-crypt is one that is configuration management agnostic. Most CM tools have their own way of dealing with secrets and there are CM agnostic tools like git-crypt. I'm not personally familiar with anything besides ansible-vault, but this article seems to provide a pretty good summary of several options: https://www.threatstack.com/blog/cloud-security-best-practic...