Add zizmor security linter to pre-commit#7006
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7006 +/- ##
=======================================
Coverage 94.77% 94.77%
=======================================
Files 145 145
Lines 29047 29047
Branches 3931 3931
=======================================
Hits 27529 27529
Misses 714 714
Partials 804 804 |
| name: "Pull Request Labeler" | ||
| on: | ||
| pull_request_target: | ||
| pull_request: |
There was a problem hiding this comment.
We will need to manually add labels to pull requests from external repositories. However, this should be acceptable for safety reasons.
There was a problem hiding this comment.
How does this tool work for enforcing policies? E.g. does it error if there are critical flaws, and only warn if mid-risk flaws are found?
e.g. if this change is reverted, will pre-commit fail?
There was a problem hiding this comment.
If this change is reverted, the check will fail. Currently, errors occur at all stages of risk assessment. If needed, the configuration can be reviewed for potential adjustments.
user27182
left a comment
There was a problem hiding this comment.
+1 for security, that ultralytics case sounds like a nightmare which we want to avoid.
| name: "Pull Request Labeler" | ||
| on: | ||
| pull_request_target: | ||
| pull_request: |
There was a problem hiding this comment.
How does this tool work for enforcing policies? E.g. does it error if there are critical flaws, and only warn if mid-risk flaws are found?
e.g. if this change is reverted, will pre-commit fail?
Co-authored-by: user27182 <89109579+user27182@users.noreply.github.com>
|
I guess there are new errors after updating to |
banesullivan
left a comment
There was a problem hiding this comment.
Thanks for adding zizmor!
|
For the new cache-poisoning errors, I think ignoring the errors for any testing workflows is mostly ok. The main remediation seems to be to remove any caching from workflows that publish build artifacts, which I would think only applies to actions that check |
Co-authored-by: user27182 <89109579+user27182@users.noreply.github.com>
d13c98e
Overview
Recently, there was an attack on the Ultralytics package. For more information, please see Supply-chain attack analysis: Ultralytics. In this article, it is suggested that checking actions with zizmor. Let's consider using zizmor checks in pre-commit.
Details