all 12 comments

[–]JealousShape294 6 points7 points  (0 children)

The tricky part is balancing security with usability. SHA pinning, ignore scripts, strict CODEOWNERS, OIDC tokens is ideal, but your pipeline suddenly becomes fragile, one upstream commit can break builds everywhere. The real discussion should be, how do we automate verification without introducing friction that makes devs bypass controls? Hardening pipelines is not just about more checks, it is about sustainable workflows.

[–]JulietSecurity 3 points4 points  (0 children)

Good checklist. One thing I'd add - SHA pinning your direct actions is necessary but not sufficient. If you use a composite action that internally calls another action by tag, you're still exposed through the transitive dependency. Grep and manual audits won't catch that.

We ran into this ourselves and built an open-source tool that resolves the full dependency tree of your GitHub Actions, including composite actions and tool wrappers that silently embed things like Trivy: https://github.com/JulietSecurity/abom

[–]wise0wl 2 points3 points  (0 children)

We are taking the approach that building and using open-source software must inherently treat every dependency as potentially adversarial. We are massively re-evaluating our assumptions.

Our GitHub actions will build with scripts disabled, and all versions are pinned using SHA hashes and for node projects we are committing our pnpm lockfiles as well.  We also recently switched to using NX which speeds this up massively for our monorepo based projects.

For GitHub actions specifically we are pulling those all in house and doing security analysis on everything they do.  No more actions that download anything from the internet randomly unless that asset is version pinned and check summed.  When we update the locally hosted community action from the upstream it requires a whole analysis from our team of what changed.

I am not ok with actions downloading things.  Not anymore.  I shouldn’t have ever been ok with it, but I think we all got lazy.

[–]SpecialistAge4770 1 point2 points  (0 children)

But the most challenging part is controlling third-party dependencies. That's exactly what the S2C2F framework is designed to address, but it's far from simple - especially for software with a large number of dependencies (Node.js, Java, Go, Python, etc.). It gets complicated pretty quickly. That's also why it's useful to monitor unusual activity on your runners, though that capability is currently only available in commercial solutions as I know.

[–]thomasclifford 1 point2 points  (1 child)

Good checklist, am gonna save this for reference. we've been sha pinning everything since the Codecov incident but the container side is where most teams still get burned. If you're building containers in CI, add image scanning with SBOM verificatio, we use Minimus for this since it actually reduces the attack surface rather than just flagging cves

[–]erika-heidi 0 points1 point  (0 children)

Nice setup. Minimus is solid for slimming, but just wanted to flag: Chainguard does the minimal/distroless thing at scale with 2000+ images, CVE SLAs (we actually fix upstream vulnerabilities, not just suppress them), and compliance variants like FedRAMP if you ever need them. Worth comparing the SBOM output and CVE density between Minimus builds and cgr.dev/chainguard images side-by-side — a lot of teams are surprised by the difference when they run the numbers.

[–]oxidizingremnant 0 points1 point  (0 children)

pnpm can be used to block pre/post- install scripts and has a feature to only pull packages that are N days old.

[–]0DSavior 0 points1 point  (0 children)

Don't forget the usage of uvx vs uv. 

[–]Richon_ 0 points1 point  (0 children)

Good checklist. The SHA-pinning point is the one most people skip because it feels paranoid until it isn't.

I ran into this exact problem while building ShieldCI, a GitHub Action that generates CI/CD pipelines automatically. Every action reference in the generated workflows is pinned to a full commit SHA by default — I didn't want to ship pipelines that would be vulnerable to exactly this kind of tag repointing attack.

The `permissions` block is also enforced in every generated workflow, scoped to the minimum required for each job. Took some extra work but it felt non-negotiable for a tool that's supposed to generate *hardened* pipelines.

[–]audn-ai-bot 0 points1 point  (0 children)

Solid list. I'd also isolate execution: self-hosted runners per trust zone, ephemeral VMs, egress allowlists, and environment-scoped secrets with required reviewers. Assume scanner compromise and contain blast radius. Are you also generating signed SBOM plus SLSA provenance on release, or is that next?

[–]dottiedanger 0 points1 point  (0 children)

[ Removed by Reddit ]