Add an extensible filtering mechanism for reporting #143
Replies: 3 comments
-
One example for this is a case where you might have a risk accepted secret (e.g. it's a token with minimal scopes), you could use the filtering program to remove the secret based on a literal or hash comparison of the secret |
Beta Was this translation helpful? Give feedback.
-
Another useful category would be whether the finding is for a "secret" like an API key, or something more informational like an s3 bucket name (https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/rules/aws.yml#L120-L121) |
Beta Was this translation helpful? Give feedback.
-
Indeed. I also second this. The 'postprocessing' would be much easier with this kind of logic, its essentially what I did when I created a 'json' file for skips etc. |
Beta Was this translation helpful? Give feedback.
-
Use case
You are reviewing a bunch of findings from Nosey Parker and want to focus on particular categories of findings, eliminate findings from certain files or repos, etc.
Existing limitations
At present, the only way to do this is to write some postprocessing script. This has a couple downsides:
noseyparker summarize
output only on the filtered results.)Proposal
The
report
andsummarize
commands should have an additional--filter CMD
option that behaves as follows:CMD
is the name of a program that takes a JSON array of findings on stdin and emits a JSON array of findings on stdoutCMD
returns a non-zero exit code, prints unintelligible output, or emits findings that did not appear in the original input,noseyparker
exits with an error--filter CMD
is given to either thereport
orsummarize
commands, the filter program is run on Nosey Parker's findings as soon as they are loaded, but prior to downstream processing withinnoseyparker
Beta Was this translation helpful? Give feedback.
All reactions