muchdogesec / cxe2stix_helper

A small Python wrapper to download data using cve2stix and cpe2stix.
https://www.dogesec.com/
Apache License 2.0
2 stars 1 forks source link

Do not print empty bundles where no data exists #3

Closed himynamesdave closed 3 months ago

himynamesdave commented 3 months ago

In the early years, e.g.

python3 cxe2stix_helper.py \
    --run_cve2stix \
    --last_modified_earliest 2005-01-01T00:00:00 \
    --last_modified_latest 2007-01-01T23:59:59 \
    --file_time_range 1d

There are often no CVEs/CPEs that exist on the day/month.

As such, lots of empty bundles are created (that only contain the default identity and marking definition).

If not CVE/CPE objects are identified in the time range, the bundle for the period should not be generated.

e.g. an example output from a run might be

│   ├── 2023-01
│   │   ├── cve-bundle-2023_01_01-2023_01_01.json
│   │   └── cve-bundle-2023_01_01-2023_01_31.json
fqrious commented 3 months ago

should close when muchdogesec/cve2stix#8 and muchdogesec/cpe2stix#1 are merged