-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.14 KB
/
secret-scan.yml
File metadata and controls
46 lines (39 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Secret Scan
on:
pull_request:
push:
branches:
- main
- feat/**
schedule:
- cron: "17 3 * * 1"
workflow_dispatch:
jobs:
secret-scan:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 22
- name: Run tracked-file audit
run: npm run scan:security
- name: Install gitleaks
env:
GITLEAKS_VERSION: 8.30.0
run: |
curl -fsSL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" -o /tmp/gitleaks.tar.gz
tar -xzf /tmp/gitleaks.tar.gz -C /tmp gitleaks
mkdir -p "$HOME/.local/bin"
install /tmp/gitleaks "$HOME/.local/bin/gitleaks"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run current-tree gitleaks scan
run: npm run scan:security:head
- name: Run full-history gitleaks scan
run: npm run scan:security:history