Skip to content

Commit 609bce7

Browse files
author
Nathan Gillett
committed
fix: align Wave 3 security gates with tools template
Use pinned gitleaks CLI, flatten allowlist TOML, and harden the allowlist expiry parser. Point JS CodeQL at the split pack. Signed-off-by: Nathan Gillett <nathan@intentproof.io>
1 parent 533df04 commit 609bce7

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,15 @@ jobs:
3131
with:
3232
fetch-depth: 0
3333

34+
- name: Install gitleaks
35+
run: |
36+
curl -sSfL \
37+
"https://github.com/gitleaks/gitleaks/releases/download/v8.24.2/gitleaks_8.24.2_linux_x64.tar.gz" \
38+
| tar -xz
39+
sudo install -m 755 gitleaks /usr/local/bin/gitleaks
40+
3441
- name: Run gitleaks
35-
uses: gitleaks/gitleaks-action@v2
36-
env:
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38-
GITLEAKS_CONFIG: .gitleaks.toml
42+
run: gitleaks detect --source . --config .gitleaks.toml --verbose --redact
3943

4044
analyze:
4145
name: "IntentProof Security: CodeQL (${{ matrix.language }})"

.gitleaks.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ useDefault = true
88

99
[allowlist]
1010
description = "Global allowlist paths for false positives"
11+
regexTarget = "match"
1112
paths = [
1213
'''\.git/''',
1314
'''\.coverage''',
1415
'''tests/fixtures/''',
1516
]
16-
17-
[allowlist.regexTarget]
17+
# Example test vectors and documentation placeholders only.
1818
regexes = [
1919
'''EXAMPLE|PLACEHOLDER|REDACTED|xxxxxxxx''',
2020
]

scripts/check-codeql-allowlist.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ entries = []
2828
current = None
2929
for line in text.splitlines():
3030
stripped = line.strip()
31-
if stripped.startswith("- ") and "rule_id:" in stripped:
31+
if stripped.startswith("- "):
3232
if current:
3333
entries.append(current)
3434
current = {}
35-
m = re.search(r"rule_id:\s*(\S+)", stripped)
35+
item = stripped[2:].strip()
36+
m = re.search(r"rule_id:\s*(\S+)", item)
3637
if m:
3738
current["rule_id"] = m.group(1)
39+
m = re.search(r"expires:\s*(\S+)", item)
40+
if m:
41+
current["expires"] = m.group(1)
3842
continue
3943
if current is None:
4044
continue

0 commit comments

Comments
 (0)