davisjam / vuln-regex-detector

Detect vulnerable regexes in your project. REDOS, catastrophic backtracking.
MIT License
320 stars 29 forks source link

Docker Image - ERROR when parse #70

Closed karl0ss closed 4 years ago

karl0ss commented 4 years ago

I have built the docker image, and it seemed to build without issues.

I have created a /tmp/query folder and copied the unsafe-1.json from the test suite as pointed out to me, but when it runs I reports the following error

query docker run --rm -v /tmp/query:/query vuln-regex-detector bin/check-regex.pl /query/unsafe-1.json
Config says to use the cache
Config says useCache 1
, or } expected while parsing object/hash, at character offset 133 (before "\n") at bin/check-regex.pl line 69.

Not quite sure what to do, any help would be appreciated.

davisjam commented 4 years ago

I have attempted to recreate this issue but cannot.

I have an Ubuntu desktop. I ran the steps here (which presumably you also ran?).

Specifically:

(08:26:09) jamie@woody /tmp/vuln-regex-detector $ cd /tmp
(08:26:12) jamie@woody /tmp/vuln-regex-detector $ git clone https://github.com/davisjam/vuln-regex-detector
(08:27:00) jamie@woody /tmp/vuln-regex-detector $ docker build -t vuln-regex-detector .
(08:30:01) jamie@woody /tmp/vuln-regex-detector $ cp bin/test/check-regex/unsafe-1.json /tmp/query/
(08:30:10) jamie@woody /tmp/vuln-regex-detector $ docker run --rm -v /tmp/query:/query vuln-regex-detector bin/check-regex.pl /query/unsafe-1.json

I could not reproduce the issue you said.

Did you do precisely those steps?

karl0ss commented 4 years ago

Following your steps you posted, this now works, not sure what I had done wrong, thanks!