← Back to context

Comment by TacticalCoder

24 days ago

> but raw.githubusercontent.com would be as it doesn't allow data to be submitted to it

But raw.githubusercontent.com still contains code and now the attacker can publish the code he wants no!?

Don't get me wrong: I love the idea to secure as much as possible. I'm running VMs and containerizing and I eat firewalling rules for breakfast, my own unbound DNS with hundreds of thousands (if not millions) of domains blocked, etc. I'm not the "YOLO" kind of guy.

But I don't understand what's that different between raw.githubusercontent.com and github.com? Is it for exploits that are not directly in the source code? Can you explain a bit more?

In the case of compromised code, the attacker has already loaded what he wants, so loading extra code from raw.githubusercontent.com is not the issue, or our threat model. We are already compromised!

The issue is that code then extracting secrets and data from your organisation, ie. data exfil.

raw.githubusercontent.com can not be used to submit data to, it's read only, but github.com obviously can.

Note, if you really needed github.com access in your application or environment, then you need to use SSL interception (using squid or a firewall) and allow certain URLs and methods ie. GET requests only from your organisations path, to make it safe.