diff --git a/cuckoo/compat/config.py b/cuckoo/compat/config.py index 73a5a2c60..a8ccce8e8 100644 --- a/cuckoo/compat/config.py +++ b/cuckoo/compat/config.py @@ -718,6 +718,13 @@ def _206_207(c): c["cuckoo"]["cuckoo"]["web_secret"] = None c["kvm"]["kvm"]["dsn"] = "qemu:///system" c["processing"]["irma"]["probes"] = None + c["reporting"]["misp"]["distribution"] = 0 + c["reporting"]["misp"]["analysis"] = 0 + c["reporting"]["misp"]["threat_level"] = 4 + c["reporting"]["misp"]["min_malscore"] = 0 + c["reporting"]["misp"]["tag"] = "Cuckoo" + c["reporting"]["misp"]["upload_sample"] = False + return c migrations = { diff --git a/tests/test_config.py b/tests/test_config.py index 5d72eeffa..36846cb9f 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1177,6 +1177,9 @@ def test_migration_206_207(): [kvm] machines = cuckoo1 interface = virbr0 + """) + Files.create(cwd("conf"), "reporting.conf", """ +[misp] """) cfg = Config.from_confdir(cwd("conf"), loose=True) cfg = migrate(cfg, "2.0.6", "2.0.7") @@ -1186,6 +1189,12 @@ interface = virbr0 assert cfg["cuckoo"]["cuckoo"]["web_secret"] is None assert cfg["processing"]["irma"]["probes"] is None assert cfg["kvm"]["kvm"]["dsn"] == "qemu:///system" + assert cfg["reporting"]["misp"]["distribution"] == 0 + assert cfg["reporting"]["misp"]["analysis"] == 0 + assert cfg["reporting"]["misp"]["threat_level"] == 4 + assert cfg["reporting"]["misp"]["min_malscore"] == 0 + assert cfg["reporting"]["misp"]["tag"] == "Cuckoo" + assert cfg["reporting"]["misp"]["upload_sample"] is False class FullMigration(object): diff --git a/tests/test_startup.py b/tests/test_startup.py index a14fb8747..419792fcb 100644 --- a/tests/test_startup.py +++ b/tests/test_startup.py @@ -88,7 +88,6 @@ def test_init_modules(p, q, r, s): logs = "\n".join(logs) assert "KVM" in logs assert "Xen" in logs - assert "CreatesExe" in logs assert "SystemMetrics" in logs @mock.patch("cuckoo.core.startup.cuckoo")