mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
SEL-179 & SEL-312: Add gitleaks and GitGuardian scanning (#705)
* chore: add secret scanning setup * fix: correct GitGuardian action path * cr feedbacak * test husky commit * pr feedback * fix workflows * tweaks * fix versions * upgrade: migrate from husky v8 to v9 - Update husky from ^8.0.0 to ^9.1.7 - Change prepare script from 'husky install' to 'husky' - Remove v8 hook structure (shebang, husky.sh sourcing) - Delete .husky/_/ directory as it's not needed in v9 - Maintain gitleaks pre-commit hook functionality * coderabbitai feedback
This commit is contained in:
21
.github/workflows/gitguardian.yml
vendored
Normal file
21
.github/workflows/gitguardian.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: GitGuardian Scan
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
gitguardian:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # fetch all history so multiple commits can be scanned
|
||||
- name: GitGuardian scan
|
||||
uses: GitGuardian/ggshield/actions/secret@v1.41.0
|
||||
env:
|
||||
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
|
||||
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
|
||||
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
|
||||
20
.github/workflows/gitleaks.yml
vendored
Normal file
20
.github/workflows/gitleaks.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Gitleaks Scan
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
gitleaks:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install gitleaks
|
||||
uses: gitleaks/gitleaks-action@v2.3.9
|
||||
with:
|
||||
config-path: .gitleaks.toml
|
||||
fail: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
|
||||
Reference in New Issue
Block a user