Skip to content

Commit 49d19ec

Browse files
authored
Add explicit read permissions to workflows (#200)
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 a8bdf99 commit 49d19ec

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-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]

.github/workflows/release_builds.yml

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

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_call:
58
inputs:

.github/workflows/unit_tests.yml

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

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_call:
58
inputs:

0 commit comments

Comments
 (0)