This is an automated email from the ASF dual-hosted git repository.

nvazquez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new 469fa7ad318 [CI] Add pre-commit hook to stop ZIP files being committed 
(#12930)
469fa7ad318 is described below

commit 469fa7ad318bce1f23c2e950fcc29624080f92ab
Author: John Bampton <[email protected]>
AuthorDate: Tue Sep 8 00:45:52 2026 +1000

    [CI] Add pre-commit hook to stop ZIP files being committed (#12930)
    
    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
---
 .pre-commit-config.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 25b0f75813a..f08f7432031 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -31,6 +31,17 @@ repos:
       - id: doctoc
         name: Add TOC for Markdown files
         files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
+  - repo: local
+    hooks:
+      - id: check-zip-file-is-not-committed
+        name: check no zip files are committed
+        description: Zip files are not allowed in the repository
+        language: fail
+        entry: |
+          Zip files are not allowed in the repository as they are hard to
+          track and have security implications. Please remove the zip file 
from the repository.
+        files: (?i)\.zip$
+        exclude: ^core/src/test/resources/vhds/test\.vhd\.zip$
   - repo: https://github.com/oxipng/oxipng
     rev: v10.1.0
     hooks:

Reply via email to