Skip to content

Commit 765e074

Browse files
opentelemetrybototelbot[bot]
authored andcommitted
Add minimum token permissions for all github workflow files (#990)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
1 parent 37d0161 commit 765e074

23 files changed

+96
-0
lines changed

.github/workflows/base-ci-goreleaser.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ on:
2828
required: false
2929
type: string
3030

31+
permissions:
32+
contents: read
33+
3134
env:
3235
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
3336
GORELEASER_PRO_VERSION: v2.7.0

.github/workflows/base-package-tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
default: false
1616
description: "Set to true if a GH issue should be generated upon failure"
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
package-tests:
2023
name: Package Tests

.github/workflows/base-release.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717
type: string
1818
default: ubuntu-24.04
1919

20+
permissions:
21+
contents: read
22+
2023
env:
2124
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
2225
GORELEASER_PRO_VERSION: v2.7.0

.github/workflows/changelog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
branches:
1212
- main
1313

14+
permissions:
15+
contents: read
16+
1417
env:
1518
# Make sure to exit early if cache segment download times out after 2 minutes.
1619
# We limit cache download as a whole to 5 minutes.

.github/workflows/ci-builder.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ on:
2323
- "go.mod"
2424
- "go.sum"
2525

26+
permissions:
27+
contents: read
28+
2629
env:
2730
# renovate: datasource=github-tags depName=goreleaser-pro packageName=goreleaser/goreleaser-pro
2831
GORELEASER_PRO_VERSION: v2.7.0

.github/workflows/ci-goreleaser-contrib.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- "go.mod"
2424
- "go.sum"
2525

26+
27+
permissions:
28+
contents: read
29+
2630
jobs:
2731
check-goreleaser:
2832
name: CI - Contrib - GoReleaser
@@ -33,6 +37,10 @@ jobs:
3337
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
3438
secrets: inherit
3539

40+
41+
permissions:
42+
contents: read
43+
3644
package-tests:
3745
name: Package tests
3846
needs: check-goreleaser
@@ -41,6 +49,10 @@ jobs:
4149
distribution: otelcol-contrib
4250
type: '[ "deb", "rpm" ]'
4351

52+
53+
permissions:
54+
contents: read
55+
4456
msi-tests:
4557
name: MSI tests
4658
needs: check-goreleaser

.github/workflows/ci-goreleaser-core.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- "go.mod"
2424
- "go.sum"
2525

26+
27+
permissions:
28+
contents: read
29+
2630
jobs:
2731
check-goreleaser:
2832
name: CI - Core - GoReleaser
@@ -33,6 +37,10 @@ jobs:
3337
goarch: '[ "386", "amd64", "arm64", "ppc64le", "arm", "s390x" ]'
3438
secrets: inherit
3539

40+
41+
permissions:
42+
contents: read
43+
3644
package-tests:
3745
name: Package tests
3846
needs: check-goreleaser
@@ -41,6 +49,10 @@ jobs:
4149
distribution: otelcol
4250
type: '[ "deb", "rpm" ]'
4351

52+
53+
permissions:
54+
contents: read
55+
4456
msi-tests:
4557
name: MSI tests
4658
needs: check-goreleaser

.github/workflows/ci-goreleaser-ebpf-profiler.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- "go.mod"
2424
- "go.sum"
2525

26+
27+
permissions:
28+
contents: read
29+
2630
jobs:
2731
check-goreleaser:
2832
name: CI - eBPF Profiler - GoReleaser

.github/workflows/ci-goreleaser-k8s.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- "go.mod"
2424
- "go.sum"
2525

26+
27+
permissions:
28+
contents: read
29+
2630
jobs:
2731
check-goreleaser:
2832
name: CI - k8s - GoReleaser

.github/workflows/ci-goreleaser-otlp.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ on:
2323
- "go.mod"
2424
- "go.sum"
2525

26+
27+
permissions:
28+
contents: read
29+
2630
jobs:
2731
check-goreleaser:
2832
name: CI - OTLP - GoReleaser

0 commit comments

Comments
 (0)