Skip to content

Commit 6c133e8

Browse files
committed
.github: restrict workflow permissions
As suggested by CodeQL scanning. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent d30959e commit 6c133e8

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
pull_request:
1111
types: [opened, synchronize, reopened, labeled]
1212

13+
permissions:
14+
contents: read
15+
1316
concurrency:
1417
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
1518
cancel-in-progress: true

.github/workflows/coverity.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- 'dev'
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
912
env:
1013
PROJECT_NAME: finit
1114
CONTACT_EMAIL: troglobit@gmail.com

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- '[0-9]+.[0-9]+*'
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
release:
1013
name: Build and upload release tarball

.github/workflows/weekly.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
- cron: '0 0 * * 0'
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
schedule:
1215
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)