-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Actions workflow hardening #69126
base: trunk
Are you sure you want to change the base?
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Size Change: 0 B Total Size: 1.84 MB ℹ️ View Unchanged
|
What?
These changes harden the security of the GitHub Actions workflows. GitHub Actions workflows operate in a highly privileged software supply chain environment, for example they have access to publish npm packages, deploy the plugin to the WordPress.org plugin directory, and push commits to the repo. Hardening these workflows reduces the attack surface available to vulnerabilities and malicious actors.
See WordPress/wordpress-develop#8007 for where the same thing was done for the
wordpress-develop
repo.permissions
declarations to workflows and jobs.Why?
GitHub Actions workflows are highly privileged. They can push to the repo, they can publish packages, and they work with inputs that shouldn't necessarily be trusted. Hardening the workflows reduces the attack surface for including malicious code in a package or exposing sensitive information.
Notes
wordpress-develop
andgutenberg
repos, which will come at a later date. The Actionlint linter will remain, as it is in thewordpress-develop
repo.References
Testing Instructions
TBD