News for hackers. Stuff that matters.
Re:CircleCI trusts 8 analytics companies with your source co... by tptacek on Tuesday October 10, 2017 @12:57PM (#15443365)
Does Github? It should be easy to check; log in, open the network inspector, and do a force-reload.
Re:CircleCI trusts 8 analytics companies with your source co... by elehack on Tuesday October 10, 2017 @01:13PM (#15443500)
Only 3rd-party code I see in a GitHub is Google Analytics. There's a few loads from githubapp.com and githubusercontent.com.

I also think the CI service, which GitHub doesn't provide, is a higher-risk environment for this kind of thing. GitHub settings pages don't production deploy keys.

Re:CircleCI trusts 8 analytics companies with your source co... by joshpeek on Tuesday October 10, 2017 @01:25PM (#15443606)
We’re concerned about this as well at GitHub. We don’t link directly to the Google Analytics script, which could be updated at anytime. Instead we host our own script version that’s locked down with CSP and SRI. We still allow XHRs to the Google Analytics origin to report the data but the script code itself can’t be changed without an internal security review.
Re:CircleCI trusts 8 analytics companies with your source co... by dom0 on Tuesday October 10, 2017 @01:29PM (#15443639)
It's reassuring that you (GitHub) seem to have not only thought about the problem, but implemented processes to reduce exposure.
Re:CircleCI trusts 8 analytics companies with your source co... by tptacek on Tuesday October 10, 2017 @01:34PM (#15443694)
Github has one of the best application security teams in the industry.

(I have no relationship with Github other than that I am a customer and have watched them steadily hire some of the best people I know in the industry).

Re:CircleCI trusts 8 analytics companies with your source co... by ptoomey3 on Tuesday October 10, 2017 @03:55PM (#15444846)
Thank for the kind words. As Neil noted below, we would like to lock things down even further by proxing all data that is sent to Google Analytics. And, as a bonus, it would remove the last destination host for content exfil attacks that we know of. Our strict CSP policy has been a nice win, but the strictness has made it that much more clear that allowing nearly any third party sites, even for innocuous things such as images/xhr, isn't ideal. And, we are always on the lookout for more bypasses: https://bounty.github.com/targets/csp.html.
Re:CircleCI trusts 8 analytics companies with your source co... by sitepodmatt on Wednesday October 11, 2017 @01:10AM (#15447443)
Oh nice, tell me more about proxying to GA, do you just change some hostname config in the ga universal js snippet to point to your forwarding proxy? how does GA know end user IP as it will be your proxy forwarders normally?
Re:CircleCI trusts 8 analytics companies with your source co... by ptoomey3 on Friday October 13, 2017 @11:21PM (#15470516)
You basically report the data to your own servers and then relay whatever subset you like to google using their “measurement protocol”: https://developers.google.com/analytics/devguides/collection...
Re:CircleCI trusts 8 analytics companies with your source co... by sitepodmatt on Monday October 16, 2017 @04:30AM (#15481698)
Interesting, what do you use on the client-side to pick up browser information (resolution etc..)?
Re:CircleCI trusts 8 analytics companies with your source co... by ndm on Tuesday October 10, 2017 @02:26PM (#15444128)
And this can be ratcheted down further by leveraging something like the measurement protocol. It would eliminate the 3rd party calls/code in the browser while giving GitHub the ability to anonymize the source (e.g. IP address, user agent, etc.). Twitter does this with some of their 3rd party integrations.
Re:CircleCI trusts 8 analytics companies with your source co... by drdaeman on Tuesday October 10, 2017 @09:51PM (#15446760)
> we host our own script version that’s locked down with CSP

Excuse me, is there any article about this, or maybe some pointer where one could get a GA script that doesn't need `script-src data:` (or eval or similar insanity) in the CSP?

I've tried to add CSP for a page that has GA (no other external deps) and it seemed to deliver some scripts from base64-encoded data URI. I haven't researched what exactly it does, but suppose it was the unpacker inserting code that way, instead of using eval. Could be wrong, though, but the only external JS reference was analytics.js, and when testing in Firefox 57 CSP had complained about script with a data URI.