pre-commit: add hook to check for the existence of private keys#7805
Conversation
https://github.com/pre-commit/pre-commit-hooks#detect-private-key The "exclude" list is the list of "keys" currently found by this hook
Codecov Report
@@ Coverage Diff @@
## main #7805 +/- ##
============================================
- Coverage 13.44% 13.44% -0.01%
+ Complexity 9400 9396 -4
============================================
Files 2747 2747
Lines 258844 258844
Branches 40313 40313
============================================
- Hits 34804 34790 -14
- Misses 219655 219674 +19
+ Partials 4385 4380 -5 see 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@blueorangutan package |
|
@jbampton a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
DaanHoogland
left a comment
There was a problem hiding this comment.
looks good, not sure if the console proxy should be excluded though
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6640 |
Hey @DaanHoogland when you run this new hook for the first time it finds that list of keys in the codebase. So I was then excluding them assuming they were all valid keys that we need. |
yeah, makes sense and I have no doubts about most (systemvm and tests) . I'll need to look at the consoleproxy one. |
false alarm (didn't notice this is in a test dir as well) |
…ys (apache#7805)" This reverts commit 0b4afed.
https://github.com/pre-commit/pre-commit-hooks#detect-private-key
The "exclude" list is the list of "keys" currently found by this hook
Description
This PR adds another pre-commit hook or "test" to check for "keys" in the codebase
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
You can test locally with pre-commit from the repo root:
pre-commit run --all-filesTo just test this hook run:
pre-commit run detect-private-key --all-files