Skip to content

Fix missing permissions in all GitHub Actions workflows#71

Merged
eflumerf merged 2 commits into
artdaq/Spack0.28from
alert-autofix-7
May 29, 2026
Merged

Fix missing permissions in all GitHub Actions workflows#71
eflumerf merged 2 commits into
artdaq/Spack0.28from
alert-autofix-7

Conversation

@eflumerf
Copy link
Copy Markdown
Contributor

@eflumerf eflumerf commented May 29, 2026

Fixes https://github.com/Mu2e/mu2e-spack/security/code-scanning/7 and extends the fix to all workflows in the repository.

Add an explicit permissions block at the workflow root so all jobs inherit least-privilege defaults unless overridden. The safest minimal non-breaking baseline is:

  • contents: read

This documents intended access and avoids inheriting broader defaults.

Changes applied to all four workflows in .github/workflows/:

  • mu2e-format-single-pkg.yml
  • git-whitespace.yml
  • track_new_issues.yml
  • track_new_prs.yml

No imports, methods, or dependencies are required (YAML config only).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@eflumerf
Copy link
Copy Markdown
Contributor Author

@copilot check all workflows for permission issue

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

@copilot check all workflows for permission issue

Done — added permissions: contents: read to all three remaining workflows (git-whitespace.yml, track_new_issues.yml, track_new_prs.yml) in commit Add permissions: contents: read to all remaining workflow files. All four workflows in the repo now have explicit least-privilege permission blocks.

Copilot AI changed the title Potential fix for code scanning alert no. 7: Workflow does not contain permissions Fix missing permissions in all GitHub Actions workflows May 29, 2026
@eflumerf eflumerf marked this pull request as ready for review May 29, 2026 14:47
@eflumerf eflumerf merged commit 4c7eec3 into artdaq/Spack0.28 May 29, 2026
6 checks passed
@eflumerf eflumerf deleted the alert-autofix-7 branch May 29, 2026 15:00
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