-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
32 lines (29 loc) · 926 Bytes
/
.pre-commit-config.yaml
File metadata and controls
32 lines (29 loc) · 926 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Go formatting
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.4
hooks:
- id: go-fmt
args: [-w]
# Go linting with golangci-lint v2 (includes formatters: gofmt, goimports)
- repo: https://github.com/golangci/golangci-lint
rev: v2.8.0
hooks:
- id: golangci-lint
args: [--config=.golangci.yml, --fix]
# Gitleaks - Secret scanning
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.0
hooks:
- id: gitleaks
# Trivy - Security scanning for filesystem
- repo: local
hooks:
- id: trivy-fs
name: Trivy filesystem scan
entry: trivy fs --exit-code 1 --severity HIGH,CRITICAL --scanners vuln,misconfig,secret .
language: system
pass_filenames: false
stages: [pre-commit]