Skip to content

Commit ba82b65

Browse files
Add minimum token permissions for all github workflow files (#557)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
1 parent 67a1df7 commit ba82b65

File tree

12 files changed

+46
-8
lines changed

12 files changed

+46
-8
lines changed

.github/workflows/boost_log.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- 'instrumentation/boost_log/**'
1414
- '.github/workflows/boost_log.yml'
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
cmake_linux:
1821
name: CMake Linux

.github/workflows/fluentd.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@ on:
1212
pull_request:
1313
branches: [main]
1414
paths:
15-
- "exporters/fluentd/**"
16-
- ".github/workflows/fluentd.yml"
17-
15+
- "exporters/fluentd/**"
16+
- ".github/workflows/fluentd.yml"
17+
18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
cmake_linux:
2023
name: CMake Linux

.github/workflows/geneva_metrics.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ on:
99
pull_request:
1010
branches: [main]
1111
paths:
12-
- "exporters/geneva/**"
13-
- ".github/workflows/geneva_metrics.yml"
12+
- "exporters/geneva/**"
13+
- ".github/workflows/geneva_metrics.yml"
14+
permissions:
15+
contents: read
1416
jobs:
1517
cmake_linux:
1618
name: CMake on Linux

.github/workflows/geneva_trace.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
paths:
1515
- "exporters/geneva-trace/**"
1616
- ".github/workflows/geneva_trace.yml"
17+
18+
permissions:
19+
contents: read
1720

1821
jobs:
1922
geneva-trace-nuget-generation:

.github/workflows/glog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- 'instrumentation/glog/**'
1414
- '.github/workflows/glog.yml'
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
cmake_linux:
1821
name: CMake Linux

.github/workflows/httpd.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- 'instrumentation/httpd/**'
1313
- '.github/workflows/httpd.yml'
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
build:
1720
name: Build module

.github/workflows/log4cxx.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- 'instrumentation/log4cxx/**'
1414
- '.github/workflows/log4cxx.yml'
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
cmake_linux:
1821
name: CMake Linux

.github/workflows/nginx.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ on:
1414
paths:
1515
- 'instrumentation/nginx/**'
1616
- '.github/workflows/nginx.yml'
17+
permissions:
18+
contents: read
1719
jobs:
1820
create-release:
1921
if: startsWith(github.ref, 'refs/tags/nginx')
22+
permissions:
23+
contents: write # required for creating releases
2024
runs-on: ubuntu-latest
2125
steps:
2226
- name: Release
@@ -25,6 +29,8 @@ jobs:
2529
if: startsWith(github.ref, 'refs/tags/nginx')
2630
runs-on: ubuntu-latest
2731
needs: [nginx-build-test, create-release]
32+
permissions:
33+
contents: write # required for uploading release artifacts
2834
steps:
2935
- name: Create directory
3036
run: |

.github/workflows/prometheus.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- "exporters/prometheus/**"
1313
- ".github/workflows/prometheus.yml"
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
prometheus_bazel_linux:
1720
name: Bazel on Linux

.github/workflows/spdlog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- 'instrumentation/spdlog/**'
1414
- '.github/workflows/spdlog.yml'
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
cmake_linux:
1821
name: CMake Linux

0 commit comments

Comments
 (0)