protectai / vulnhuntr

Zero shot vulnerability discovery using LLMs
GNU Affero General Public License v3.0
1.1k stars 113 forks source link

Specified analyze path does not exist: /root/abc/def/asd/asd_asd/utils.py #7

Closed cyb3rsalih closed 1 month ago

cyb3rsalih commented 1 month ago

Firstly thank you for this awesome project. Hope I make some contribution to this project for languages I know.

I built and run the docker image as docker run --rm --name vulnhuntr-container vulnhuntr -r /root/abc -l claude -a def/asd/asd_asd/utils.py -v

Traceback (most recent call last): File "/usr/local/bin/vulnhuntr", line 8, in <module> sys.exit(run()) File "/usr/local/lib/python3.10/site-packages/vulnhuntr/__main__.py", line 321, in run files_to_analyze = repo.get_files_to_analyze(Path(args.root) / analyze_path) File "/usr/local/lib/python3.10/site-packages/vulnhuntr/__main__.py", line 270, in get_files_to_analyze raise FileNotFoundError(f"Specified analyze path does not exist: {path_to_analyze}") FileNotFoundError: Specified analyze path does not exist: /root/abc/def/asd/asd_asd/utils.py

Then I tried cat /root/abc/def/asd/asdasd/utils.py I can see the content.

What should I do?

DanMcInerney commented 1 month ago

docker run --rm -e ANTHROPIC_API_KEY=sk-1234 -v /local/path/to/target/repo:/repo vulnhuntr:latest -r /repo -l claude -v

cyb3rsalih commented 1 month ago

Great it worked. We may add this to readme also

DanMcInerney commented 1 month ago

Yup I put a PR to add it to readme