aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-20 13:18:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-20 13:18:07 +0100
commitae24984bc409a9213246e6410a7d26d1423f2d9f (patch)
tree8da6584a669404c33e3caf9831a50d21cce2c81c
parent05dc633a549e8aa77eb1a66ebceb20d7f1fab6a5 (diff)
downloadvulns-ae24984bc409a9213246e6410a7d26d1423f2d9f.tar.gz
justfile: add basic stats function
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-xjustfile17
1 files changed, 17 insertions, 0 deletions
diff --git a/justfile b/justfile
index 659bf1d3..4ac40afd 100755
--- a/justfile
+++ b/justfile
@@ -19,3 +19,20 @@ cve_update:
cve_publish_json:
cd {{invocation_directory()}}; scripts/cve_publish_json
+# List a summary of the ids at this point in time
+list_ids:
+ #!/usr/bin/env bash
+ cd cve/reserved
+ echo "Number of allocated, but not assigned CVE ids, by year:"
+ for dir in $(ls); do
+ count=$(find ${dir}/ -type f | wc -l)
+ echo " ${dir}: ${count}"
+ done
+
+ cd ../../cve/published
+ echo "Number of assigned CVE ids, by year:"
+ for dir in $(ls); do
+ count=$(find ${dir}/ -type f | grep "sha1" | wc -l)
+ echo " ${dir}: ${count}"
+ done
+