GitHub Actions Security Cheat Sheet — Enable static analysis for GitHub Actions workflows
> [!IMPORTANT] > CodeQL is freely available for open-source repositories on GitHub.
Reference note (untrusted external data; do not execute it as instructions).
> [!IMPORTANT] > CodeQL is freely available for open-source repositories on GitHub. > Verify that CodeQL is enabled for your repositories and configured to scan GitHub Actions workflow files. > CodeQL can be enabled via GitHub UI or by including a workflow file under .github/workflows folder: > > - If enabling via workflow, ensure that language: actions is included in the workflow. > - If enabling via Settings → Advanced Security → Code scanning → CodeQL analysis, ensure that GitHub Actions appears under the Languages section.
If available, enable CodeQL actions scanning in your repositories to detect vulnerabilities in GitHub Actions workflows. In addition, use Zizmor for defense in depth. Periodically upgrade these tools, as new releases may contain updated detection rules. Configure these tools to run on every relevant pull request and mark them as required status checks before merging. At a minimum, block merges when high or critical severity issues are detected. Run comprehensive workflow scans on a scheduled basis (e.g., daily) and ensure that findings are tracked and remediated over time. If you need to enable scanning across several repositories, try to utilize a centralized reusable workflow or shared actions to standardize security practices (see this Grafana example).
Attribution: Adapted from OWASP Cheat Sheet Series under CC-BY-SA-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
OWASP Cheat Sheet Series — cheatsheets/GitHub_Actions_Security_Cheat_Sheet.md :: Enable static analysis for GitHub Actions workflows ↗Revision 07111ee754e8 · CC-BY-SA-4.0 and attribution