diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cvetool | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/cvetool b/bin/cvetool index 28b8901..05d0b6e 100755 --- a/bin/cvetool +++ b/bin/cvetool @@ -47,6 +47,13 @@ class CVETool: sys.exit(1) self.assign(args[0], [self.cleanup_cve(cve) for cve in args[1:]]) + elif command =='getcveidlist': + if len(args) < 1: + print('Usage: getcveidlist <CVE> [<CVE>...]') + print('Returns a list of the real CVE IDs') + sys.exit(1) + + self.getcveidlist([self.cleanup_cve(cve) for cve in args[0:]]) elif command == 'new': if len(args) != 1: print('Usage: new <CVE>') @@ -90,6 +97,11 @@ class CVETool: print(' State: ' + data['state']) print(' Bugs: ' + ' , '.join(['https://bugs.gentoo.org/' + str(bug) for bug in data['bugs']])) + def getcveidlist(self, cves): + cve_ids = [self.get_internal_cve_id(cve) for cve in cves] + print('CVE IDs: cves=' + ','.join([str(c) for c in cve_ids])) + + def assign(self, bug, cves): cve_ids = [self.get_internal_cve_id(cve) for cve in cves] response = self.request('/cve/assign/?bug=' + str(bug) + '&cves=' + ','.join([str(c) for c in cve_ids])) |