@@ -121,6 +121,26 @@ jobs:
121121 done
122122 echo "✅ Binary is self-contained — no MinGW runtime or null DLL dependencies"
123123
124+ - name : Verify Linux binary dependencies
125+ if : ${{ contains(matrix.target, 'linux') }}
126+ run : |
127+ echo "Checking shared library dependencies..."
128+ DEPS=$(ldd dash-evo-tool/dash-evo-tool)
129+ echo "$DEPS"
130+ # Allowlist: only standard system libraries should appear
131+ UNEXPECTED=$(echo "$DEPS" | grep "=>" | grep -v "not found" | awk '{print $1}' | grep -Ev "^(linux-vdso|libm|libc|libdl|librt|libpthread|libgcc_s|libstdc\+\+|ld-linux|libz|libssl|libcrypto)\.so")
132+ if [ -n "$UNEXPECTED" ]; then
133+ echo "::warning::Unexpected shared dependencies found:"
134+ echo "$UNEXPECTED"
135+ fi
136+ # Fail on missing libraries
137+ if echo "$DEPS" | grep -q "not found"; then
138+ echo "::error::Binary has missing shared library dependencies"
139+ echo "$DEPS" | grep "not found"
140+ exit 1
141+ fi
142+ echo "✅ Linux binary dependencies look clean"
143+
124144 - name : Package release
125145 run : |
126146 zip -r dash-evo-tool-${{ matrix.platform }}.zip dash-evo-tool/
@@ -252,6 +272,27 @@ jobs:
252272 </plist>
253273 EOF
254274
275+
276+ - name : Verify macOS binary dependencies
277+ run : |
278+ echo "Checking dynamic library dependencies..."
279+ DEPS=$(otool -L build/dash-evo-tool)
280+ echo "$DEPS"
281+ # Only system libraries (/usr/lib/) and frameworks (/System/Library/) are allowed
282+ UNEXPECTED=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep -Ev "^(/usr/lib/|/System/Library/|@rpath/)")
283+ if [ -n "$UNEXPECTED" ]; then
284+ echo "::error::Binary links non-system libraries:"
285+ echo "$UNEXPECTED"
286+ exit 1
287+ fi
288+ # Warn on @rpath dependencies (acceptable for frameworks but worth noting)
289+ RPATH=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep "^@rpath/")
290+ if [ -n "$RPATH" ]; then
291+ echo "::warning::Binary has @rpath dependencies (verify these are bundled):"
292+ echo "$RPATH"
293+ fi
294+ echo "✅ macOS binary dependencies look clean"
295+
255296 - name : Import signing certificates
256297 uses : Apple-Actions/import-codesign-certs@v3
257298 with :
@@ -520,6 +561,27 @@ jobs:
520561 </plist>
521562 EOF
522563
564+
565+ - name : Verify macOS binary dependencies
566+ run : |
567+ echo "Checking dynamic library dependencies..."
568+ DEPS=$(otool -L build/dash-evo-tool)
569+ echo "$DEPS"
570+ # Only system libraries (/usr/lib/) and frameworks (/System/Library/) are allowed
571+ UNEXPECTED=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep -Ev "^(/usr/lib/|/System/Library/|@rpath/)")
572+ if [ -n "$UNEXPECTED" ]; then
573+ echo "::error::Binary links non-system libraries:"
574+ echo "$UNEXPECTED"
575+ exit 1
576+ fi
577+ # Warn on @rpath dependencies (acceptable for frameworks but worth noting)
578+ RPATH=$(echo "$DEPS" | tail -n +2 | awk '{print $1}' | grep "^@rpath/")
579+ if [ -n "$RPATH" ]; then
580+ echo "::warning::Binary has @rpath dependencies (verify these are bundled):"
581+ echo "$RPATH"
582+ fi
583+ echo "✅ macOS binary dependencies look clean"
584+
523585 - name : Import signing certificates
524586 uses : Apple-Actions/import-codesign-certs@v3
525587 with :
0 commit comments