From afc98667c448e07646b31b6ad9be667daca5feca Mon Sep 17 00:00:00 2001 From: vakarisz Date: Wed, 23 Feb 2022 14:50:16 +0200 Subject: [PATCH] Island: remove unused "creds" properties from monkey model --- monkey/monkey_island/cc/models/__init__.py | 1 - monkey/monkey_island/cc/models/creds.py | 10 ---------- monkey/monkey_island/cc/models/monkey.py | 1 - vulture_allowlist.py | 2 -- 4 files changed, 14 deletions(-) delete mode 100644 monkey/monkey_island/cc/models/creds.py diff --git a/monkey/monkey_island/cc/models/__init__.py b/monkey/monkey_island/cc/models/__init__.py index cab95ae18..212a20396 100644 --- a/monkey/monkey_island/cc/models/__init__.py +++ b/monkey/monkey_island/cc/models/__init__.py @@ -3,7 +3,6 @@ from .command_control_channel import CommandControlChannel # Order of importing matters here, for registering the embedded and referenced documents before # using them. from .config import Config -from .creds import Creds from .monkey import Monkey from .monkey_ttl import MonkeyTtl from .pba_results import PbaResults diff --git a/monkey/monkey_island/cc/models/creds.py b/monkey/monkey_island/cc/models/creds.py deleted file mode 100644 index d0861846d..000000000 --- a/monkey/monkey_island/cc/models/creds.py +++ /dev/null @@ -1,10 +0,0 @@ -from mongoengine import EmbeddedDocument - - -class Creds(EmbeddedDocument): - """ - TODO get an example of this data, and make it strict - """ - - meta = {"strict": False} - pass diff --git a/monkey/monkey_island/cc/models/monkey.py b/monkey/monkey_island/cc/models/monkey.py index af17e45a2..c7fe734b6 100644 --- a/monkey/monkey_island/cc/models/monkey.py +++ b/monkey/monkey_island/cc/models/monkey.py @@ -38,7 +38,6 @@ class Monkey(Document): # SCHEMA guid = StringField(required=True) config = EmbeddedDocumentField("Config") - creds = ListField(EmbeddedDocumentField("Creds")) dead = BooleanField() description = StringField() hostname = StringField() diff --git a/vulture_allowlist.py b/vulture_allowlist.py index 67399ff55..8e5a99516 100644 --- a/vulture_allowlist.py +++ b/vulture_allowlist.py @@ -74,10 +74,8 @@ meta # unused variable (monkey/monkey_island/cc/models/zero_trust/finding.py:37 meta # unused variable (monkey/monkey_island/cc/models/monkey_ttl.py:34) expire_at # unused variable (monkey/monkey_island/cc/models/monkey_ttl.py:36) meta # unused variable (monkey/monkey_island/cc/models/config.py:11) -meta # unused variable (monkey/monkey_island/cc/models/creds.py:9) meta # unused variable (monkey/monkey_island/cc/models/edge.py:5) Config # unused class (monkey/monkey_island/cc/models/config.py:4) -Creds # unused class (monkey/monkey_island/cc/models/creds.py:4) _.do_CONNECT # unused method (monkey/infection_monkey/transport/http.py:151) _.do_POST # unused method (monkey/infection_monkey/transport/http.py:122) _.do_HEAD # unused method (monkey/infection_monkey/transport/http.py:61)