Skip to content

Commit 86f843e

Browse files
committed
Check for unsigned dlls
1 parent d3a456a commit 86f843e

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/windows.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,4 +218,25 @@ 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: ls
234+
run: ls
235+
236+
- name: ls
237+
run: ls ykman-builds-windows\ykman-installer-windows
238+
239+
- name: Check for unsigned DLLs
240+
shell: pwsh
241+
working-directory: .\ykman-builds-windows\ykman-installer-windows
242+
run: .\scripts\verify_dll.ps1

resources/win/verify_dll.ps1

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

0 commit comments

Comments
 (0)