-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
170 lines (148 loc) · 4.36 KB
/
.pre-commit-config.yaml
File metadata and controls
170 lines (148 loc) · 4.36 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Git state
- id: check-merge-conflict
- id: check-added-large-files
# Sensitive information
- id: detect-private-key
# Generic file state
- id: trailing-whitespace
- id: mixed-line-ending
# - id: end-of-file-fixer
# args: [--fix=lf]
exclude: .*\.tfvars$ # terraform fmt separates everything with blank lines leaving a trailing line at the end
- id: check-executables-have-shebangs
- id: requirements-txt-fixer
args: [--no-sort-keys, --autofix, --no-ensure-ascii]
# Language syntax/formatting
# - id: check-yaml
- id: check-json
- id: pretty-format-json
args: [--autofix]
- id: check-case-conflict
# - repo: https://github.com/adrienverge/yamllint
# rev: v1.35.1
# hooks:
# - id: yamllint
# args: [-d relaxed]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.13.0
hooks:
- id: eslint
files: ^.*\.(js|ts)$
- repo: https://github.com/bridgecrewio/checkov.git
rev: 3.2.269
hooks:
- id: checkov
args: [-d .]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
# Python formatting and style
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args: [--line-length=100]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
args: [--max-line-length=100]
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", --line-length=88]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.0"
hooks:
- id: ruff
args: ["--fix"]
exclude: doc/data/messages
- id: ruff
name: ruff-doc
files: doc/data/messages
# Type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
# Terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.96.1
hooks:
- id: terraform_fmt
- id: terraform_tflint
# GitHub Actions
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
hooks:
- id: actionlint
# Shellcheck
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.29.4
hooks:
- id: check-github-actions
- id: check-github-workflows
# # Python pip dependency check
# - repo: local
# hooks:
# - id: pip-outdated
# name: "Check for outdated pip packages"
# entry: bash -c 'pip list --outdated'
# language: system
# pass_filenames: false
# # # Node.js npm dependency check
# # - repo: local
# # hooks:
# # - id: npm-outdated
# # name: "Check for outdated npm packages"
# # entry: bash -c 'npm outdated'
# # language: system
# # pass_filenames: false
# # Docker image version outdated check using docker-outdated
# - repo: local
# hooks:
# - id: docker-outdated
# name: "Check for outdated Docker images"
# entry: bash -c 'docker-outdated'
# language: system
# pass_filenames: false
# # # Docker image security check using Trivy
# # - repo: local
# # hooks:
# # - id: trivy-scan
# # name: "Scan Docker images with Trivy"
# # entry: bash -c 'trivy image ${YOUR_DOCKER_IMAGE}' # Replace with your image name
# # language: system
# # pass_filenames: false
# # Python safety security scan
# - repo: local
# hooks:
# - id: safety-scan
# name: "Run Safety to check for Python package vulnerabilities"
# entry: bash -c 'safety check'
# language: system
# pass_filenames: false
# # npm audit security scan
# - repo: local
# hooks:
# - id: npm-audit
# name: "Run npm audit for security vulnerabilities"
# entry: bash -c 'npm audit'
# language: system
# pass_filenames: false
# Global exclude pattern
exclude: "docs|tests|examples|storage.*|wal|.*sops.*|.*encrypted.*"