-
-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (26 loc) · 763 Bytes
/
Copy pathsecret_scan.yml
File metadata and controls
30 lines (26 loc) · 763 Bytes
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
name: gitleaks
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
gitleaks:
name: gitleaks
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# gitleaks computes pull_request scan ranges from the PR head history.
# Checking out the head SHA avoids missing-range failures when queued
# PR jobs run after merge or branch cleanup.
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
- name: Run gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}