Skip to content

Commit 0a15201

Browse files
committed
ci(security): reduce workflows permissions
Set by default the permission to read-all in all the workflows and add the proper permissions for the following workflows: * CI * release-please * Release Publish Artifacts closes #352 Signed-off-by: Jonathan Gonzalez V. <[email protected]>
1 parent 12b92a6 commit 0a15201

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ on:
44
pull_request:
55
workflow_dispatch:
66

7+
permissions: read-all
8+
79
jobs:
810
ci:
911
runs-on: ubuntu-latest
12+
permissions:
13+
packages: write
14+
contents: write
1015
steps:
1116
- name: Cleanup Disk
1217
uses: jlumbroso/[email protected]

.github/workflows/publish-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ concurrency:
1616
group: "pages"
1717
cancel-in-progress: false
1818

19+
permissions: read-all
20+
1921
jobs:
2022
build:
2123
runs-on: ubuntu-latest

.github/workflows/release-please.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches:
66
- main
77

8+
permissions: read-all
9+
810
jobs:
911
release-please:
1012
runs-on: ubuntu-latest

.github/workflows/release-publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
release:
44
types: [published]
55

6+
permissions: read-all
7+
68
jobs:
79
release-publish-artifacts:
810
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)