Skip to content

Remove git-secrets references and add GitLeaks guidance#373

Open
walteck wants to merge 1 commit intomainfrom
chwa1-secret-scanning-changes
Open

Remove git-secrets references and add GitLeaks guidance#373
walteck wants to merge 1 commit intomainfrom
chwa1-secret-scanning-changes

Conversation

@walteck
Copy link
Copy Markdown
Contributor

@walteck walteck commented Apr 20, 2026

No description provided.

@walteck walteck requested a review from a team as a code owner April 20, 2026 07:32
@sonarqubecloud
Copy link
Copy Markdown

Comment thread tools/gitleaks.md
One option is to use `pre-commit`:

```yaml
repos:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the gitleaks precommit hook to the latest release? The current rev: v8.24.2 is several versions behind, the latest is v8.30.1.

Would it also be worth pinning to the commit SHA with a version comment, to stay consistent with the hash-pinning approach we require for GitHub Actions?

repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: 83d9cd684c87d95d656c1458ef04895a7f1cbd8e  # v8.30.1
    hooks:
      - id: gitleaks

Comment thread tools/gitleaks.md
2. Record why they are needed.
3. Review them regularly and remove them when no longer justified.

## Further reading
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good overview. Up to you if you think it's worth it, but some teams might benefit from a section with some tips on integrating gitleaks on repos where the commit history is especially long. For example, in the spineii repo we have a commit history of nearly 400K commits which takes ~10 minutes to scan if you do the whole lot.

We adopted a strategy of only scanning new commits on any given branch (after having separately done the initial scan of the full history).

The eventual approach is in-place here: https://github.com/NHSDigital/spineii/blob/develop/.github/workflows/scan-secrets-on-branch.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants