Skip to content

- Validate GitHub Actions workflows and add minimum permissions#27

Merged
mtracz merged 1 commit intomainfrom
copilot/validate-github-actions-workflows
Mar 26, 2026
Merged

- Validate GitHub Actions workflows and add minimum permissions#27
mtracz merged 1 commit intomainfrom
copilot/validate-github-actions-workflows

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

Summary

Validated all GitHub Actions workflows and added minimum required permissions to follow security best practices. Without an explicit permissions block, GitHub defaults to overly broad read/write access for many scopes.

Changes

php.yml — Test & lint PHP

  • Added permissions: contents: read
  • The workflow only checks out code and runs composer/phpunit commands — no other permissions are needed.

check-pr-title.yml — Check PR Title

  • Added permissions: pull-requests: read
  • The workflow only reads the pull request title to validate it — no write or other permissions are needed.

Security notes

  • Both workflows already used pinned action SHAs (good practice ✅)
  • Neither workflow uses pull_request_target (no injection risk ✅)
  • Permissions are set at the workflow level to apply to all jobs, restricting the GITHUB_TOKEN to the minimum required scope

Copilot AI requested a review from mtracz March 25, 2026 14:33
@mtracz mtracz requested a review from a team March 25, 2026 21:41
@mtracz mtracz marked this pull request as ready for review March 25, 2026 21:41
@mtracz mtracz merged commit 09a6932 into main Mar 26, 2026
4 checks passed
@mtracz mtracz deleted the copilot/validate-github-actions-workflows branch March 26, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants