Skip to content
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

Interactive mode #374

Open
twcclegg opened this issue Jul 31, 2022 · 0 comments
Open

Interactive mode #374

twcclegg opened this issue Jul 31, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@twcclegg
Copy link

Feature Request

Is your feature request related to a problem? Please describe.

It would be nice to have an interactive mode for use when cleaning up legacy repos.

Describe the solution you'd like

A flag somewhat akin to git add -p which would pause tartufo after each match, and after response to prompt continue the scan after reloading the tartufo.toml without having to start over.
A more advanced version could accept user input of to either update the tartufo.toml with the signature of a false positive or write out to a 'issue' file of real problems that need to be addressed.

Describe alternatives you've considered

Current strategy has been to abort tartufo after it's found a few issues, address them by hand, and then restart the scan

Teachability, Documentation, Adoption, Migration Strategy

example interface:


Reason: High Entropy
Filepath: Project/SomeFile.cs
Signature: fd1c9bfe7c636d7d17ee4ded238ae6ad8e026f6e5bd7b5e4582e33d1674b5fad
Commit time: 2009-03-26 01:07:17
Commit message: Some message
Commit hash: ee4a1261e697f28e096637c14c81e124876b055e
Branch: master
diff --git a/ Project/SomeFile.cs b/ Project/SomeFile.cs
index 5d9009f..7a219df 100644
--- a/ Project/SomeFile.cs
+++ b/ Project/SomeFile.cs
@@ -330,6 +330,22 @@ namespace Space
             if (String.Compare("Thing", value, true) != 0)
                 throw new Exception("Thing is not compatible with " + value);
         }
+        public bool IsSomething
+        {
+            get
+            {
+                return GetConfigValue("/some/sort/of/file/path/or.some.such") != "okay";
+            }
+            set
+            {
Mark signature as [f,i,c,q]?

Meanings:

  • f - false positive (prompt for reason, add signature to exclusion list)
  • i - real issue (prompt for reason and output to file)
  • c - continue (reload tartufo.toml and continue)
  • q - quit
@twcclegg twcclegg added the enhancement New feature or request label Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant