Skip to content

feat: use shared gitleaks rules from bcregistry-sre - #322

Merged
panish16 merged 1 commit into
bcgov:mainfrom
panish16:feat/shared-gitleaks-rules
Oct 14, 2026
Merged

panish16 merged 1 commit into
bcgov:mainfrom
panish16:feat/shared-gitleaks-rules

Conversation

@panish16

@panish16 panish16 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Pulls the gitleaks rules from bcgov/bcregistry-sre (git-hooks/, added in
bcregistry-sre#407) via lefthook remotes, same as ppr#2380. This adds the
shared hardcoded-password and custom-password rules on top of the gitleaks
defaults; .gitleaks.toml now extends the shared base and keeps only this
repo's own allowlists. The secret-scan command blocks the commit if the
shared rules haven't been downloaded, instead of scanning with no rules.

Two new allowlists for the only new matches in the tree:

  • docs/sb-manager/ - generated Storybook output, same as the existing docs/assets/ entry
  • RESET_PASSWORD = 'RESET_PASSWORD' enum value

Tested with real commits after npm ci on a fresh clone: allowlisted lines and process.env.X pass; literal passwords, near-miss enum values and a fake GitHub token are blocked; with the shared rules missing and GitHub unreachable the commit is blocked with "Shared gitleaks rules missing".

Pulls the gitleaks rules from bcgov/bcregistry-sre (git-hooks/, added in
bcregistry-sre#407) via lefthook remotes, same as ppr#2380. This adds the
shared hardcoded-password and custom-password rules on top of the gitleaks
defaults; .gitleaks.toml now extends the shared base and keeps only this
repo's own allowlists. The secret-scan command blocks the commit if the
shared rules haven't been downloaded, instead of scanning with no rules.
@panish16
panish16 merged commit c49694a into bcgov:main Oct 14, 2026
10 of 12 checks passed
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.

2 participants