-
Notifications
You must be signed in to change notification settings - Fork 2
🔐 Reduce permissions in documentation.yml
workflow
#208
Conversation
@@ -5,18 +5,20 @@ on: | |||
branches: | |||
- main | |||
|
|||
permissions: { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkgov issue didn't like the default permissions, setting these removes them all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it still use the default permissions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes all the permissions (REF)
You can use the following syntax to disable permissions for all of the available scopes:
permissions: {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action writes to pull requests so you will need a minimum of:
permissions:
contents: read
pull_request: write
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakemulley turns out it's
permissions:
contents: write
Since you need contents: write
to write to a file and pull_request:write
is for data on the PR such as labels, assignees, reviewers, comments etc. (REF)
documentation.yml
workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for the discussion on the permissions used!
No description provided.