Skip to content

Commit 93f267e

Browse files
Run gitleaks CLI directly in CI and pin checkout action to SHA
1 parent 35a9c99 commit 93f267e

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/gitleaks.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ permissions:
1010
jobs:
1111
gitleaks:
1212
runs-on: ubuntu-latest
13+
env:
14+
GITLEAKS_VERSION: 8.30.0
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
1517
with:
1618
fetch-depth: 0
1719

18-
- name: Run gitleaks
19-
uses: gitleaks/gitleaks-action@v2
20-
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
- name: Install gitleaks
21+
run: |
22+
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \
23+
| tar -xz gitleaks
24+
sudo mv gitleaks /usr/local/bin/gitleaks
25+
gitleaks version
26+
27+
- name: Run gitleaks (working tree)
28+
run: gitleaks detect --no-git --redact --verbose --exit-code 1

0 commit comments

Comments
 (0)