Skip to content

Commit

Permalink
Merge pull request #17 from HackUCF/precommit
Browse files Browse the repository at this point in the history
Add gitleaks precommit hook
  • Loading branch information
jontyms authored Sep 26, 2024
2 parents 765e8c2 + 020633a commit 8cbfe2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: pre-commit

on: [pull_request, push]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: pip
- run: python -m pip install pre-commit
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always --all-files
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
hooks:
- id: gitleaks
args: [--baseline-path, .github/workflows/gitleaks-baseline.json]

0 comments on commit 8cbfe2d

Please sign in to comment.