From 7771ea42f121b45f6fd2a550497dea416f851dde Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 21 Jun 2023 13:57:22 +0200 Subject: check-new-issues: add an explicit command for NOT-FOR-US This should avoid accidentally typing something and having it inserted as a NOT-FOR-US entry. --- bin/check-new-issues | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/check-new-issues b/bin/check-new-issues index fef315711f..7f4f3a0eec 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -297,9 +297,9 @@ def print_commands(): * !command to execute a command with system() without any escaping * v or e to launch an editor with the current item * - package-entry to add an entry for "package" and launch an editor (e.g. - poppler ) + * n to mark the issue as NOT-FOR-US: * q to save and quit - * CTRL-C to quit without saving - * everything else is inserted as product name for a NOT-FOR-US''') + * CTRL-C to quit without saving''') parser = argparse.ArgumentParser(description="review new CVE entries") parser.add_argument('-l', '--list', action='store_true', @@ -673,15 +673,18 @@ def present_issue(name): subprocess.run(f"{editor} {tmpname}", shell=True) #os.unlink(tmpname) continue - else: - set_cve_nfu(name, line) + elif m := re.match(f'^n\s+(.*)$', line): + nfu = m.group(1).strip() + set_cve_nfu(name, nfu) print("New entry set to:") print_cve(cves[name]) break + else: + print("unknown command") return quit -completion_commands = ".f .c .w .m .r .g ! v e - .help q d".split() +completion_commands = ".f .c .w .m .r .g ! v e - .help n q d".split() def complete_line(text, state): response = None -- cgit v1.2.3