diff --git a/git_vuln_finder/vulnerability.py b/git_vuln_finder/vulnerability.py index 606ad16..bf22dda 100644 --- a/git_vuln_finder/vulnerability.py +++ b/git_vuln_finder/vulnerability.py @@ -82,9 +82,11 @@ def summary( else: potential_vulnerabilities[rcommit.hexsha] = {} potential_vulnerabilities[rcommit.hexsha]["message"] = rcommit.message - potential_vulnerabilities[rcommit.hexsha]["language"] = langdetect( - rcommit.message - ) + try: + lang = langdetect(rcommit.message) + except: + lang = "unknown" + potential_vulnerabilities[rcommit.hexsha]["language"] = lang potential_vulnerabilities[rcommit.hexsha]["commit-id"] = rcommit.hexsha potential_vulnerabilities[rcommit.hexsha]["summary"] = rcommit.summary potential_vulnerabilities[rcommit.hexsha]["stats"] = rcommit.stats.total @@ -128,7 +130,7 @@ def summary_event( commit_state="under-review" ): potential_vulnerabilities = {} - + cve, cve_found = extract_cve(commit["message"]) potential_vulnerabilities[commit["sha"]] = {}