Re:SolarWinds leaked FTP credentials through a public GitHub...
by comprev on Wednesday December 16, 2020 @10:07AM
(#25443399)
Look into ".gitignore", also consider manually adding the files you've worked on and wish to commit.
Re:SolarWinds leaked FTP credentials through a public GitHub...
by qz2 on Wednesday December 16, 2020 @10:12AM
(#25443462)
Yes people think I’m insane when I manually add files to a commit. -a is another foot gun.
Re:SolarWinds leaked FTP credentials through a public GitHub...
by ChrisMarshallNY on Wednesday December 16, 2020 @10:12AM
(#25443470)
That's sort of what I wrote.
I just make sure to have a single location for sensitive stuff, then ignore/move it.
I will store the contents of the file as an encrypted note in 1Password, so I do have a stored version controlled variant.
Re:SolarWinds leaked FTP credentials through a public GitHub...
by mackenzie-gg on Wednesday December 16, 2020 @10:37AM
(#25443805)
What is interesting here though that this, like the Covid-19 leak in Brazil, the leak was on an employees GitHub. Not a companies account. So sure the employee could have prevented it, but from a company perspective. They have no authority to enforce coding practices on a personal GitHub account.
The only thing I can see preventing this at an organisational level is a DLP solution scanning the repositories (GitGuardian does this for example)
Re:SolarWinds leaked FTP credentials through a public GitHub...
by hackerpain on Wednesday December 16, 2020 @10:04AM
(#25443358)
Not if you use TruffleHog and GitGuardian.
Re:SolarWinds leaked FTP credentials through a public GitHub...
by ChrisMarshallNY on Wednesday December 16, 2020 @10:05AM
(#25443376)
Those are "close the barn door after the horses have run away" solutions.
The best solution is to plan ahead.
Re:SolarWinds leaked FTP credentials through a public GitHub...
by mackenzie-gg on Wednesday December 16, 2020 @10:35AM
(#25443776)
You can put detection in the CI/CD pipeline to prevent from getting into the repository. And in any case. Knowing the horses have run away as soon as possible is pretty essential in damage prevention.
What is interesting for me here is that this leak, like the Brazilian covid leak, happened because of an employees GitHub repository. Which companies have no authority over.
GitGuardian at least scans the GitHub accounts of employees though.
Re:SolarWinds leaked FTP credentials through a public GitHub...
by ChrisMarshallNY on Wednesday December 16, 2020 @10:40AM
(#25443848)
True, but I have always taken the position that security starts before we write our first line of code, and should be something that we keep front and center, every line we write.
When I write a line of code, I have an automatic "red team" approach. I think "I'm a blackhat hacker. How do I leverage this line?"
Not a 100% guarantee, but it sure does help the result to be more secure.
In my experience, 99% of security is good old-fashioned horse sense.
What I do, is have a file that aggregates my sensitive stuff (like server secrets and whatnot), and call that file something like "DoNotCheckThisIntoSourceControl.swift". I then add a git ignore line, on that name.
I'll also sometimes store it outside of the repo root (I use Xcode, so I can drag files in from anywhere).