security: run pre-commit autoupdate --freeze; Pin to sha all hooks - #13855
security: run pre-commit autoupdate --freeze; Pin to sha all hooks#13855jbampton wants to merge 1 commit into
Conversation
Format Python code to fix the new Flake8 linters errors
There was a problem hiding this comment.
Pull request overview
This pull request updates the repository’s pre-commit configuration to pin hook revisions to immutable SHAs (for supply-chain/security hardening) and applies formatting/style fixes that address selected Flake8 checks and whitespace issues in existing Python scripts.
Changes:
- Updated
.pre-commit-config.yamlto freeze hook revisions to specific commit SHAs. - Cleaned up whitespace/trailing-space issues in XenServer plugin scripts.
- Adjusted a few Python membership tests to the Flake8-preferred
not inform.
Reviewed changes
Copilot reviewed 4 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
scripts/vm/hypervisor/xenserver/vmopsSnapshot |
Whitespace cleanup (blank-line/trailing-space normalization) in XenServer snapshot plugin script. |
scripts/vm/hypervisor/xenserver/vmops |
Minor whitespace/style tweaks in XenServer vmops script. |
scripts/vm/hypervisor/xenserver/cloudstack_pluginlib.py |
Updated membership checks to not in in tunnel verification logic. |
plugins/hypervisors/ovm/src/main/scripts/vm/hypervisor/ovm/OvmOCFS2Module.py |
Updated membership checks to not in in OCFS2 cluster status parsing. |
.pre-commit-config.yaml |
Pinned pre-commit hooks to commit SHAs (“frozen”) and updated hook formatting. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13855 +/- ##
============================================
+ Coverage 3.41% 19.64% +16.23%
- Complexity 0 19790 +19790
============================================
Files 487 6368 +5881
Lines 41867 574889 +533022
Branches 7912 70353 +62441
============================================
+ Hits 1429 112963 +111534
- Misses 40238 449655 +409417
- Partials 200 12271 +12071
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:
|
Format Python code to fix the new Flake8 linters errors
Description
This PR updates updates the hooks and pins them to SHA for security. Ran pre-commit and oxipng also optimized some images
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested on my local machine with
pre-commit run --all-filesthlorenz/doctoc@59dcae9
oxipng/oxipng@340cd98
gitleaks/gitleaks@83d9cd6
Lucas-C/pre-commit-hooks@ad1b27d
pre-commit/pre-commit-hooks@3e8a870
codespell-project/codespell@57b2140
PyCQA/flake8@c48217e
igorshubovych/markdownlint-cli@5b5dddc
adrienverge/yamllint@cba56bc
How did you try to break this feature and the system with this change?