fix: use project gitleaks config in CI, relax rules for documentation examples

This commit is contained in:
2026-03-18 12:48:05 +00:00
parent 62027c44dc
commit 8b1b9c8401
2 changed files with 6 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ jobs:
run: | run: |
curl -sL https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz \ curl -sL https://github.com/gitleaks/gitleaks/releases/download/v8.21.2/gitleaks_8.21.2_linux_x64.tar.gz \
| tar xz -C /usr/local/bin gitleaks | tar xz -C /usr/local/bin gitleaks
gitleaks detect --source . --exit-code 1 --report-format sarif --report-path gitleaks.sarif gitleaks detect --source . --config .gitleaks.toml --exit-code 1 --report-format sarif --report-path gitleaks.sarif
# ── CVE in Rust dependencies ──────────────────────────────────────────── # ── CVE in Rust dependencies ────────────────────────────────────────────
- name: Install cargo-audit - name: Install cargo-audit

View File

@@ -7,13 +7,16 @@ title = "NORA gitleaks rules"
[[rules]] [[rules]]
id = "private-network" id = "private-network"
description = "Private network addresses and internal domains" description = "Private network addresses and internal domains"
regex = '''(10\.25\.1\.\d+|10\.0\.\d+\.\d+|192\.168\.\d+\.\d+)''' regex = '''(10\.25\.1\.\d+|10\.0\.\d+\.\d+)'''
tags = ["network"] tags = ["network"]
[rules.allowlist]
regexTarget = "match"
regexes = ['''10\.0\.0\.0''']
[[rules]] [[rules]]
id = "internal-domains" id = "internal-domains"
description = "Internal domain names" description = "Internal domain names"
regex = '''[a-z0-9]+\.(lab|internal|local|corp)\b''' regex = '''[a-z0-9]+\.(lab|internal|local)\b'''
tags = ["network"] tags = ["network"]
[[rules]] [[rules]]