Description
Feature Request
To boost the time it takes takes ignore false flags, I propose we add an interactive mode --interactive
where the CLI will prompt on each issue providing the ability to ignore by file, signature, or specify a regular expression. Each of these ignores will be added to one of the ignore files and be automatically added to the context ignore similar issues going forward.
NOTE: I have started development on this and would love to get some feedback before I get too far along on this. Thanks!
Is your feature request related to a problem? Please describe.
Running tartufo on a repo can lead to 300K+ lines of stdout to sift through. You find something, ignore it, run it again. Repeat. This is a long process.
Describe the solution you'd like
Add --interactive
flag that will prompt on each issue showing a region around the identified secret.
~~~~~~~~~~~~~~~~~~~~~
Reason: High Entropy
Filepath: README.md
Signature: 49d8990db16295778fdb98560s98d7fca9161c88423b6dc5cc4ffce74521483
...
npm run ui-test-widget
// Wildcard with testWidget
npm run ui-test-widget about @test/widget/manifest-409fc5dac7ea9ac53836a8bf2002e7ae.js
...
~~~~~~~~~~~~~~~~~~~~~
Action (IF=Ignore File, IS=Ignore Signature, IR=Ignore Regex, F=flag)? (IF, IS, IR, F): if
Ignore regular expression IR
will prompt for the regular expression. It will validate the regex on the matched content. Empty will return back to Action prompt.
Ignore Regular Expression (empty=choose another action): .*/widget/manifest-[a-z0-9]{32}\.js
Flag F
will append the flagged secret to a tartufoflagged.json
file.
{
"signature1": {
"path": "config/production.json",
"line": 21,
"commit": "commit1"
}
}
Describe alternatives you've considered
None available.