Skip to content

Conversation

@tdunlap607
Copy link
Contributor

As mentioned by @SecurityRepo in issue #8, the tool would not return any potential vulnerabilities when used as a command-line tool. When using git-vuln-finder as a library, I received the error message:

File ".../venv/lib/python3.8/site-packages/git_vuln_finder/vulnerability.py", line 21, in find_vuln
    m = pattern.search(commit.message)
AttributeError: 'collections.defaultdict' object has no attribute 'search'

The issue is when loading the patterns, the PATTERNS_PATH was hard-coded to "./git_vuln_finder/patterns" and this path changes when installed; therefore, it would not load any patterns to search against. The path needs to be loaded dynamically: os.path.dirname(os.path.abspath(_ file _)) + "/patterns"

Once I made the change, git-vuln-finder started to return results. I have opened a pull request to resolve issue #8.

Thanks!

@adulau adulau merged commit 1a903da into cve-search:master Jun 27, 2021
@adulau
Copy link
Member

adulau commented Jun 27, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants