From d508ab16c6105162adec59f0daad4fe642424fc5 Mon Sep 17 00:00:00 2001 From: Sampath8797 Date: Fri, 5 Jun 2026 11:29:23 +0530 Subject: [PATCH] feat: Added Gitleaks workflow to detect secrets --- .github/workflows/detect-secrets.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/detect-secrets.yml diff --git a/.github/workflows/detect-secrets.yml b/.github/workflows/detect-secrets.yml new file mode 100644 index 0000000..7a52b1e --- /dev/null +++ b/.github/workflows/detect-secrets.yml @@ -0,0 +1,32 @@ +name: Secret Detection + +on: + pull_request: + types: [opened, synchronize, reopened] + push: + branches: + - 'master' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + scan: + name: Secret Detection + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + pull-requests: read + + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 #v4 + with: + fetch-depth: 0 + + - uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 #v2 + name: Secret Detection + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}