Skip to content

Commit 9124326

Browse files
traskopentelemetrybototelbot[bot]mowiesatoulme
authored
[chore] Minimize github default token permissions (#1003)
* Add minimum token permissions for all github workflow files (#990) Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> * Remove the bad ones * add token permissions to regression test pipeline * remove whitespace * remove whitespace * remove whitespace * remove whitespace * remove whitespace * fix double permission yaml fields --------- Co-authored-by: OpenTelemetry Bot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com> Co-authored-by: Moritz Wiesinger <moritz.wiesinger@dynatrace.com> Co-authored-by: Antoine Toulme <antoine@lunar-ocean.com>
1 parent e67c304 commit 9124326

24 files changed

+77
-4
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-releases depName=goreleaser/goreleaser-pro
3336
GORELEASER_PRO_VERSION: v2.11.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-releases depName=goreleaser/goreleaser-pro
2225
GORELEASER_PRO_VERSION: v2.11.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-releases depName=goreleaser/goreleaser-pro
2831
GORELEASER_PRO_VERSION: v2.11.0

.github/workflows/ci-goreleaser-contrib.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
jobs:
2730
check-goreleaser:
2831
name: CI - Contrib - GoReleaser

.github/workflows/ci-goreleaser-core.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
jobs:
2730
check-goreleaser:
2831
name: CI - Core - GoReleaser

.github/workflows/ci-goreleaser-ebpf-profiler.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
jobs:
2730
check-goreleaser:
2831
name: CI - eBPF Profiler - GoReleaser

.github/workflows/ci-goreleaser-k8s.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
jobs:
2730
check-goreleaser:
2831
name: CI - k8s - GoReleaser

.github/workflows/ci-goreleaser-otlp.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
jobs:
2730
check-goreleaser:
2831
name: CI - OTLP - GoReleaser

0 commit comments

Comments
 (0)