Failing if I mentioned organization search filter
Closed this issue · 3 comments
It fails if I mention the organization search fitler. I am trying to use this to scan our private Github organization:
python git-wild-hunt.py -s " extension:yml org:myorg filename:deploy.yml language:YAML"
Here is the error code:
git-wild-hunt is using config at path git-wild-hunt.conf
2020-06-21 03:20:30,636 - INFO - git-wild-hunt - INIT - git-wild-hunt v1
Traceback (most recent call last):
File "git-wild-hunt.py", line 190, in
results = search_github(github_token, s)
File "git-wild-hunt.py", line 30, in search_github
log.info("total results: {}".format(result['total_count']))
KeyError: 'total_count'
My questions:
Can I use it to scan my private repo with the right token?
Does it support organization search filter?
@askkhan84 it should work, although I haven't tried the organizational filter, also I should prob add a try/catch around this. Since this error is pretty ugly :-). Let me come back to you on this, thank you for raising.
Tested this, the org parameter does work, it might be just erroring because there are no results, added better error handling in this case: ff7ee82#diff-609c3ace5d61b1038fbf532a44a63a45 .. try doing a git pull getting latest version and running again. If the result is 0 it should crash but instead log an error.
@askkhan84 any luck with this?