# How to secure GitHub Actions workflows: 4 tips to handle untrusted input and tighten permissions

DevFeed: [How to secure GitHub Actions workflows: 4 tips to handle untrusted input and tighten permissions](<https://devfeed.tech/articles/how-to-secure-github-actions-workflows-4-tips-to-handle-untrusted-input-and-tighten-permissions-67931.md>)

Original publisher: [Read original article](<https://github.blog/security/supply-chain-security/four-tips-to-keep-your-github-actions-workflows-secure/>)

Author: Jaroslav Lobacevski

Published: 2023-08-09T16:00:15Z

Content type: tutorial

Language: en

Sources: [GitHub Blog](<https://devfeed.tech/sources/github-engineering.md>)

Topics: [GitHub Actions](<https://devfeed.tech/topics/github-actions.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [CVE-2024-4603](<https://devfeed.tech/topics/cve-2024-4603.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [codeql](<https://devfeed.tech/tags/codeql.md>), [command-injection](<https://devfeed.tech/tags/command-injection.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [github-security-lab](<https://devfeed.tech/tags/github-security-lab.md>), [permissions](<https://devfeed.tech/tags/permissions.md>), [secure-github-actions](<https://devfeed.tech/tags/secure-github-actions.md>), [security](<https://devfeed.tech/tags/security.md>), [supply-chain-security](<https://devfeed.tech/tags/supply-chain-security.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>)

## AI overview

Researchers found code injection vulnerabilities in GitHub Actions workflows and worked with GitHub to verify and disclose them. The article explains how untrusted event inputs can be injected into workflow commands, recommends passing inputs through environment variables, enabling CodeQL workflow scanning, limiting token permissions, and using private vulnerability reporting.

## Source excerpt

Researchers from Purdue and NCSU have found a large number of command injection vulnerabilities in the workflows of projects on GitHub. Follow these four tips to keep your GitHub Actions workflows secure.