gitleaks icon indicating copy to clipboard operation
gitleaks copied to clipboard

Problem loading config in Windows platform

Open amrityam opened this issue 4 years ago • 7 comments

Hi,

I am trying to load config .toml file using below command in windows. gitleaks --path="F:\Test\secret_scan\vuln_app" --no-git --report="F:\Test\secret_scan\scan_report.json" --config-path="F:\Test\secret_scan\gitleaks\examples\leaky-repo.toml"

But it is giving me below error. time="2021-02-24T10:46:49+05:30" level=error msg="problem loading config: error parsing regexp: invalid escape sequence: \\T"

I have tried with multiple .toml files however nothing works. Even for a blank .toml file also it gives same error. However same command works fine in linux platform.

config_loading_error_windows

cc @zricethezav

Best Regards

amrityam avatar Feb 24 '21 05:02 amrityam

Can be mitigated by running in git bash

amq avatar Mar 09 '21 18:03 amq

I'm facing the same issue. And git bash can't be ran on every machine (it may be restricted by other security tools)

marian-craciunescu avatar Oct 21 '21 09:10 marian-craciunescu

Hello!

Can we take a look at those .toml files that we are using as config?

Thank you!

w0rmr1d3r avatar Oct 22 '21 07:10 w0rmr1d3r

any toml config manifested the same way actually.

marian-craciunescu avatar Nov 18 '21 10:11 marian-craciunescu

I unfortunately do not have a windows machine to test on. If someone could provide a solution that would be great

zricethezav avatar Nov 24 '21 22:11 zricethezav

Reverse the slashes will work. Use / instead of \

JoostVoskuil avatar Nov 28 '21 16:11 JoostVoskuil

Problem does not exist anymore with Gitleaks v8

JoostVoskuil avatar Nov 28 '21 16:11 JoostVoskuil