-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) 路 1.04 KB
/
Copy pathgit_leaks.yml
File metadata and controls
34 lines (30 loc) 路 1.04 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
name: gitleaks
on: [pull_request, push, workflow_dispatch]
jobs:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run Gitleaks
id: gitleaks
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
continue-on-error: true
# with:
# args: detect --report-format=json --report-path=gitleaks-output.json
- name: Check Gitleaks Results
if: steps.gitleaks.outcome == 'failure'
run: |
echo "Gitleaks wykry艂 sekrety! PR zostanie zablokowany."
exit 1
- name: Comment on PR
if: github.event_name == 'pull_request' && steps.gitleaks.outcome == 'failure'
uses: mshick/add-pr-comment@v2
with:
message: "馃敀 Gitleaks wykry艂 sekrety w tym PR! Prosz臋 sprawdzi膰 logi i usun膮膰 wra偶liwe dane."
repo-token: ${{ secrets.GITHUB_TOKEN }}