Skip to content

Commit b2ae845

Browse files
authored
Add explicit read permissions to workflows (#867)
Motivation: * More secure GitHub Actions workflows Modifications: Add explicit 'contents: read' permissions to workflows that did not have explicit permissions defined. This follows GitHub Actions security best practices by limiting the default GITHUB_TOKEN permissions. Result: An extra layer of security.
1 parent efb14fe commit b2ae845

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Main
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
branches: [main]

.github/workflows/pull_request.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PR
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
types: [opened, reopened, synchronize]

.github/workflows/pull_request_label.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: PR label
22

3+
permissions:
4+
contents: read
5+
36
on:
47
pull_request:
58
types: [labeled, unlabeled, opened, reopened, synchronize]

0 commit comments

Comments
 (0)