Skip to content

Commit be21672

Browse files
chore: declare workflow-level permissions on eight workflows (#3407)
Signed-off-by: Arpit Jain <arpitjain099@gmail.com> Co-authored-by: Andrew Peabody <andrewpeabody@google.com>
1 parent 1dedb56 commit be21672

8 files changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/go-fbf-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ concurrency:
1212
group: '${{github.workflow}}-${{ github.head_ref || github.ref }}'
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
unit:
1720
name: ${{ matrix.operating-system }} unit tests

.github/workflows/go-module-swapper.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ concurrency:
1212
group: '${{github.workflow}}-${{ github.head_ref || github.ref }}'
1313
cancel-in-progress: true
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
unit:
1720
name: ${{ matrix.operating-system }} unit tests

.github/workflows/go-tflint-plugin.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ concurrency:
1818
group: '${{github.workflow}}-${{ github.head_ref || github.ref }}'
1919
cancel-in-progress: true
2020

21+
permissions:
22+
contents: read
23+
2124
jobs:
2225
unit:
2326
name: ${{ matrix.operating-system }} unit tests

.github/workflows/lint.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ concurrency:
2626
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
2727
cancel-in-progress: true
2828

29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
lint:
3134
name: 'lint-infra-terraform'

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
push:
66
branches: [main]
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
pre-commit:
1013
runs-on: ubuntu-latest

.github/workflows/test-cft-devtools.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ concurrency:
1111
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
1212
cancel-in-progress: true
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
build-dev-tools:
1619
name: Build CFT dev tools image

.github/workflows/test-cli.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ concurrency:
1818
group: '${{github.workflow}}-${{ github.head_ref || github.ref }}'
1919
cancel-in-progress: true
2020

21+
permissions:
22+
contents: read
23+
2124
jobs:
2225
unit:
2326
name: ${{ matrix.operating-system }} unit tests

.github/workflows/update-tooling.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ env:
2424
TFLINT_URL: "https://api.github.com/repos/terraform-linters/tflint/releases/latest"
2525
GOLANGCI_URL: "https://api.github.com/repos/golangci/golangci-lint/releases/latest"
2626

27+
permissions:
28+
contents: write # peter-evans/create-pull-request pushes a branch
29+
pull-requests: write # peter-evans/create-pull-request opens the PR
30+
2731
jobs:
2832
update-tools:
2933
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)