Closed shreyas-sriram closed 2 years ago
Another thing I noticed is that the first (oldest) commit is never scanned.
Output from --debug
mentions that there are 0 changes in the first commit.
0 changes in b86a81ffe21f40e5186cd0f3da3e4d90fee40a73
This can also be seen in the PR's sample output (https://github.com/N0MoreSecr3ts/wraith/pull/139#issue-1353195555) under Commits Dirty.......: 4
. The expected number of dirty commits is 5.
This is great I will review it this week coming up. The first commit is never scanned possibly because it is root. It may not be able to go back as git might not be able, as it currently stands, to pull changes as there are no changes to pull being the absolute commit.
@shreyas-sriram
Addresses https://github.com/N0MoreSecr3ts/wraith/issues/134 and https://github.com/N0MoreSecr3ts/wraith/issues/138.
Logic for
case PartContent
infunc (s PatternSignature) ExtractMatch(..)
is updated to handle non-locaPath scanType. The code snippet was correct, but the flow of execution was wrong. This has been fixed.In
io.go
, the execution is meant to continue even if the file does not exist in the filesystem. What happens otherwise (before this) is, wraith doesn't see the file in the filesystem for git scans and ignores the file.Sample Output
Running wraith against https://github.com/shreyas-sriram/git-with-secrets.
Before
After