Skip to content

Comments

Configure fine-grained GitHub Action permissions#127

Merged
asgrim merged 1 commit intophp:mainfrom
TimWolla:github-action-permissions
Nov 25, 2024
Merged

Configure fine-grained GitHub Action permissions#127
asgrim merged 1 commit intophp:mainfrom
TimWolla:github-action-permissions

Conversation

@TimWolla
Copy link
Member

I was not able to test the workflows requiring the additional permissions, because I obviously do not have a signing key set up. I'm reasonably confident that these changes are correct though.

@asgrim I'm not sure if you are able to make the necessary changes to the repository configuration. You might need to request assistance by a organization owner.


This change configures GitHub Actions to only allow reading the repository contents within the top-level workflow-wide permissions section. Extended permissions are then granted to individual jobs to make permissions “secure by default” even when additional jobs are added to an existing workflow.

As a follow-up to this PR, the “Workflow Permissions” in the repository settings should be reconfigured to “Read repository contents and packages permissions” instead of “Read and write permissions” to also make additional workflows secure by default, even when a permissions section is not explicitly configured.

This change configures GitHub Actions to only allow reading the repository
contents within the top-level workflow-wide permissions section. Extended
permissions are then granted to individual jobs to make permissions “secure by
default” even when additional jobs are added to an existing workflow.

As a follow-up to this PR, the “Workflow Permissions” in the repository
settings should be reconfigured to “Read repository contents and packages
permissions” instead of “Read and write permissions” to also make additional
workflows secure by default, even when a permissions section is not explicitly
configured.
@asgrim asgrim added this to the 0.3.0 milestone Nov 25, 2024
@asgrim
Copy link
Contributor

asgrim commented Nov 25, 2024

The Workflow permissions has been updated to Read repository contents and packages permissions ✔️

Thanks @TimWolla 👍

@asgrim asgrim merged commit 17ca9d5 into php:main Nov 25, 2024
@TimWolla TimWolla deleted the github-action-permissions branch November 25, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants