From 6a5a3c2b78a4ac055aea1e43b003441fbd3972c9 Mon Sep 17 00:00:00 2001 From: David Culbreth Date: Wed, 4 Mar 2026 22:44:37 -0600 Subject: [PATCH] trying again with ci pipeline --- .gitea/workflows/ci.yml | 17 +++++++++++++++-- Makefile | 13 ++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 41abbdc..3689d75 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -81,8 +81,21 @@ jobs: - name: Install Gitleaks run: | mkdir -p "$HOME/bin" - curl -sSfL https://raw.githubusercontent.com/gitleaks/gitleaks/master/install.sh \ - | sh -s -- -b "$HOME/bin" v8.24.2 + GITLEAKS_VERSION="8.24.2" + ARCH="$(uname -m)" + case "$ARCH" in + x86_64) ARCH="x64" ;; + aarch64|arm64) ARCH="arm64" ;; + *) + echo "Unsupported architecture: $ARCH" + exit 1 + ;; + esac + curl -sSfL \ + -o /tmp/gitleaks.tar.gz \ + "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_${ARCH}.tar.gz" + tar -xzf /tmp/gitleaks.tar.gz -C "$HOME/bin" gitleaks + chmod +x "$HOME/bin/gitleaks" - name: Gitleaks run: | diff --git a/Makefile b/Makefile index d31036f..71604f6 100644 --- a/Makefile +++ b/Makefile @@ -343,7 +343,18 @@ ci-web-advisory: ci-security-blocking: mkdir -p $$HOME/bin - curl -sSfL https://raw.githubusercontent.com/gitleaks/gitleaks/master/install.sh | sh -s -- -b $$HOME/bin v8.24.2 + GITLEAKS_VERSION="8.24.2"; \ + ARCH="$$(uname -m)"; \ + case "$$ARCH" in \ + x86_64) ARCH="x64" ;; \ + aarch64|arm64) ARCH="arm64" ;; \ + *) echo "Unsupported architecture: $$ARCH"; exit 1 ;; \ + esac; \ + curl -sSfL \ + -o /tmp/gitleaks.tar.gz \ + "https://github.com/gitleaks/gitleaks/releases/download/v$$GITLEAKS_VERSION/gitleaks_$$GITLEAKS_VERSION"_linux_"$$ARCH".tar.gz; \ + tar -xzf /tmp/gitleaks.tar.gz -C $$HOME/bin gitleaks; \ + chmod +x $$HOME/bin/gitleaks $$HOME/bin/gitleaks git --report-format sarif --report-path gitleaks.sarif --config .gitleaks.toml ci-security-advisory: