Skip to content

Commit

Permalink
Create gitleaks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
riddhi-desai authored Dec 20, 2023
1 parent 3588542 commit 0514ade
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# @format

name: Github Secrets Scanner

on: [push]

jobs:
gitleaks_scan:
runs-on: ubuntu-latest
env:
REPO: https://github.com/MeasureAuthoringTool/madie-qdm-service
REMOTE_EXCLUDES_URL: https://raw.githubusercontent.com/semanticbits/bmat-gitleaks-automation/master/madie-qdm-service/gitleaks.toml
GITLEAKS_VERSION: v7.6.1
steps:
- name: Execute Gitleaks
run: |
wget ${REMOTE_EXCLUDES_URL} -O gitleaks.toml
wget https://github.com/zricethezav/gitleaks/releases/download/${GITLEAKS_VERSION}/gitleaks-linux-amd64 -O gitleaks
chmod +x gitleaks
echo ${GITHUB_SHA}
echo "gitleaks --repo-url=${REPO} -v --redact --commit=${GITHUB_SHA} --config-path=gitleaks.toml"
./gitleaks --repo-url=${REPO} -v --redact --commit=${GITHUB_SHA} --config-path=gitleaks.toml
- name: Slack notification
if: failure()
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
uses: Ilshidur/action-slack@master
with:
args: "Potential Secrets found in: https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ GITHUB_SHA }} Link to build with full gitleaks output: https://github.com/{{ GITHUB_REPOSITORY }}/commit/{{ GITHUB_SHA }}/checks"

0 comments on commit 0514ade

Please sign in to comment.