Better HN
topnewbestaskshowjobs
Log inSign up

electricapps

2 karma · joined Mar 27, 2026 (8mo ago) · 3 submissions

Submissions

comment 7mo ago · link · parent

Great writeup. Though combined with the lack of lockfiles for transitive actions, relying purely on static analysis is tough. Linter like zizmor are great, but they struggle with deep composite actions trees and runtime template injection.

I got frustrated with the lack of security to started working myself on an open-source runtime sandbox for GHA: https://github.com/electricapp/hasp

The first check was inspired by the trivy attack. hasp enforces SHA pinning AND checks that a comment (# v4.1.2) actaully resolves to its preceding SHA. That grew into a larger suite of checks.

Instead of just statically parsing YAML it hooks into the runner env itself. Some of its runtime checks mirror what zizmor already does including resolving upstream SHAs to canonical branches (no impostor commits) and traversing the transitive dependency tree. I have a PR up with a comparison document here (hasp vs. zizmor): https://github.com/electricapp/hasp/pull/13/changes#diff-aab...

Furthermore, it sandboxes itself to prevent sensitive exfiltration by acting as a token broker which injects the secret at runtime -- the GH token can only ever be used to call the GH API. It uses landlock, seccomp, and eBPF via Rust, so no docker. The token broker sandbox can also be used to wrap a generic executable giving hasp generic applicability beyond GHA context (i.e. agentic or other contexts, where token runtime injection seems quite in vogue)

I'm using this as a stopgap until GH rolls out some of the features on its roadmap. I'm moving torward treating the runner as a zero-trust or actively malicious environment, so this was my small contribution on that front.

comment 7mo ago · link · parent

I worked on hasp after seeing the Trivy and LiteLLM PyPI-credential leak. It was clear that the failure there wasn't unique since any CI step can get compromised, and everything else in the job shares its secrets.

What started as a consistency check for immutable SHA pinning and version comment consistency grew into a larger project with token sandboxing and a suite of runtime checks. I drew some inspiration from zizmor, which focuses more on static analysis. Fundamentally, hasp does two things:

1. Scan: a paranoid audit of .github/workflows/ which verifies every `uses`: is pinned to an immutable SHA that actually exists, checks commit provenance, maps which secrets reach which actions, flags injection patterns and excessive permissions.

2. Exec: wraps any subprocess in Landlock (filesystem) + seccomp (syscalls) + BPF cgroup (network egress). Rather than injecting secrets into the env, they're served from a localhost proxy with a per-secret allowlist of destination domains. A compromised npm postinstall can't exfiltrate GITHUB_TOKEN to evil.com because the BPF program drops it.

Written in Rust, single musl binary, MIT License, and shipping now as-is in alpha. Run the binary in GHA or use the forthcoming GHA itself. See docs/TRUST.md to understand the bootstrap-able trust model.

3.

hasp: A paranoid scanner and kernel-sandboxed step runner for GitHub Actions(github.com ↗)

2 points · by electricapps · 7mo ago · 1 comment