From d615aa2fa5bc8ad34053b9d447c35eae9dbd065b Mon Sep 17 00:00:00 2001 From: nidr0x Date: Sat, 17 Aug 2024 11:22:31 +0200 Subject: [PATCH] Add gitleaks --- .github/workflows/gitleaks.yaml | 21 +++++++++++++++++++++ .pre-commit-config.yaml | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/gitleaks.yaml diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml new file mode 100644 index 00000000..7f322568 --- /dev/null +++ b/.github/workflows/gitleaks.yaml @@ -0,0 +1,21 @@ +--- +name: gitleaks + +on: + pull_request: + push: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" + +jobs: + scan: + name: gitleaks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7e084f5d..cac068e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,10 @@ +fail_fast: false repos: - repo: https://github.com/onedr0p/sops-pre-commit rev: v2.1.0 hooks: - id: forbid-secrets + - repo: https://github.com/zricethezav/gitleaks + rev: v8.18.4 + hooks: + - id: gitleaks