-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
70 lines (68 loc) · 2.56 KB
/
.pre-commit-config.yaml
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
# DO NOT CHANGE. This file is being managed from a central repository
# To know more simply visit https://github.com/honestbank/.github/blob/main/docs/about.md
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Get the latest from: https://github.com/pre-commit/pre-commit-hooks/releases
hooks:
- id: check-yaml
args: ["--allow-multiple-documents"]
- id: check-added-large-files
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- repo: local
hooks:
- id: create-checkov-baseline
name: Create Checkov Baseline
entry: bash -c 'if [ ! -f .checkov.baseline ]; then echo "{}" > .checkov.baseline && touch baseline-created; fi'
language: system
stages: [commit]
pass_filenames: false
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.94.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
hooks:
- id: terraform_fmt
- id: terraform_validate
args:
- --hook-config=--retry-once-with-cleanup=true
- --tf-init-args=-upgrade
- id: terraform_tfsec
exclude: "test/"
args:
- --args=--exclude-downloaded-modules
- id: terraform_checkov
exclude: "test/"
args:
- --args=--config-file __GIT_WORKING_DIR__/.checkov.yaml --baseline __GIT_WORKING_DIR__/.checkov.baseline
- repo: local
hooks:
- id: delete-checkov-baseline
name: Delete Checkov Baseline
entry: bash -c 'if [ -f baseline-created ]; then rm .checkov.baseline && rm baseline-created; fi'
language: system
stages: [commit]
pass_filenames: false
- repo: https://github.com/gitguardian/ggshield
rev: v1.31.0
hooks:
- id: ggshield
language: python
stages: [commit]
args: ["secret", "scan", "pre-commit"]
- repo: local
hooks:
- id: docs
name: docs
entry: make
args: ["docs"]
language: system
pass_filenames: false
# Run this at the end so that we don't end up in infinite loop
# where the end of line fixer runs first and then the docs and fmt
# and other hooks that modify files will break it again.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 # Get the latest from: https://github.com/pre-commit/pre-commit-hooks/releases
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer