News for hackers. Stuff that matters.

dash14

Show HN: Buildcage – Egress filtering for Docker builds (SNI-based, no MitM)

https://github.com/dash14/buildcage

Hi HN,I built Buildcage to solve a recurring problem at work: during Docker builds, tools like `npm install` and `pip install` can execute arbitrary code and make outbound connections to arbitrary hosts without visibility or control. A compromised dependency could silently exfiltrate build secrets or phone home to an attacker’s server — and you’d have no way to detect it.Buildcage adds...

( Read More... | no comments | 2 points | on HN )
Thanks for the interest and great question!

The allowlist uses nginx's map directive with the `hostnames` parameter, so it supports several matching patterns:

- Exact domains: `registry.npmjs.org` - Prefix wildcards: `.cloudfront.net` (matches any subdomain) - Suffix wildcards: `github.` (matches github.com, github.io, etc.) - Combined wildcards: `.example.com` (shorthand for both example.com and .example.com) - Regex patterns: `~^.\.amazonaws\.com$` for full PCRE support

Full nginx map documentation: https://nginx.org/en/docs/http/ngx_http_map_module.html

I'll add this to the documentation. Thanks!

Show HN: Buildcage – Restrict outbound network access during Docker builds

https://github.com/dash14/buildcage

Hi HN,I built buildcage as part of our supply chain security efforts at work. The problem we kept running into: when you run `RUN npm install` in a Dockerfile, that command can connect to anywhere on the internet, and you have no visibility into where it actually goes. Even with pinned dependencies, a compromised package could still exfiltrate build secrets or phone home to a C2 server during...

( Read More... | 2 comments | on HN )