From b35f1e77662387c16130ce0c6ebb5d12c683413b Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Mon, 20 Nov 2023 16:42:50 -0800 Subject: [PATCH 1/2] Add a gitleaks action CI file --- .github/workflows/gitleaks.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/gitleaks.yml diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml new file mode 100644 index 00000000..41e06152 --- /dev/null +++ b/.github/workflows/gitleaks.yml @@ -0,0 +1,19 @@ +name: gitleaks +on: + pull_request: + push: + workflow_dispatch: + schedule: + - cron: "0 4 * * *" # run once a day at 4 AM +jobs: + scan: + name: gitleaks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} # Only required for Organizations, not personal accounts. From dfe4d4de464e3ed784922dba49d9bb1e121f7820 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Mon, 20 Nov 2023 16:43:54 -0800 Subject: [PATCH 2/2] Add gitleaks to pre-commit hook --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40b838ae..842469d1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,11 @@ repos: args: ['--config=setup.cfg'] additional_dependencies: [flake8-isort] + - repo: https://github.com/gitleaks/gitleaks + rev: v8.16.1 + hooks: + - id: gitleaks + # sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date ci: