-
Notifications
You must be signed in to change notification settings - Fork 245
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
Scan between 2 SHAs #203
Comments
Additional info. Currently scanner gets all commits. See https://github.com/thoughtworks/talisman/blob/master/scanner/scanner.go#L66. |
I think the issue comes down to this line: https://github.com/thoughtworks/talisman/blob/master/scanner/scanner.go#L45
|
Might be able to use |
Hello 😄 I am interested in working/collaborating on this issue. @tinamthomas are you still working on it? Can I assign myself or collaborate with you? I have used talisman in a project before and can relate to the issue of wanting faster scans. regarding
I think from reading https://github.com/thoughtworks/talisman#talisman-in-action that talisman will only check the diff of staged files when used as pre-commit hook. The pre-post checks the entirety of files in the diffs to be pushed. When it comes to Scanning every file entirely on each commit in the history is probably not necessary. If a secret has been added in some commit it should be found in an addition in a diff since we check every diff anyway. Am interested in hearing your thoughts and how I can help 😄 |
Hi @teleivo, Feel free to assign yourself to it and we can collaborate on it. |
@tinamthomas thank you :) I cannot assign myself. Could this be because I am not a contributor/collaborator? |
@teleivo I've assigned myself to the issue for now. What I see happening now from the code:
I like your idea of only looking in the additions for potential secrets! This could potentially improve scan speed. Let me start putting the changes together and we can collaborate on it. |
Is your feature request related to a problem? Please describe.
For really huge pieces of code, we may not always want to scan all of git history.
Describe the solution you'd like
There should be a way to scan between 2 SHAs. So, when I run, say,
talisman --scan <sha1> <sha2>
, the scan should begin with sha1 and scan uptil sha2 (both sha1 and sha2 included in the scans).The execution command and parameter structure doesn't have to be exactly as mentioned here. Feel free to experiment with that technically.
The text was updated successfully, but these errors were encountered: