added comments

This commit is contained in:
Cédric Bonhomme 2020-01-06 22:33:21 +01:00
parent df6c4c163e
commit a98bc11227
Signed by untrusted user who does not match committer: cedric
GPG key ID: A1CB94DE57B7A70D

View file

@ -55,6 +55,7 @@ def main():
parser.print_usage()
parser.exit()
# Launch the process
all_potential_vulnerabilities, all_cve_found, found = find(
args.r,
tags_matching=args.t,
@ -63,11 +64,13 @@ def main():
defaultpattern=args.p,
)
# Output the result as json. Can be piped to another software.
if not args.c:
print(json.dumps(all_potential_vulnerabilities))
elif args.c:
print(json.dumps(list(all_cve_found)))
# Output the result to stderr.
print(
"{} CVE referenced found in commit(s)".format(len(list(all_cve_found))),
file=sys.stderr,