Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
54 lines (54 loc) · 2.31 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
54 lines (54 loc) · 2.31 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
---
# Checks run on commit (`pre-commit install`) and in CI (`pre-commit run
# --all-files`, plus the manual-stage `gitleaks-all` hook); hook versions are
# pinned to commits, and Dependabot bumps them (`pre-commit` ecosystem)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# Schemas of GitHub's files: issue forms and their `config.yml`, workflows,
# composite actions (`action.yml`) and the Dependabot configuration
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: a76b92851fc9eede9f9bc4073eb55202f34eb0df # frozen: 0.39.0
hooks:
- id: check-github-issue-forms
- id: check-github-issue-config
- id: check-github-workflows
# Also the shared composite actions in `actions/<name>/`
- id: check-github-actions
files: ^(actions/[^/]+/|\.github/actions/(.+/)?)?action\.ya?ml$
- id: check-dependabot
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: 341e2a331ba578029e66c2e01183e7a6b5ca9ab4 # frozen: v0.24.0
hooks:
- id: markdownlint-cli2
- repo: https://github.com/gitleaks/gitleaks
rev: 83d9cd684c87d95d656c1458ef04895a7f1cbd8e # frozen: v8.30.1
hooks:
# Staged changes on commit
- id: gitleaks
# The whole checkout, in CI (`--hook-stage manual`); also scans
# untracked and ignored files when run locally
- id: gitleaks
alias: gitleaks-all
name: Detect hardcoded secrets (all files)
entry: gitleaks dir --redact --verbose
stages: [manual]
# Shell scripts of the composite actions and their tests
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95 # frozen: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/rhysd/actionlint
rev: 914e7df21a07ef503a81201c76d2b11c789d3fca # frozen: v1.7.12
hooks:
# Workflows (`.github/workflows/`); also checks their scripts with
# shellcheck if it is installed (as on GitHub-hosted runners)
- id: actionlint