feat(secu): add gitleaks configuration

This commit is contained in:
sc979 2025-04-07 16:19:53 +02:00
parent 59d5ef16d2
commit c91e1adb21
2 changed files with 28 additions and 2 deletions

21
.github/workflows/gitleaks.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: gitleaks
on:
pull_request:
workflow_dispatch:
jobs:
scan:
name: gitleaks
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@83373cf2f8c4db6e24b41c1a9b086bb9619e9cd3 # v2.3.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}}
GITLEAKS_ENABLE_COMMENTS: false
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: false
GITLEAKS_ENABLE_SUMMARY: false

View File

@ -5,15 +5,20 @@ useDefault = true
[allowlist]
paths = [
'''node_modules\/''',
'''vendor\/''',
'''(.*?)\.rptlibrary''',
'''package\.json''',
'''package-lock\.json''',
'''pnpm-lock\.yaml''',
'''composer\.json''',
'''composer\.lock''',
'''yarn\.lock''',
'''\.gitleaks\.toml$''',
'''(.*?)(jpg|gif|doc|pdf|bin)$'''
]
regexTarget = "match"
regexes = [
'''ABCDEFG1234567890''',
'''s\.aBCD123DEF456GHI789JKL012'''
'''ABCDEFG1234567890'''
]