Skip to content

Commit e078349

Browse files
committed
ci: add read-only token permissions and pin all action references to SHAs
All CI workflows lacked a top-level permissions block, leaving each run to inherit the repository default (potentially write-all). Each workflow now has `permissions: read-all` at the top level. Every action reference that used a mutable version tag was pinned to its full commit SHA, preventing silent tag-rewriting supply-chain attacks. Verified with zizmor --min-severity high: no findings after this patch. Signed-off-by: Alb3e3 <tomaska.filip@gmail.com>
1 parent f18e26e commit e078349

6 files changed

Lines changed: 21 additions & 9 deletions

File tree

.github/workflows/autotools-cross-mips.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Autotools-cross-MIPS
22

33
on: [push, pull_request]
44

5+
permissions: read-all
6+
57
jobs:
68

79
AutoMakeBuild:
@@ -60,7 +62,7 @@ jobs:
6062
cflags: -mips64r2 -mdsp,
6163
}
6264
steps:
63-
- uses: actions/checkout@v6
65+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6466
- name: Install QEMU
6567
run: sudo apt-get update && sudo apt-get install -y qemu-user
6668
- name: Install prebuilt toolchain

.github/workflows/autotools.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Autotools
22

33
on: [push, pull_request]
44

5+
permissions: read-all
6+
57
jobs:
68

79
AutoMakeBuild:
@@ -36,7 +38,7 @@ jobs:
3638
buildconfig: --enable-assertions --enable-custom-modes --enable-dred --enable-osce
3739
}
3840
steps:
39-
- uses: actions/checkout@v6
41+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4042
# No AutoMake on Mac so let's install it
4143
- name: Install AutoConf, AutoMake and LibTool on MacOSX
4244
if: matrix.config.os == 'macos-latest'

.github/workflows/cmake.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on: [push, pull_request]
55
env:
66
NDK_VERSION: 27.3.13750724
77

8+
permissions: read-all
9+
810
jobs:
911
CMakeVersionTest:
1012
name: Test build with CMake 3.16.0
1113
runs-on: ubuntu-22.04
1214
steps:
13-
- uses: actions/checkout@v6
15+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
1416
with:
1517
fetch-depth: 0
1618
- name: Download models
@@ -40,7 +42,7 @@ jobs:
4042
name: CMake MINGW
4143
runs-on: ubuntu-latest
4244
steps:
43-
- uses: actions/checkout@v6
45+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
4446
with:
4547
fetch-depth: 0
4648
- name: Download models
@@ -228,7 +230,7 @@ jobs:
228230
}
229231

230232
steps:
231-
- uses: actions/checkout@v6
233+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
232234
with:
233235
fetch-depth: 0
234236
- name: Install AutoConf, AutoMake and LibTool # Needed for autogen.sh

.github/workflows/dred.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on: [push, pull_request]
66
env:
77
NDK_VERSION: 27.3.13750724
88

9+
permissions: read-all
10+
911
jobs:
1012
CMakeBuild:
1113
name: CMake/${{ matrix.config.name }}
@@ -58,7 +60,7 @@ jobs:
5860
args: -G "Unix Makefiles" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64
5961
}
6062
steps:
61-
- uses: actions/checkout@v6
63+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6264
with:
6365
fetch-depth: 0
6466
- name: Install AutoConf, AutoMake and LibTool # Needed for autogen.sh
@@ -108,7 +110,7 @@ jobs:
108110
automakeconfig:
109111
}
110112
steps:
111-
- uses: actions/checkout@v6
113+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
112114
with:
113115
fetch-depth: 0
114116
- name: Install AutoConf, AutoMake and LibTool on MacOSX

.github/workflows/makefile.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Makefile
22

33
on: [push, pull_request]
44

5+
permissions: read-all
6+
57
jobs:
68

79
MakefileBuild:
@@ -17,7 +19,7 @@ jobs:
1719
compiler: gcc,
1820
}
1921
steps:
20-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
2123
- name: Build
2224
run: make -f Makefile.unix -j 2
2325
- name: Test

.github/workflows/repository.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: Repository
22

33
on: [push, pull_request]
44

5+
permissions: read-all
6+
57
jobs:
68
CheckTrailingWhiteSpaces:
79
name: Check trailing white spaces
810
runs-on: ubuntu-latest
911
steps:
10-
- uses: actions/checkout@v6
12+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
1113
with:
1214
fetch-depth: 0
1315
- name: Check Whitespaces

0 commit comments

Comments
 (0)