Skip to content

Commit 6ab8dbc

Browse files
CopilotCopilotmfranzke
authored
refactor: add permissions blocks to GitHub workflows for least privilege security (#4933)
* Initial plan * feat: add permissions blocks to GitHub workflows for least privilege security * Update default.yml * Add pull-requests permission to workflow --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Copilot <copilot@example.com> Co-authored-by: Maximilian Franzke <maximilian.franzke@deutschebahn.com> Co-authored-by: Maximilian Franzke <787658+mfranzke@users.noreply.github.com>
1 parent d4623fb commit 6ab8dbc

19 files changed

+66
-0
lines changed

.github/workflows/00-init.yml

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

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

.github/workflows/00-scan-secrets.yml

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

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

.github/workflows/01-build-outputs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Build outputs
33

4+
permissions:
5+
contents: read
6+
47
on:
58
workflow_call:
69

.github/workflows/01-build-packages.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Build Packages
33

4+
permissions:
5+
contents: read
6+
47
on:
58
workflow_call:
69

.github/workflows/01-build-patternhub.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Build Patternhub
33

4+
permissions:
5+
contents: read
6+
47
on:
58
workflow_call:
69
inputs:

.github/workflows/01-build-showcases.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Build Showcases
33

4+
permissions:
5+
contents: read
6+
47
on:
58
workflow_call:
69
inputs:

.github/workflows/01-get-playwright-version.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: 🎭 Get playwright version
33

4+
permissions:
5+
contents: read
6+
47
on:
58
workflow_call:
69
outputs:

.github/workflows/01-get-publish-version.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
name: Get and save publish version
33

4+
permissions:
5+
contents: read
6+
47
on:
58
workflow_call:
69
# Map the workflow outputs to job outputs

.github/workflows/01-init-playwright.yml

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

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

.github/workflows/01-lint.yml

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

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

0 commit comments

Comments
 (0)