From 330e69b0f5f317b0cacc181e731c97e0744d7025 Mon Sep 17 00:00:00 2001 From: panish16 Date: Wed, 14 Oct 2026 12:09:09 -0700 Subject: [PATCH 1/2] feat: use shared gitleaks rules from bcregistry-sre 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 allowlist. The secret-scan command blocks the commit if the shared rules haven't been downloaded, instead of scanning with no rules. --- .gitleaks.toml | 9 +++++---- lefthook.yml | 10 +++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitleaks.toml b/.gitleaks.toml index bdc0af9a9..059ea792d 100644 --- a/.gitleaks.toml +++ b/.gitleaks.toml @@ -1,10 +1,11 @@ title = "namerequest gitleaks config" -# Start from gitleaks' maintained default ruleset and layer an allowlist -# on top for this repo's known false positives, per the Git Hooks RFC: -# https://github.com/bcgov/connect/discussions/23 +# Shared rules (gitleaks defaults + password rules) come from bcgov/bcregistry-sre, +# downloaded by lefthook remotes - see lefthook.yml and +# https://github.com/bcgov/bcregistry-sre/tree/main/git-hooks +# Only this repo's own false positives go below. [extend] -useDefault = true +path = ".git/info/lefthook-remotes/bcregistry-sre-main/git-hooks/gitleaks-base.toml" [allowlist] description = "Files that routinely trip default rules with non-secret content" diff --git a/lefthook.yml b/lefthook.yml index 4fc71da54..bd2db3ad1 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -6,4 +6,12 @@ pre-commit: commands: secret-scan: tags: security - run: npx gitleaks-secret-scanner + run: if [ ! -f .git/info/lefthook-remotes/bcregistry-sre-main/git-hooks/gitleaks-base.toml ]; then echo Shared gitleaks rules missing - run npx lefthook install; exit 1; fi; npx --yes gitleaks-secret-scanner + +# Shared gitleaks rules: https://github.com/bcgov/bcregistry-sre/tree/main/git-hooks +remotes: + - git_url: https://github.com/bcgov/bcregistry-sre + ref: main + refetch_frequency: 24h + configs: + - git-hooks/lefthook-remote.yml From ad8c0398732d1b084e2faca61649f8ef8b4e1fef Mon Sep 17 00:00:00 2001 From: panish16 Date: Thu, 15 Oct 2026 09:08:07 -0700 Subject: [PATCH 2/2] fix: lint error from #893 (missing space before }) --- app/src/components/lower-info-area/name-build-info.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/lower-info-area/name-build-info.vue b/app/src/components/lower-info-area/name-build-info.vue index 304091314..87d959f8e 100644 --- a/app/src/components/lower-info-area/name-build-info.vue +++ b/app/src/components/lower-info-area/name-build-info.vue @@ -94,7 +94,7 @@ import { Component, Vue } from 'vue-property-decorator' import { Getter } from 'pinia-class' import { useStore } from '@/store' -import { BusinessDesignation, ConsentWords, ExampleName, UnavailableWords, UniqueNames} +import { BusinessDesignation, ConsentWords, ExampleName, UnavailableWords, UniqueNames } from '@/components/lower-info-area/name-build-sub-components' @Component({