Skip to content

- Validate GitHub Actions workflows: add minimum required permissions and fix path bugs#430

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

- Validate GitHub Actions workflows: add minimum required permissions and fix path bugs#430
mtracz merged 1 commit intomainfrom
copilot/validate-github-actions-workflows

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 25, 2026

All five workflows were missing explicit permissions blocks, leaving the GITHUB_TOKEN with broader default access than needed. Two workflows also had incorrect path references that silently broke trigger conditions and cache keys.

Permissions (least-privilege)

Added explicit permissions at the workflow level for each file:

Workflow Permissions
check.js.yml contents: read
check.php.yml contents: read
deploy-to-beta.yml contents: read
deploy-to-prod.yml contents: read
title.yml pull-requests: read
permissions:
  contents: read

Bug fixes

  • check.js.yml: package.lockpackage-lock.json in both the paths trigger filter and the hashFiles() cache key — the old name never matched, so lockfile changes didn't trigger CI and cache was always cold.
  • check.php.yml: 'check.php.yml''.github/workflows/check.php.yml' in the paths filter — the bare filename never matched any actual file path, so workflow file changes didn't re-trigger CI.

@mtracz mtracz marked this pull request as ready for review March 25, 2026 19:29
@mtracz mtracz requested a review from a team as a code owner March 25, 2026 19:29
@mtracz mtracz merged commit 95e8ca4 into main Mar 26, 2026
3 checks passed
@mtracz mtracz deleted the copilot/validate-github-actions-workflows branch March 26, 2026 11:08
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.

4 participants