Skip to content

Commit 90fc4d0

Browse files
committed
[CI] Add pre-commit hook to stop ZIP files being committed
Zip files are hard to track and have security implications https://pre-commit.com/#repos-repo https://pre-commit.com/#repository-local-hooks https://pre-commit.com/#fail
1 parent 7eea9ed commit 90fc4d0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ repos:
3131
- id: doctoc
3232
name: Add TOC for Markdown files
3333
files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
34+
- repo: local
35+
hooks:
36+
- id: check-zip-file-is-not-committed
37+
name: check no zip files are committed
38+
description: Zip files are not allowed in the repository
39+
language: fail
40+
entry: |
41+
Zip files are not allowed in the repository as they are hard to
42+
track and have security implications. Please remove the zip file from the repository.
43+
files: (?i)\.zip$
44+
exclude: ^core/src/test/resources/vhds/test\.vhd\.zip$
3445
- repo: https://github.com/oxipng/oxipng
3546
rev: v9.1.5
3647
hooks:

0 commit comments

Comments
 (0)