-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow users to ignore findings #12
Comments
|
It'd be nice to not have to put comments directly in the yml, too - iow, to optionally support a |
That's a good idea!
version: 1
workflows:
foobar.yml:
ignore:
- some-rule-name or: version: 1
rules:
template-injection:
ignore:
- some-workflow.yml:line:col (as a rough sketch) |
(That would also allow CODEOWNERS to control access to the overrides) |
I personally would strongly prefer to put these as comments directly in the workflow YAML. That way whoever is responsible for that is also responsible for the overrides. Although I understand that might not be what everyone wants. If both approaches are possible, then great. Another problem with the external config file is that you might want to ignore one rule only for part of a workflow. That gets messy to keep the two in sync. |
Both sounds good to me; it's how eslint does it, and in practice it's fine to keep the two in sync. |
Yeah, I'm OK with having both. Comments will be little thorny in zizmor's case since there are other tools that use YAML comments for signaling (e.g. Dependabot supports version comments next to (In terms of getting some form of this in, I'm personally going to prioritize the config approach, since it requires fewer design thoughts about extending |
I think my ideal situation would be to ignore on a line-by-line basis, because there might be, e.g., one template injection that I know is safe in practice but I wouldn't want to ignore others that come up and might be unsafe. I recognize that it's more difficult. One approach could be to have optional version: 1
workflows:
foobar.yml:
ignore:
- template-injection
line:
- 8
- 42 This would tell zizmor to ignore template injections it finds on lines 8 and 42, but if one pops up on like 37, don't ignore it. The down side, of course, is that every time the workflow yaml changes, you have to go change the zizmor config, too. But as a wise man once said: "Life is pain, highness. Anyone who says differently is selling something." |
FYI: I've begun work on this in #116. There's still a bit more work to do, but it could definitely use early eyeballs/testers to make sure it accommodates your use cases! |
The config file variant of this is done and released with v0.2.0! I'm going to make a separate issue for the inline-comment variant. |
In theory we could do something like:
...but this is (1) annoying since it requires us to scan the YAML comments, and (2) might interfere with other tools that unfortunately read comments, like Dependabot.
The text was updated successfully, but these errors were encountered: