Skip to content

Commit bbbc255

Browse files
committed
Check for unsigned dlls
1 parent d3a456a commit bbbc255

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.github/workflows/windows.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
echo "${GAC}" > scribe_sa.json
110110
echo "GOOGLE_APPLICATION_CREDENTIALS=/scribe/scribe_sa.json" >> $GITHUB_ENV
111111
112-
- name: run scribe sign exe
112+
- name: run scribe sign exe and dlls
113113
run: >
114114
docker run
115115
--user $(id -u):$(id -g)
@@ -123,7 +123,7 @@ jobs:
123123
--synchronous
124124
--download-artifacts
125125
126-
- name: unpack signed exe
126+
- name: unpack signed exe and dlls
127127
run: |
128128
mkdir -p signed
129129
mv scribe-download/*/sign-source/1.zip signed/
@@ -218,4 +218,19 @@ jobs:
218218
uses: actions/upload-artifact@v4
219219
with:
220220
name: signed-files-and-msi
221-
path: ykman-builds-windows/ykman-installer-windows
221+
path: ykman-builds-windows/ykman-installer-windows
222+
223+
verify-signatures:
224+
needs: [sign-msi]
225+
runs-on: windows-latest
226+
steps:
227+
- name: Download artifacts
228+
uses: actions/download-artifact@v5
229+
with:
230+
name: signed-files-and-msi
231+
path: ykman-builds-windows/ykman-installer-windows
232+
233+
- name: Check for unsigned DLLs
234+
shell: pwsh
235+
working-directory: .\ykman-builds-windows\ykman-installer-windows
236+
run: .\scripts\verify_dll.ps1

resources/win/verify_dll.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Set-PSDebug -Trace 1
2+
3+
$ErrorActionPreference = "Stop"
4+
5+
$unsignedDlls = Get-ChildItem -Path "ykman" -Recurse -Filter *.dll |
6+
Where-Object { (Get-AuthenticodeSignature $_.FullName).Status -ne 'Valid' } |
7+
Select-Object -ExpandProperty FullName
8+
9+
if ($unsignedDlls) {
10+
Write-Host "ERROR: Found unsigned DLL(s):"
11+
$unsignedDlls | ForEach-Object { Write-Host " - $_" }
12+
exit 1
13+
} else {
14+
Write-Host "SUCCESS: All DLLs are signed."
15+
}

0 commit comments

Comments
 (0)