mirror of
https://github.com/adulau/git-vuln-finder.git
synced 2024-11-22 10:07:11 +00:00
added comments
This commit is contained in:
parent
df6c4c163e
commit
a98bc11227
1 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,7 @@ def main():
|
||||||
parser.print_usage()
|
parser.print_usage()
|
||||||
parser.exit()
|
parser.exit()
|
||||||
|
|
||||||
|
# Launch the process
|
||||||
all_potential_vulnerabilities, all_cve_found, found = find(
|
all_potential_vulnerabilities, all_cve_found, found = find(
|
||||||
args.r,
|
args.r,
|
||||||
tags_matching=args.t,
|
tags_matching=args.t,
|
||||||
|
@ -63,11 +64,13 @@ def main():
|
||||||
defaultpattern=args.p,
|
defaultpattern=args.p,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Output the result as json. Can be piped to another software.
|
||||||
if not args.c:
|
if not args.c:
|
||||||
print(json.dumps(all_potential_vulnerabilities))
|
print(json.dumps(all_potential_vulnerabilities))
|
||||||
elif args.c:
|
elif args.c:
|
||||||
print(json.dumps(list(all_cve_found)))
|
print(json.dumps(list(all_cve_found)))
|
||||||
|
|
||||||
|
# Output the result to stderr.
|
||||||
print(
|
print(
|
||||||
"{} CVE referenced found in commit(s)".format(len(list(all_cve_found))),
|
"{} CVE referenced found in commit(s)".format(len(list(all_cve_found))),
|
||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
|
|
Loading…
Reference in a new issue