-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
79 lines (79 loc) · 2.05 KB
/
.pre-commit-config.yaml
File metadata and controls
79 lines (79 loc) · 2.05 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
#
# Run pre-commit hooks. You can run them without installing
# the hook with
#
# $ pre-commit run --all-files
#
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages:
- pre-commit
exclude: "^archived/"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
# Manage spaces.
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-symlinks
- id: mixed-line-ending
args: [--fix=lf]
# Check file syntax/format
- id: check-xml
- id: check-json
- id: check-yaml
args: [--allow-multiple-documents]
exclude: 'ex-.*\.yaml'
# Security checks.
- id: detect-private-key
- id: detect-aws-credentials
args:
# See https://github.com/pre-commit/pre-commit-hooks/issues/174
- --allow-missing-credentials
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
files: \.(yaml|yml)$
exclude: 'config\.yaml|ex-.*\.yaml'
#
# Python linters.
#
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.14.13
hooks:
# Run the linter.
- id: ruff
args: [--fix]
files: ^python-high-school/
exclude: ^python-for-sysadmin|\.ipynb$
- # Run the formatter.
id: ruff-format
files: ^python-high-school/
exclude: ^python-for-sysadmin|\.ipynb$
#
# Security linters.
#
- repo: https://github.com/bridgecrewio/checkov.git
rev: 3.2.507 # change to tag or sha
hooks:
- id: checkov
- id: checkov_secrets
stages: ["pre-push"]
- repo: local
hooks:
- id: trufflehog
name: TruffleHog v3.93.3
description: Detect secrets in your data.
entry: bash -c 'docker run -c 2 --rm -v "$(pwd):/workdir" -i --rm
docker.io/trufflesecurity/trufflehog@sha256:06c1f230512cbb694954716fa5e0adbfb95809c7bfb5a50c25110847417b69db git file:///workdir --since-commit
HEAD --results=verified,unknown --fail'
language: system
stages: ["pre-push"]
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.22.0
hooks:
- id: zizmor