Skip to content

Commit 61db896

Browse files
authored
ci: set workflow permissions (#533)
* ci: set permissions * ci: set permissions fix codeql * ci: set permissions fix retag-image * chore(ci): end with newline
1 parent 501e585 commit 61db896

11 files changed

+37
-13
lines changed

.github/workflows/actionlint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ jobs:
77
actionlint:
88
name: Run actionlint
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
1012
steps:
11-
- uses: it-at-m/lhm_actions/action-templates/actions/action-actionlint@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
13+
- uses: it-at-m/lhm_actions/action-templates/actions/action-actionlint@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19

.github/workflows/build-integrations.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
outputs:
1313
ARTIFACT_NAME: ${{ steps.maven-build-step.outputs.artifact-name }}
14+
permissions:
15+
contents: read
1416
steps:
1517
- name: Checkout code
1618
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -24,6 +26,8 @@ jobs:
2426
if: github.ref_name == 'main'
2527
needs: build-maven
2628
runs-on: ubuntu-latest
29+
permissions:
30+
packages: write
2731
strategy:
2832
matrix:
2933
include:

.github/workflows/codeql.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
jobs:
1111
codeql:
1212
uses: it-at-m/.github/.github/workflows/codeql.yml@main
13+
permissions:
14+
pull-requests: read
15+
security-events: write
1316
with:
1417
analyze-java: true
1518
analyze-javascript-typescript-vue: false

.github/workflows/dependency-review.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ on:
66
jobs:
77
dependency-review:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
911
steps:
10-
- uses: it-at-m/lhm_actions/action-templates/actions/action-dependency-review@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
12+
- uses: it-at-m/lhm_actions/action-templates/actions/action-dependency-review@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19

.github/workflows/deploy-docs.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ on:
77
- "docs/**"
88
- ".github/workflows/deploy-docs.yml"
99

10-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11-
permissions:
12-
contents: read
13-
pages: write
14-
id-token: write
15-
1610
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1711
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
1812
concurrency:
@@ -22,10 +16,13 @@ concurrency:
2216
jobs:
2317
deploy-docs:
2418
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
2523
steps:
2624
- id: build-docs
2725
uses: it-at-m/lhm_actions/action-templates/actions/action-build-docs@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
2826
- id: deploy-docs
2927
# Only deploy documentation from the main branch to prevent unauthorized changes
30-
31-
uses: it-at-m/lhm_actions/action-templates/actions/action-deploy-docs@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
28+
uses: it-at-m/lhm_actions/action-templates/actions/action-deploy-docs@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19

.github/workflows/dockercompose-healthcheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ jobs:
88
docker-compose-healthcheck:
99
name: Run docker compose healthcheck
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
1113
steps:
1214
- uses: it-at-m/lhm_actions/action-templates/actions/action-dockercompose-healthcheck@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
1315
with:
1416
skip-exited: true # required for keycloakmigration init container
15-
compose-file-path: "./stack/"
17+
compose-file-path: "./stack/"

.github/workflows/maven-node-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212
env:
1313
TZ: Europe/Berlin # timezone
14+
permissions:
15+
contents: read
16+
packages: write
1417
strategy:
1518
fail-fast: false
1619
matrix:

.github/workflows/pr-checklist.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ on:
77
jobs:
88
pr-checklist:
99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
1012
steps:
11-
- uses: it-at-m/lhm_actions/action-templates/actions/action-pr-checklist@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
13+
- uses: it-at-m/lhm_actions/action-templates/actions/action-pr-checklist@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19

.github/workflows/pr-labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: "Label PR"
13-
uses: it-at-m/lhm_actions/action-templates/actions/action-pr-labeler@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
13+
uses: it-at-m/lhm_actions/action-templates/actions/action-pr-labeler@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
if: inputs.module == 'refarch-gateway'
5656
needs: release-maven
5757
runs-on: ubuntu-latest
58+
permissions:
59+
packages: write
5860
steps:
5961
- name: Build and push image
6062
uses: it-at-m/lhm_actions/action-templates/actions/action-build-image@a7d25dbabec2057695f865169fdc411d475d4667 # v1.0.19
@@ -72,6 +74,8 @@ jobs:
7274
if: inputs.module == 'refarch-integrations'
7375
needs: release-maven
7476
runs-on: ubuntu-latest
77+
permissions:
78+
packages: write
7579
strategy:
7680
matrix:
7781
include:
@@ -94,6 +98,8 @@ jobs:
9498
if: ${{ !failure() && !cancelled() }}
9599
needs: ["release-maven", "build-image-gateway", "build-images-integrations"]
96100
runs-on: ubuntu-latest
101+
permissions:
102+
contents: write
97103
steps:
98104
- name: Create GitHub Release
99105
id: create_release

.github/workflows/retag-image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
jobs:
2121
retag-image:
2222
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
packages: write
2326
steps:
2427
- name: Checkout code
2528
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

0 commit comments

Comments
 (0)