News for hackers. Stuff that matters.
Re:How to Harden GitHub Actions: The Unofficial Guide by DGAP on Thursday May 08, 2025 @08:31AM (#43925495)
Great article!

I also found this open source tool for sandboxing to be useful: https://github.com/bullfrogsec/bullfrog

Re:How to Harden GitHub Actions: The Unofficial Guide by cedws on Thursday May 08, 2025 @08:56AM (#43925661)
I came across this the other day but I couldn’t really grok how it works. Does it run at a higher privilege level than the workflow or the same? Can a sophisticated enough attack just bypass it?
Re:How to Harden GitHub Actions: The Unofficial Guide by mdaniel on Thursday May 08, 2025 @10:19AM (#43926322)
I spent a few seconds clicking into it before the newfound 429 responses from GitHub caused me to lose interest

I believe a sufficiently sophisticated attacker could unwind the netfilter and DNS change, but in my experience every action that you're taking during a blind attack is one more opportunity for things to go off the rails. The increased instructions (especially ones referencing netfilter and DNS changes) also could make it harder to smuggle in via an obfuscated code change (assuming that's the attack vector)

That's a lot of words to say that this approach could be better than nothing, but one will want to weigh its gains against the onoz of having to keep its allowlist rules up to date in your supply chain landscape

Re:How to Harden GitHub Actions: The Unofficial Guide by fallard on Thursday May 08, 2025 @07:04PM (#43932230)
Hey, I'm one of the co-author of Bullfrog. As you say, a sophisticated and targeted attack could indeed bypass our action. It's meant for blocking mostly opportunistic attacks.

I don't think any egress filtering could properly block everything, given actions will need to interact with Github APIs to function and it would always be possible to exfiltrate data in any private repo hosted on Github. While some solutions can access the outbound HTTP requests payload before it gets encrypted using eBPF, in order to detect egress to untrusted Github org/repos, this isn't a silver bullet either because this relies on targeting specific encryption binaries used by the software/OS. A sophisticated attack could always use a separate obscure or custom encryption binaries to evade detection by eBPF based tools.

So like you say, it's better than nothing, but it's not perfect and there are definitely developer experience tradeoff in using it.

PS: I'm no eBPF expert, so I'd be happy if someone can prove me wrong on my theory :)

Re:How to Harden GitHub Actions: The Unofficial Guide by DGAP on Thursday May 08, 2025 @05:00PM (#43931318)
Yep, and there's an opt-in to disable sudo which prevents circumvention. However this can break some actions especially ones deployed as Docker images. It also doesn't work with macos.
Re:How to Harden GitHub Actions: The Unofficial Guide by mstade on Thursday May 08, 2025 @08:50AM (#43925611)
It's pretty depressing that such functionality isn't a core feature of GHA. Seems like low hanging fruit.
Re:How to Harden GitHub Actions: The Unofficial Guide by vin10 on Thursday May 08, 2025 @12:27PM (#43927811)
Interesting project, I think I just found a way to crash the sandbox, just reported via an advisory.