Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ permissions:
id-token: write

jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0

- name: Setup Nix
uses: ./.github/actions/setup-nix

- name: Run Gitleaks
run: nix develop --command gitleaks detect --source . --config .gitleaks.toml

typos:
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 11 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Gitleaks configuration
# https://github.com/gitleaks/gitleaks

[extend]
useDefault = true

[allowlist]
description = "Global allowlist"
paths = [
'''pnpm-lock\.yaml$''',
]
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
nixfmt-rfc-style
typos
typos-lsp

# security
gitleaks
];

shellHook = ''
Expand Down
2 changes: 2 additions & 0 deletions lefthook.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pre-commit:
piped: true
jobs:
- name: gitleaks
run: gitleaks protect --staged --config .gitleaks.toml
- name: oxlint
glob: '*.{ts,tsx,js,jsx,mts,cts}'
run: pnpm oxlint --max-warnings=0 --type-aware --type-check --fix {staged_files}
Expand Down
Loading