Skip to content

Set workflow permissions#154

Merged
crnh merged 1 commit intomainfrom
crnh/dev/workflow_permissions
May 23, 2025
Merged

Set workflow permissions#154
crnh merged 1 commit intomainfrom
crnh/dev/workflow_permissions

Conversation

@crnh
Copy link
Member

@crnh crnh commented May 22, 2025

Set workflow permissions as advised by dependabot.

@crnh crnh requested a review from Copilot May 22, 2025 09:23
@crnh crnh self-assigned this May 22, 2025
@crnh crnh added CI Changes to continuous integration skip changelog It is not necessary to update the changelog for this PR labels May 22, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates GitHub Actions workflows by setting workflow permissions at the root level, as advised by Dependabot, to improve security and consistency. Key changes include:

  • Adding a top‑level permissions block with "contents: read" in several workflow files.
  • Removing job‑level permissions configurations where they are now redundant.
  • Applying consistent permission settings across all defined workflows.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.github/workflows/python-test-publish.yml Added top‑level permissions and removed job‑level config.
.github/workflows/python-publish.yml Removed job‑level permissions block.
.github/workflows/ci.yml Added top‑level permissions.
.github/workflows/changelog.yml Added top‑level permissions.
Comments suppressed due to low confidence (4)

.github/workflows/python-publish.yml:24

  • Confirm that the removal of the job-level permissions block does not inadvertently remove any necessary overrides for specific actions within the workflow.
permissions:

.github/workflows/python-test-publish.yml:18

  • Verify that applying the permissions at the workflow level covers all job requirements and that no additional permissions are needed for specific steps.
permissions:

.github/workflows/ci.yml:6

  • Ensure that the new permissions block at the workflow level provides sufficient access for all intended actions in the CI process.
permissions:

.github/workflows/changelog.yml:6

  • Check that the top‑level permissions setting aligns with the requirements of the changelog update checks and does not restrict any essential operations.
permissions:

@crnh crnh deployed to TestPyPI May 22, 2025 09:25 — with GitHub Actions Active
@crnh
Copy link
Member Author

crnh commented May 22, 2025

I tested the test publish workflow and this workflow runs successfully.

@crnh crnh marked this pull request as ready for review May 22, 2025 09:27
@crnh crnh merged commit 8b50bcf into main May 23, 2025
13 of 14 checks passed
@crnh crnh deleted the crnh/dev/workflow_permissions branch June 17, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Changes to continuous integration skip changelog It is not necessary to update the changelog for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants