aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/cve-generate-chartdata16
-rwxr-xr-xscripts/run-cvecheck1
2 files changed, 1 insertions, 16 deletions
diff --git a/scripts/cve-generate-chartdata b/scripts/cve-generate-chartdata
index dbbbe82..e187f8b 100755
--- a/scripts/cve-generate-chartdata
+++ b/scripts/cve-generate-chartdata
@@ -6,7 +6,7 @@ import subprocess
import tempfile
from datetime import datetime, date, timedelta
-args = argparse.ArgumentParser(description="Generate CVE count data files")
+args = argparse.ArgumentParser(description="Generate CVE count data file")
args.add_argument("-j", "--json", help="JSON data file to use")
args.add_argument("-r", "--resultsdir", help="results directory to parse")
args = args.parse_args()
@@ -18,16 +18,12 @@ except FileNotFoundError:
# if the file does not exist, start with an empty database.
counts = {}
-lastyear = {}
-
#
# Write CVE counts by day
#
def round_to_day(val):
return int((datetime.fromtimestamp(int(val)).date() - date(1970, 1, 1)).total_seconds())
-a_year_ago = (datetime.now() - timedelta(days=365) - datetime(1970, 1, 1)).total_seconds()
-
for branch in os.listdir(args.resultsdir):
branchdir = os.path.join(args.resultsdir, branch)
for f in os.listdir(branchdir):
@@ -51,15 +47,5 @@ for branch in os.listdir(args.resultsdir):
print("Adding count %s for branch %s from file %s (ts %s)" % (count, branch, cvereport, rounded_ts))
counts[rounded_ts][branch] = str(count)
-for c in counts:
- if int(c) > a_year_ago:
- lastyear[c] = counts[c]
-
with open(args.json, "w") as f:
json.dump(counts, f, sort_keys=True, indent="\t")
-
-with open(args.json.replace(".json", "-lastyear.json") , "w") as f:
- json.dump(lastyear, f, sort_keys=True, indent="\t")
-
-
-
diff --git a/scripts/run-cvecheck b/scripts/run-cvecheck
index 373f57c..d22dc82 100755
--- a/scripts/run-cvecheck
+++ b/scripts/run-cvecheck
@@ -105,5 +105,4 @@ if [ "$BRANCH" = "master" ]; then
fi
cp $METRICSDIR/cve-count-byday.json $RESULTSDIR
- cp $METRICSDIR/cve-count-byday-lastyear.json $RESULTSDIR
fi