Skip to content

Commit 420f9f6

Browse files
feat(ci): add gitleaks secrets scanning job
Add gitleaks-based secrets scanning CI job to replace GitGuardian. This uses open-source tooling without external API dependencies while maintaining comprehensive secret detection capabilities. - Replace scan job with secrets-scan job - Use gitleaks via justfile recipe - Update job dependency in set-variables
1 parent d9def21 commit 420f9f6

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,33 @@ permissions:
4747
id-token: write
4848

4949
jobs:
50-
scan:
51-
name: gitguardian
50+
secrets-scan:
51+
name: gitleaks
5252
runs-on: ubuntu-latest
5353
if: |
5454
github.event_name != 'workflow_dispatch' ||
5555
inputs.job == '' ||
56-
inputs.job == 'scan'
56+
inputs.job == 'secrets-scan'
5757
steps:
58-
- name: Checkout
58+
- name: Checkout repository
5959
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4
6060
with:
6161
fetch-depth: 0
62-
- name: GitGuardian scan
63-
uses: GitGuardian/ggshield-action@455483042671cc73b40d0e753baddffef7309a1f # ratchet:GitGuardian/ggshield-action@v1.37.0
62+
63+
- name: Setup Nix
64+
uses: ./.github/actions/setup-nix
6465
env:
65-
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
66-
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
67-
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
68-
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
69-
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
66+
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
67+
with:
68+
installer: ${{ inputs.nix_installer || 'quick' }}
69+
system: x86_64-linux
70+
setup-cachix: true
71+
72+
- name: Scan for secrets with gitleaks
73+
run: nix develop -c just scan-secrets
7074

7175
set-variables:
72-
needs: scan
76+
needs: secrets-scan
7377
runs-on: ubuntu-latest
7478
if: |
7579
!cancelled() &&

0 commit comments

Comments
 (0)