We hardened zizmor's GitHub Actions static analyzer

Trail of Bits collaborated with zizmor maintainers over three months to bring zizmor's YAML anchor support to full coverage, after attackers exploited a pull_request_target misconfiguration in the aquasecurity/trivy-action GitHub Action to exfiltrate secrets and backdoor LiteLLM on PyPI in March 2026. To stress-test the tool, Trail of Bits built a corpus of 41,253 workflow files from 6,612 high-value open-source repositories (the 10,000 most-starred repos created between 2022-2025 that use GitHub Actions). Only 43 of 41,253 workflows (0.1%) use YAML anchors, but those include foundational projects like Bitcoin Core and Home Assistant. Four anchor handling bugs were found and fixed: aliases in sequences incorrectly flattened (causing crashes or wrong-location findings), anchor prefixes leaking into values, duplicate anchors causing crashes, and the template-injection audit crashing on aliased run values. The corpus also surfaced deserialization edge cases (if: 0 as integer, timeout-minutes: 0.5 as float, secrets: inherit as string where mapping expected) and expression evaluator bugs, which were aligned with GitHub's Known Answer Tests. Some crashes traced to upstream dependency tree-sitter-yaml (fixed with PRs). The methodology of downloading real inputs, running the tool, and triaging failures is presented as applicable to any static analysis tool. The work was funded by the Sovereign Tech Agency. 

https://blog.trailofbits.com/2026/05/22/we-hardened-zizmors-github-actions-static-analyzer

Comments

Popular posts from this blog

Prompt Engineering Demands Rigorous Evaluation

SecObserve: Simplified Vulnerability and License Management for CI/CD Pipelines

Secure Vibe Coding Guide: Best Practices for Writing Secure Code