Skip to content

Commit 19fdb20

Browse files
Fix architecture detection for cross-platform TruffleHog support
- Auto-detect runner architecture (aarch64 vs x86_64) - Download correct binary (linux_arm64 vs linux_amd64) - Fixes 'cannot execute binary file: Exec format error' on ARM64 runners - Supports both ubuntu-arm64-small and ubuntu-latest runners
1 parent 2472b1b commit 19fdb20

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/reusable-trufflehog.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ jobs:
4242
run: |
4343
# Download binary directly from GitHub releases for supply chain security
4444
VERSION="v${{ env.TRUFFLEHOG_VERSION }}"
45-
ARCH="linux_amd64"
45+
# Auto-detect architecture for cross-platform support
46+
if [[ "$(uname -m)" == "aarch64" ]]; then
47+
ARCH="linux_arm64"
48+
else
49+
ARCH="linux_amd64"
50+
fi
4651
BINARY_URL="https://github.com/trufflesecurity/trufflehog/releases/download/${VERSION}/trufflehog_${VERSION#v}_${ARCH}.tar.gz"
4752
4853
curl -sSfL "${BINARY_URL}" | tar -xz -C /tmp

0 commit comments

Comments
 (0)