Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/leaked-secrets-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Leaked Secrets Scan

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 3 * * *'
workflow_dispatch:

jobs:
gitleaks-cli:
name: gitleaks (CLI)
runs-on: ubuntu-latest
env:
GITLEAKS_VERSION: '8.30.0'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Install gitleaks
run: |
curl -sSfL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \
| tar -xz -C /usr/local/bin gitleaks
gitleaks version

- name: Run gitleaks
run: gitleaks detect --source . --redact -c .gitleaks.toml -v --report-format sarif --report-path gitleaks-report.sarif

- name: Upload report
uses: actions/upload-artifact@v7
if: always()
with:
name: gitleaks-report
path: gitleaks-report.sarif
retention-days: 30
2 changes: 2 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Gitleaks configuration
# Add path or regex allowlists here if false positives arise
7 changes: 7 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Lefthook Git Hooks Configuration
# Documentation: https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md

pre-push:
commands:
gitleaks:
run: gitleaks protect --staged --redact
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"lint:tsc": "pnpm tsc --noEmit",
"rollup": "rollup --config rollup.config.mjs",
"storybook": "storybook dev -p 6006 --disable-telemetry",
"prepare": "lefthook install",
"storybook:build": "storybook build -o storybook-static",
"storybook:publish": "gh-pages -b storybook/publish -d storybook-static"
},
Expand Down Expand Up @@ -81,6 +82,7 @@
"eslint-plugin-react-hooks": "^5.1.0",
"file-loader": "^6.2.0",
"gh-pages": "^6.2.0",
"lefthook": "^1.11.0",
"react-dom": "^18.3.1",
"react-router-dom": "^7.12.0",
"rollup": "^4.27.3",
Expand Down
100 changes: 100 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading