File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed
Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -176,15 +176,35 @@ jobs:
176176
177177 # we can't staple the app because it's executable
178178
179+ - name : Verify macOS code signatures
180+ if : runner.os == 'macOS'
181+ run : |
182+ # verify all Mach-O binaries in the output are properly signed
183+ FAILED=false
184+ while IFS= read -r file; do
185+ if file -b "$file" | grep -q "Mach-O"; then
186+ if ! codesign --verify --strict "$file" 2>/dev/null; then
187+ echo "INVALID signature: $file"
188+ codesign -dv "$file" 2>&1 || true
189+ FAILED=true
190+ fi
191+ fi
192+ done < <(find dist/cycode-cli -type f)
193+
194+ if [ "$FAILED" = true ]; then
195+ echo "Found binaries with invalid signatures!"
196+ exit 1
197+ fi
198+
199+ # verify main executable signature in detail
200+ codesign -dv --verbose=4 $PATH_TO_CYCODE_CLI_EXECUTABLE
201+
179202 - name : Test macOS signed executable
180203 if : runner.os == 'macOS'
181204 run : |
182205 file -b $PATH_TO_CYCODE_CLI_EXECUTABLE
183206 time $PATH_TO_CYCODE_CLI_EXECUTABLE version
184207
185- # verify signature
186- codesign -dv --verbose=4 $PATH_TO_CYCODE_CLI_EXECUTABLE
187-
188208 - name : Import cert for Windows and setup envs
189209 if : runner.os == 'Windows'
190210 env :
You can’t perform that action at this time.
0 commit comments