12 lines
511 B
Python
12 lines
511 B
Python
#!/usr/bin/env python3
|
|
import gzip
|
|
import json
|
|
from pathlib import Path
|
|
root = Path(__file__).resolve().parents[1]
|
|
state = json.loads((root/'state/sync.json').read_text())
|
|
kev = json.loads((root/'data/cisa-kev/catalog.json').read_text())
|
|
assert kev['count'] == len(kev['vulnerabilities']) == state['kev_count']
|
|
with gzip.open(root/'data/epss/current.csv.gz', 'rt', encoding='utf-8') as file:
|
|
assert any('cve,epss,percentile' in line for _, line in zip(range(10), file))
|
|
print('CISA KEV and EPSS validated')
|