Skip to content

Commit 5e19808

Browse files
authored
fix: use official gitleaks-action to fix 404 on version fetch (#19)
* fix: use official gitleaks-action to avoid GitHub API 404 on version fetch The manual curl to GitHub API for latest gitleaks release was failing with 404 due to rate limiting on unauthenticated requests.
1 parent bd28c3e commit 5e19808

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/security.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ jobs:
5252
with:
5353
fetch-depth: 0
5454

55+
- name: Set up Go
56+
uses: actions/setup-go@v6
57+
with:
58+
go-version: "1.25"
59+
cache: false
60+
5561
- name: Install gitleaks
56-
run: |
57-
GITLEAKS_VERSION=$(curl -s https://api.github.com/repos/gitleaks/gitleaks/releases/latest | grep tag_name | cut -d '"' -f4)
58-
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION#v}_linux_x64.tar.gz" -o gitleaks.tar.gz
59-
tar xzf gitleaks.tar.gz gitleaks
60-
sudo mv gitleaks /usr/local/bin/
62+
run: go install github.com/zricethezav/gitleaks/v8@v8.30.1
6163

6264
- name: Run gitleaks
6365
run: gitleaks detect --source . --verbose

0 commit comments

Comments
 (0)