Skip to content
Closed
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
21 changes: 21 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title = "connect gitleaks config"

# Start from gitleaks' maintained default ruleset and layer an allowlist
# on top for known false positives, per the Git Hooks RFC:
# https://github.com/bcgov/connect/discussions/23
[extend]
useDefault = true

[allowlist]
description = "Lockfiles, this config, and documentation placeholders"
paths = [
'''pnpm-lock\.yaml''',
'''package-lock\.json''',
'''\.gitleaks\.toml''',
]
stopwords = [
"YOUR_API_KEY",
"YOUR_ACCESS_TOKEN",
"<YOUR_API_KEY>",
"YOUR_CLIENT_SECRET",
]
11 changes: 4 additions & 7 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Lefthook Git hooks configuration for Nuxt implementation
# Lefthook Git hooks configuration
# https://github.com/evilmartians/lefthook

pre-commit:
parallel: true
commands:
lint:
glob: "*.{js,ts,jsx,tsx,vue}"
run: pnpm run lint
typecheck:
glob: "*.{js,ts,vue}"
run: pnpm run typecheck
secret-scan:
tags: security
run: npx gitleaks-secret-scanner
15 changes: 1 addition & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,9 @@
"private": true,
"type": "module",
"scripts": {
"prepare": "lefthook install"
"prepare": "git --version && lefthook install || exit 0"
},
"devDependencies": {
"lefthook": "^1.11.3"
},
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"@sbc-connect/nuxt-auth",
"@sbc-connect/nuxt-base",
"@sbc-connect/nuxt-forms",
"@sbc-connect/nuxt-pay",
"better-sqlite3",
"esbuild",
"sharp",
"vue-demi"
]
}
}
3 changes: 3 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
packages: []
allowBuilds:
lefthook: false