Open amine-bee opened 2 years ago
Hi team any update on this ?
Update : the problem is related to \r\n not handled correctly. Patterns generated from an unix system with \n char as EOL are loaded correctly on windows.
To fix on windows, convert you prohibited and allowed files to have Unix style EOL. You can set this in the .gitattribute
file like below:
# Force Patterns file to have eol as lf
ScanPatterns/*.txt text eol=lf
Hi team.
The load_patterns() function doesn't seem to add the patterns of my custom secret provider when I run a scan on windows. The same function works fine on ubuntu / MacOS.
Here is what my .gitconfig looks like.
Here is the output of my custom provider binary. (a bunch of detection patterns)
Here is the test secret detection that works fine on Linux/Ubuntu but simply not on Windows.
echo 'AKIAJBRHKV6EVTTNXDHATEST' | git secrets --scan -
As I said earlier, when executing the scan on windows (from a cmd.exe or a PS shell) the load_patterns() function does not load the patterns echo'd by the custom secret provider.
Hence the detection is not working properly.