Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion actions/leak-scan/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ run_all_refs_scan() {
if command -v gitleaks >/dev/null 2>&1; then
gitleaks detect \
--source=. \
--all \
--log-opts="--all" \
--redact \
--report-path=gitleaks-report.json \
2>&1 || gitleaks_exit=$?
Expand Down
13 changes: 10 additions & 3 deletions tests/test_deploy_platform_d.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,19 @@ def test_unknown_mode_fails_with_error_code(self) -> None:
self.assertIn("E_UNKNOWN_LEAK_SCAN_MODE", result.stderr)

def test_all_refs_mode_line_in_script(self) -> None:
"""T-D2: all-refs mode runs gitleaks with --all and --redact flags."""
"""T-D2: all-refs mode runs gitleaks with --log-opts=--all and --redact flags."""
script_text = LEAK_SCAN_RUN.read_text(encoding="utf-8")
# Script uses line continuations; check for key flags independently
# gitleaks v8.x uses --log-opts="--all" instead of a standalone --all flag.
# Assert the combined form to catch regression back to the bare --all invocation.
self.assertIn("gitleaks detect", script_text)
self.assertIn("--all", script_text)
self.assertIn('--log-opts="--all"', script_text)
self.assertIn("--redact", script_text)
# Regression guard: the all-refs block must NOT use a standalone --all flag.
self.assertNotIn(
" --all \\\n",
script_text,
"run.sh must not pass --all as a standalone flag to gitleaks detect (gitleaks v8.x removed it)",
)

def test_path_mode_detects_ipv4_literal(self) -> None:
"""T-D2: path mode detects IPv4 literal and emits redacted gate-summary."""
Expand Down
Loading