diff --git a/sig-security-tooling/cve-feed/hack/fetch-cve-feed.sh b/sig-security-tooling/cve-feed/hack/fetch-cve-feed.sh index 80ae29d..e4459a1 100755 --- a/sig-security-tooling/cve-feed/hack/fetch-cve-feed.sh +++ b/sig-security-tooling/cve-feed/hack/fetch-cve-feed.sh @@ -14,7 +14,6 @@ # limitations under the License. set -o nounset -set -o errexit set -o pipefail # name of the output file diff --git a/sig-security-tooling/cve-feed/hack/fetch-official-cve-feed.py b/sig-security-tooling/cve-feed/hack/fetch-official-cve-feed.py index 546c757..d8faece 100755 --- a/sig-security-tooling/cve-feed/hack/fetch-official-cve-feed.py +++ b/sig-security-tooling/cve-feed/hack/fetch-official-cve-feed.py @@ -17,6 +17,7 @@ import copy import json import requests +import sys from datetime import datetime, timezone from cve_title_parser import parse_cve_title @@ -103,11 +104,14 @@ def getCVEStatus(state, state_reason): cve_list.append(cve) except LookupError: - non_parsable_cve_list.append(item['title']) + non_parsable_cve_list.append((item['title'], item['html_url'])) feed_envelope['items'] = cve_list json_feed = json.dumps(feed_envelope, sort_keys=False, indent=4) print(json_feed) if len(non_parsable_cve_list) != 0: + print("Failed to parse below CVE issues:", file=sys.stderr) + for title, url in non_parsable_cve_list: + print(f"{title}\n{url}", file=sys.stderr) exit(7)