Skip to content

Add explicit permissions to GitHub Actions workflows#282

Merged
CodyCBakerPhD merged 2 commits into
mainfrom
claude/funny-hamilton-l8u5h5
Jun 16, 2026
Merged

Add explicit permissions to GitHub Actions workflows#282
CodyCBakerPhD merged 2 commits into
mainfrom
claude/funny-hamilton-l8u5h5

Conversation

@CodyCBakerPhD

Copy link
Copy Markdown
Collaborator

Summary

This PR adds explicit permission declarations to all GitHub Actions workflows to follow the principle of least privilege and improve security posture.

Key Changes

  • Added permissions block to 7 workflows with minimal required permissions:
    • build_and_upload_docker_image_dev.yml: contents: read and packages: write (for pushing to GHCR)
    • build_and_upload_docker_image_latest.yml: contents: read and packages: write (for pushing to GHCR)
    • daily_remote_tests.yml: contents: read
    • daily_tests.yml: contents: read
    • deploy_tests_on_pull_request.yml: contents: read
    • publish_to_pypi_on_github_release.yml: contents: read
    • remote_testing.yml: contents: read

Implementation Details

  • Each workflow now explicitly declares only the permissions it requires
  • Docker image workflows require packages: write to push images to GitHub Container Registry (GHCR)
  • All workflows require contents: read to access repository contents
  • This prevents workflows from having unnecessary access to other resources by default
  • Follows GitHub's security best practices for workflow permissions

https://claude.ai/code/session_017m4JYyCuytuMjwKakTqyT3

Mirrors the fix from PR #281 (testing.yml) across all remaining
workflow files. Docker image workflows also get packages: write
since they push to GHCR.

https://claude.ai/code/session_017m4JYyCuytuMjwKakTqyT3
@CodyCBakerPhD CodyCBakerPhD self-assigned this Jun 16, 2026
@CodyCBakerPhD
CodyCBakerPhD merged commit e7af40d into main Jun 16, 2026
7 checks passed
@CodyCBakerPhD
CodyCBakerPhD deleted the claude/funny-hamilton-l8u5h5 branch June 16, 2026 20:08
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.75%. Comparing base (a7a9f46) to head (00fc89f).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
+ Coverage   73.96%   74.75%   +0.78%     
==========================================
  Files          40       40              
  Lines        1571     1620      +49     
==========================================
+ Hits         1162     1211      +49     
  Misses        409      409              
Flag Coverage Δ
unittests 74.75% <ø> (+0.78%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CodyCBakerPhD CodyCBakerPhD moved this to Uncategorized in My Work History Jun 17, 2026
@github-project-automation github-project-automation Bot moved this from Uncategorized to Done in My Work History Jun 17, 2026
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.

2 participants