Skip to content

Commit d63d337

Browse files
security: add gitleaks CI secret scanning
1 parent 75a86ab commit d63d337

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/secret-scan.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Secret Scan
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
gitleaks:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Run gitleaks
21+
uses: gitleaks/gitleaks-action@v2
22+
env:
23+
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ cargo test
7070

7171
- If behavior changes, update docs in the same PR (`README.md`, `AGENTS.md`, this file, or `SECURITY.md` when relevant).
7272

73+
## Secret Scanning
74+
75+
- CI runs `gitleaks` on pushes and pull requests.
76+
- Before opening a PR, run a local scan if `gitleaks` is installed:
77+
78+
```bash
79+
gitleaks git --no-banner
80+
```
81+
7382
## Commit Guidelines
7483

7584
Use Conventional Commits where possible:

0 commit comments

Comments
 (0)