News for hackers. Stuff that matters.
Re:Travis CI Security Advisory: Secured Environment Variables by karlmdavis on Monday May 08, 2017 @05:39PM (#14295861)
I'd love to know, too. Best as I can tell, the only really secure option is to read them in from STDIN.

Depending on how the process is running, it may also be reasonably secure to read the secrets from files. But getting this right is tricky, and really prone to human error: all it takes is one errant chmod/chown to remove the security.

Honestly, given the challenges of those options, keeping secrets in environment variables seems like a reasonable compromise to me.

Re:Travis CI Security Advisory: Secured Environment Variables by lawnchair_larry on Monday May 08, 2017 @06:30PM (#14296234)
Even putting them in text files is far better than environment variables.

Consider how often people log environment variables or even leave phpinfo() lying around. As someone who does penetration tests, I can tell you that it's far more common to gain access to environment variables than it is to read files on the server. The difference between services that didn't have secrets there and the ones that did was a low severity finding that was barely worth logging, and a full remote compromise.

Re:Travis CI Security Advisory: Secured Environment Variables by eropple on Monday May 08, 2017 @08:22PM (#14296766)
How often people log environment variables? Maybe the places I've worked are outliers, but `puts ENV.inspect` or the use of PHP wouldn't pass code review in my prior gigs, nor would they be things I'd write today. My experience is literally the opposite--somebody forgetting a chmod is a lot more common than somebody leaking environment variables like that (leaving it up to somebody to figure out a really smart way to read `/proc/pid/environ` or something).
Re:Travis CI Security Advisory: Secured Environment Variables by spc476 on Tuesday May 09, 2017 @01:20AM (#14297909)
I've written code that does that [1] to log information to help diagnose crashes in long running daemons. Now, the dumping of environment variables is optional but it has been helpful to me in isolating issues with some CGI based programs (as Apache passes critical information to the script in environment variables). Of course, it was in a situation where core dumps are not generated so anything related to a crash is helpful.

[1] https://github.com/spc476/CGILib/blob/master/src/crashreport...

Re:Travis CI Security Advisory: Secured Environment Variables by lgas on Monday May 08, 2017 @11:49PM (#14297608)
I suspect the vast majority of software development organizations do not do code reviews, so you're already in the minority.
Re:Travis CI Security Advisory: Secured Environment Variables by lawnchair_larry on Tuesday May 09, 2017 @10:13AM (#14300144)
Even if they do, they 1) Don't reject PHP wholesale and 2) Don't require that the devops person trying to find a bug go through code review when deploying a debugging tool.
Re:Travis CI Security Advisory: Secured Environment Variables by eropple on Tuesday May 09, 2017 @12:05AM (#14297660)
Distressingly likely. Point taken.