Skip to content

Commit 2caa2dc

Browse files
committed
Addressing workflow security warning
1 parent 58e1c4b commit 2caa2dc

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

.github/workflows/go-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
pull_request:
55
types: [opened, synchronize, reopened]
6+
permissions:
7+
contents: read
8+
69
jobs:
710
sdk-go-lint:
811
runs-on: ubuntu-latest

.github/workflows/go-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
pull_request:
55
types: [opened, synchronize, reopened]
6+
permissions:
7+
contents: read
8+
69
jobs:
710
sdk-go-build-test:
811
runs-on: ubuntu-latest

.github/workflows/json-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
pull_request:
55
types: [opened, synchronize, reopened]
6+
permissions:
7+
contents: read
8+
69
jobs:
710
sdk-json-lint:
811
runs-on: ubuntu-latest

.github/workflows/markdown-lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
pull_request:
55
types: [opened, synchronize, reopened]
6+
permissions:
7+
contents: read
8+
69
jobs:
710
sdk-markdown-lint:
811
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ run-name: Release by @${{ github.actor }} from ${{ github.ref_name }}
33

44
on: [push]
55

6-
permissions:
7-
contents: write
8-
pull-requests: write
9-
106
jobs:
117
release:
128
if: ${{ github.ref_type == 'branch' }}
139
uses: nextmv-io/release/.github/workflows/release.yml@develop
10+
permissions:
11+
contents: write
12+
pull-requests: write
1413
with:
1514
BRANCH: ${{ github.ref_name }}
1615
REPOSITORY: sdk
@@ -25,6 +24,8 @@ jobs:
2524
needs: [release]
2625
if: ${{ needs.release.outputs.RELEASE_NEEDED == 'true' && needs.release.outputs.SHOULD_NOTIFY_SLACK == 'true' }}
2726
uses: nextmv-io/release/.github/workflows/notify-slack.yml@develop
27+
permissions:
28+
contents: read
2829
with:
2930
PACKAGE_NAME: sdk
3031
VERSION: ${{ needs.release.outputs.VERSION }}

0 commit comments

Comments
 (0)