Skip to content

Commit d670878

Browse files
committed
Specify explicit contents: read workflow permissions
Three CI workflows that need only `contents: read` permissions and no other permissions did not have explicit permissions set, and would therefore be given permissions configured for the repository. It is recommended to set explicit workflow permissions. This does so, bringing those workflows inline with `pythonpackage.yml` (which had this), and closing three `actions/missing-workflow-permissions` CodeQL alerts (new since #2032 enabled scanning of GHA workflows). See also: https://codeql.github.com/codeql-query-help/actions/actions-missing-workflow-permissions/
1 parent 2e4a0d2 commit d670878

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.github/workflows/alpine-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: test-alpine
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
test:
710
runs-on: ubuntu-latest

.github/workflows/cygwin-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: test-cygwin
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
test:
710
runs-on: windows-latest

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Lint
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
lint:
710
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)