[CI] Add pre-commit hook to stop ZIP files being committed - #12930
[CI] Add pre-commit hook to stop ZIP files being committed#12930jbampton wants to merge 4 commits into
Conversation
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12930 +/- ##
=========================================
Coverage 19.64% 19.65%
- Complexity 19790 19792 +2
=========================================
Files 6368 6368
Lines 574889 574889
Branches 70353 70353
=========================================
+ Hits 112962 112970 +8
+ Misses 449656 449646 -10
- Partials 12271 12273 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17310 |
There was a problem hiding this comment.
Pull request overview
Adds a pre-commit safeguard to prevent accidental commits of .zip artifacts, aligning with the repo’s CI/dev hygiene goals and reducing risk from opaque binary blobs.
Changes:
- Introduces a local
pre-commithook that fails commits containing.zipfiles (case-insensitive). - Adds a targeted exclusion for the existing test resource
core/src/test/resources/vhds/test.vhd.zip.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
.pre-commit-config.yaml:42
- The failure message uses singular wording ("the zip file") even though multiple ZIPs could match, and the block-scalar
|preserves newlines (including a trailing newline) which can make the output look odd. Prefer a folded scalar (>) with plural wording.
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.
.pre-commit-config.yaml:37
- Hook name is grammatically awkward; consider using a clearer, imperative phrase (and consistent ZIP capitalization) so the hook list reads well.
This issue also appears on line 40 of the same file.
name: check no zip files are committed
|
@jbampton , why the autoscale label? |
Sorry @DaanHoogland it was a mistake. |
DaanHoogland
left a comment
There was a problem hiding this comment.
i approve out of principle, but am not sure if our repo is clean enough for this ;)
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
Description
This PR...
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Ran
pre-commit run --all-filesHow did you try to break this feature and the system with this change?