Skip to content

Commit 15c29b5

Browse files
committed
actions: permissions
principle of least privilege. still need to figure out codeql before merge or remove it and pray we don't add any vulnerabilities
1 parent 31e04d9 commit 15c29b5

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/CD.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ on:
44
push:
55
tags: '*'
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
build-lin:
912
name: Linux Build
1013
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1116
steps:
1217
- name: Checkout
1318
uses: actions/checkout@v4
@@ -48,6 +53,8 @@ jobs:
4853
build-win:
4954
name: Windows Build
5055
runs-on: windows-2019
56+
permissions:
57+
contents: write
5158
env:
5259
POWERSHELL_TELEMETRY_OPTOUT: 1
5360
steps:
@@ -100,6 +107,8 @@ jobs:
100107
if: github.repository == 'p2sr/SourceAutoRecord'
101108
needs: [build-lin, build-win]
102109
runs-on: ubuntu-latest
110+
permissions:
111+
contents: write
103112
steps:
104113
- name: Get Release Version
105114
id: get_release

.github/workflows/CI.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ on:
1616
- 'Makefile'
1717
workflow_dispatch:
1818

19+
permissions:
20+
contents: read
21+
1922
jobs:
2023
build-lin:
2124
name: Linux Build
2225
runs-on: ubuntu-latest
26+
permissions:
27+
contents: write
2328
steps:
2429
- name: Checkout
2530
uses: actions/checkout@v4
@@ -60,6 +65,8 @@ jobs:
6065
build-win:
6166
name: Windows Build
6267
runs-on: windows-2019
68+
permissions:
69+
contents: write
6370
env:
6471
POWERSHELL_TELEMETRY_OPTOUT: 1
6572
steps:

0 commit comments

Comments
 (0)