diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-21 23:24:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-21 23:24:07 +0100 |
commit | 9e59a406736a636dcf3e5002c456b67aa9fbb0e5 (patch) | |
tree | 5371a3397d314d47a1179d2a8645d58805ab8932 | |
parent | af96f452cb870f4251bd5f5207375dc6c68566ae (diff) | |
download | vulns-9e59a406736a636dcf3e5002c456b67aa9fbb0e5.tar.gz |
scripts/bippy: Fix up some array handling
Can now output a valid JSON file that the tools will accept!
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-x | scripts/bippy | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/bippy b/scripts/bippy index d2aba16d..d59be7a6 100755 --- a/scripts/bippy +++ b/scripts/bippy @@ -172,19 +172,22 @@ cveMetadata=$(jo -- assignerOrgId="${ORGID}" \ -s serial="1" \ state="PUBLISHED") -descriptions=$(jo -- \ +d=$(jo -- \ lang="en" \ -s value="${commit_text}" \ ) +descriptions=$(jo -a -- "${d}") + providerMetadata=$(jo -- \ orgId="${ORGID}" \ ) -references=$(jo -- \ - url="${URL}" \ +r=$(jo -- \ + url="${URL}" \ ) +references=$(jo -a -- "${r}") versions=$(jo -- \ -s lessThan="6.7" \ @@ -193,12 +196,14 @@ versions=$(jo -- \ -s versionType="custom" \ ) -affected=$(jo -- \ +a=$(jo -- \ product="Linux" \ vendor="Linux" \ ${vuln_array} \ ) +affected=$(jo -a -- "${a}") + cna=$(jo -- \ providerMetadata="${providerMetadata}" \ descriptions="${descriptions}" \ |