Skip to content

Commit f7f15b7

Browse files
ci: add least-privilege permissions to GitHub Actions workflows
Add explicit workflow-level permissions blocks to resolve CodeQL actions/missing-workflow-permissions alerts. Scopes are derived from workflow operations. Refs: APPSEC-164
1 parent bbaa0db commit f7f15b7

4 files changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ concurrency:
66
group: ${{ github.workflow }}-${{ github.head_ref }}
77
cancel-in-progress: true
88

9+
permissions:
10+
actions: write
11+
contents: read
12+
pull-requests: read
13+
914
jobs:
1015
build:
1116
name: 🧪 Test & lint

.github/workflows/initiate_release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: "The new version number with a 'v' prefix. Example: v1.40.1"
88
required: true
99

10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
1014
jobs:
1115
init_release:
1216
name: 🚀 Create release PR

.github/workflows/javadoc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
push:
44
branches:
55
- main
6+
7+
permissions:
8+
contents: read
9+
610
jobs:
711
javadoc:
812
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches:
77
- main
88

9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
913
jobs:
1014
Release:
1115
name: 🚀 Release

0 commit comments

Comments
 (0)