Skip to content

Commit 752c010

Browse files
committed
👷 Add explicit least privilege permissions for each workflow
1 parent 8834eeb commit 752c010

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed

.github/workflows/bin-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
pull_request:
99
workflow_dispatch:
1010

11+
# least privilege as default, should be overridden per job if necessary
12+
permissions:
13+
contents: read
14+
1115
jobs:
1216
dump_data:
1317
name: Test dump_data.sh

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010
workflow_dispatch:
1111

12+
# least privilege as default, should be overridden per job if necessary
13+
permissions:
14+
contents: read
15+
1216
env:
1317
IMAGE_NAME: maykinmedia/objecttypes-api
1418

.github/workflows/code-quality.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
# least privilege as default, should be overridden per job if necessary
11+
permissions:
12+
contents: read
13+
1014
jobs:
1115
open-api-workflow-code-quality:
1216
uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v6

.github/workflows/oaf-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
schedule:
1111
- cron: '0 7 * * 1'
1212

13+
# least privilege as default, should be overridden per job if necessary
14+
permissions:
15+
contents: read
1316

1417
jobs:
1518
open-api-workflow-check-oas:

.github/workflows/oas.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
pull_request:
1111
workflow_dispatch:
1212

13+
# least privilege as default, should be overridden per job if necessary
14+
permissions:
15+
contents: read
16+
1317
jobs:
1418
oas:
1519
name: Checks

.github/workflows/quick_start.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
- '**'
1010
workflow_dispatch:
1111

12+
# least privilege as default, should be overridden per job if necessary
13+
permissions:
14+
contents: read
15+
1216
jobs:
1317
open-api-workflow-quick-start:
1418
uses: maykinmedia/open-api-workflows/.github/workflows/quick-start.yml@v6

0 commit comments

Comments
 (0)