- Validate GitHub Actions workflows and set minimum required permissions#46
Open
- Validate GitHub Actions workflows and set minimum required permissions#46
Conversation
Co-authored-by: mtracz <22484267+mtracz@users.noreply.github.com> Agent-Logs-Url: https://github.com/blumilksoftware/php/sessions/76d44ae9-72d4-4b0f-9a3b-8d8876c4c238
Copilot created this pull request from a session on behalf of
mtracz
March 25, 2026 14:23
View session
Member
|
After this PR |
KarolZygadlo
approved these changes
Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Audited all GitHub Actions workflows and applied security best practices by restricting permissions to the required minimum.
Changes
check-dockerfile.ymlpermissions: contents: read— the only permission needed foractions/checkoutanddocker build.publish.ymlpermissions: contents: read+packages: write— minimum required for checkout and pushing images to GHCR.secrets.SECRET_TOKEN(a long-lived Personal Access Token) withsecrets.GITHUB_TOKEN(a short-lived, automatically provisioned token). This eliminates the need to manage a separate secret and follows the principle of least privilege.Security Summary
No vulnerabilities introduced. All changes reduce the attack surface by:
read-writedepending on repository settings).GITHUB_TOKENinstead of a stored PAT for GHCR authentication.