Skip to content

Commit 14d4228

Browse files
[CI] Update workflows' permissions to least privilege
1 parent c648165 commit 14d4228

File tree

7 files changed

+12
-2
lines changed

7 files changed

+12
-2
lines changed

.github/workflows/detect_changes.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
permissions:
1414
contents: read
15+
packages: read
1516

1617
jobs:
1718
DetectChanges:

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
permissions:
1111
contents: read
12+
pull-requests: read
1213

1314
env:
1415
BUILD_DIR : "${{github.workspace}}/build"

.github/workflows/reusable_benchmarks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ on:
3131
3232
permissions:
3333
contents: read
34+
pull-requests: read
3435

3536
env:
3637
UMF_DIR: "${{github.workspace}}/umf-repo"

.github/workflows/reusable_codeql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: workflow_call
55

66
permissions:
77
contents: read
8+
security-events: read
89

910
env:
1011
BUILD_DIR : "${{github.workspace}}/build"

.github/workflows/reusable_dockers_build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
workflow_dispatch:
77

88
permissions:
9-
packages: write
109
contents: read
10+
packages: read
1111

1212
jobs:
1313
build-dockers:
@@ -17,6 +17,9 @@ jobs:
1717
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
1818
env:
1919
IMG: ghcr.io/bb-ur/umf-${{ matrix.os }}:latest
20+
permissions:
21+
contents: read
22+
packages: write
2023

2124
steps:
2225
- name: Checkout repository

.github/workflows/reusable_trivy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: workflow_call
55

66
permissions:
77
contents: read
8+
security-events: read
89

910
jobs:
1011
trivy:

.github/workflows/scorecard.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ on:
1212
push:
1313
branches: [ "main" ]
1414

15-
permissions: read-all
15+
permissions:
16+
contents: read
17+
security-events: read
1618

1719
jobs:
1820
analyze:

0 commit comments

Comments
 (0)