Skip to content
This repository was archived by the owner on Oct 16, 2026. It is now read-only.

ci: add a gitleaks workflow that scans the commits of each PR - #1

Closed
tabedzki wants to merge 1 commit into
masterfrom
tabedzki/ci/gitleaks-pr-scan
Closed

tabedzki wants to merge 1 commit into
masterfrom
tabedzki/ci/gitleaks-pr-scan

Conversation

@tabedzki

Copy link
Copy Markdown

🤖 AI text below 🤖

Problem

This repo has no secret scanning in CI.

What changed

Adds a gitleaks workflow (and .github/scripts/gitleaks-changes.sh, the same script used in U19-pipeline-python). On a pull request or push it scans every commit since the base, plus the lines each merge commit introduced itself, so a secret typed in while resolving a conflict is caught too. It does not rescan old history on every run. A manual run (workflow_dispatch) scans the whole history.

  • The gitleaks binary is pinned to 8.30.1 and its sha256 is verified before use (a wrong checksum fails the job).
  • Actions are SHA-pinned, permissions: contents: read, persist-credentials: false; zizmor reports no findings.
  • The gitleaks job is not a required check (no ruleset on this repo).

Testing

The script was run against a scratch repo: a PR range with a token committed in an earlier commit fails (1 github-pat finding); an unchanged range, an all-zeros base and a clean range pass; an empty base scans the whole history. The install step was run with the real and a wrong checksum.

Assisted-by: ClaudeCode:claude-sonnet-5-5

Add a gitleaks workflow. On a PR (or push) it scans every commit since the
base, plus the lines merge commits introduced themselves, via
.github/scripts/gitleaks-changes.sh. A manual run (workflow_dispatch)
scans the whole history. The gitleaks binary is pinned to 8.30.1 and its
sha256 is checked before it is used.

Assisted-by: ClaudeCode:claude-sonnet-5-5
@tabedzki

Copy link
Copy Markdown
Author

🤖 AI text below 🤖

Closing: the last commit on the default branch was 2019-07-30, more than 5 years ago, so this repo is treated as inactive and is not getting the gitleaks workflow. Reopen it, or restore the branch tabedzki/ci/gitleaks-pr-scan, if the repo becomes active again.

@tabedzki tabedzki closed this Oct 16, 2026
@tabedzki
tabedzki deleted the tabedzki/ci/gitleaks-pr-scan branch October 16, 2026 01:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant