mirror of
https://github.com/cve-search/git-vuln-finder.git
synced 2024-11-22 14:57:20 +00:00
typo
This commit is contained in:
parent
caed1e9031
commit
ba558d34e4
2 changed files with 4 additions and 4 deletions
|
@ -83,7 +83,7 @@ def main():
|
||||||
defaultpattern
|
defaultpattern
|
||||||
for commit in commits:
|
for commit in commits:
|
||||||
if isinstance(defaultpattern, typing.Pattern):
|
if isinstance(defaultpattern, typing.Pattern):
|
||||||
ret = find_vuln(commit, pattern=defaultpattern, versbose=args.v)
|
ret = find_vuln(commit, pattern=defaultpattern, verbose=args.v)
|
||||||
if ret:
|
if ret:
|
||||||
rcommit = ret['commit']
|
rcommit = ret['commit']
|
||||||
_, potential_vulnerabilities = summary(rcommit,
|
_, potential_vulnerabilities = summary(rcommit,
|
||||||
|
@ -97,7 +97,7 @@ def main():
|
||||||
found += 1
|
found += 1
|
||||||
elif isinstance(defaultpattern, list):
|
elif isinstance(defaultpattern, list):
|
||||||
for p in defaultpattern:
|
for p in defaultpattern:
|
||||||
ret = find_vuln(commit, pattern=p, versbose=args.v)
|
ret = find_vuln(commit, pattern=p, verbose=args.v)
|
||||||
if ret:
|
if ret:
|
||||||
rcommit = ret['commit']
|
rcommit = ret['commit']
|
||||||
_, potential_vulnerabilities = summary(rcommit,
|
_, potential_vulnerabilities = summary(rcommit,
|
||||||
|
|
|
@ -78,10 +78,10 @@ def get_patterns(patterns_path=PATTERNS_PATH):
|
||||||
return patterns
|
return patterns
|
||||||
|
|
||||||
|
|
||||||
def find_vuln(commit, pattern, versbose=False):
|
def find_vuln(commit, pattern, verbose=False):
|
||||||
m = pattern.search(commit.message)
|
m = pattern.search(commit.message)
|
||||||
if m:
|
if m:
|
||||||
if versbose:
|
if verbose:
|
||||||
print("Match found: {}".format(m.group(0)), file=sys.stderr)
|
print("Match found: {}".format(m.group(0)), file=sys.stderr)
|
||||||
print(commit.message, file=sys.stderr)
|
print(commit.message, file=sys.stderr)
|
||||||
print("---", file=sys.stderr)
|
print("---", file=sys.stderr)
|
||||||
|
|
Loading…
Reference in a new issue