aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-08 18:45:56 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-08 18:45:56 +0000
commita4520f48194d05b2425bf6633bd4a7775cb57928 (patch)
tree8adf0a3fb56b1cc1ec3431ac22747ced9852b691
parent1f08385bf4694b83498f80e9e04cded7cc0cc606 (diff)
downloadvulns-a4520f48194d05b2425bf6633bd4a7775cb57928.tar.gz
scripts: add initial cut for making a mbox file
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-xscripts/bippy12
-rwxr-xr-xscripts/cve_create8
2 files changed, 14 insertions, 6 deletions
diff --git a/scripts/bippy b/scripts/bippy
index 2dd7fcef..e42cd170 100755
--- a/scripts/bippy
+++ b/scripts/bippy
@@ -289,6 +289,18 @@ fi # end json creation
# Compose the mbox file
#########################
if [[ "${MBOX_FILE}" != "" ]] ; then
+ cat << EOF > "${MBOX_FILE}"
+From: Linux Kernel CVE team <cve@kernel.org>
+Subject: ${CVE_NUMBER}: ${subject}
+
+${CVE_NUMBER} has been assigned for the following issue:
+
+${commit_text}
+
+Affected versions:
+
+EOF
+
dbg "mbox file written to ${MBOX_FILE}"
fi # end mbox creation
diff --git a/scripts/cve_create b/scripts/cve_create
index 565d4649..bb80af00 100755
--- a/scripts/cve_create
+++ b/scripts/cve_create
@@ -92,12 +92,8 @@ mkdir "${PUBLISHED_DIR}" 2> /dev/null
mv "${ID}" "${PUBLISHED_DIR}"
echo "${GIT_SHA_FULL}" > "${PUBLISHED_DIR}/${ID}.sha1"
-# write the new json entry out, using bippy
-${DIR}/bippy --cve=${ID} --sha=${GIT_SHA_FULL} --json="${PUBLISHED_DIR}/${ID}.json"
-
-# write the mbox entry out
-# TODO - use ????
-touch "${PUBLISHED_DIR}/${ID}.mbox"
+# write the new json and mbox entry out, using bippy
+${DIR}/bippy --cve=${ID} --sha=${GIT_SHA_FULL} --json="${PUBLISHED_DIR}/${ID}.json" --mbox="${PUBLISHED_DIR}/${ID}.mbox"
# say all is good, and give the id
echo "CVE id ${ID} was allocated for git commit ${GIT_SHA_FULL}"