From f98e2ea97228153a5f17772006993e3eb00a0f7b Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 15 Jul 2020 07:01:36 +0000 Subject: [PATCH 1/2] fix: upgrade react-spinners from 0.5.13 to 0.9.0 Snyk has created this PR to upgrade react-spinners from 0.5.13 to 0.9.0. See this package in NPM: https://www.npmjs.com/package/react-spinners See this project in Snyk: https://app.snyk.io/org/shaynehmad/project/37aecb9c-98b4-4735-95a2-83d941303b4e?utm_source=github&utm_medium=upgrade-pr --- monkey/monkey_island/cc/ui/package-lock.json | 35 +++----------------- monkey/monkey_island/cc/ui/package.json | 2 +- 2 files changed, 5 insertions(+), 32 deletions(-) diff --git a/monkey/monkey_island/cc/ui/package-lock.json b/monkey/monkey_island/cc/ui/package-lock.json index 1a66ea551..0344c2015 100644 --- a/monkey/monkey_island/cc/ui/package-lock.json +++ b/monkey/monkey_island/cc/ui/package-lock.json @@ -2720,11 +2720,6 @@ "supports-color": "5.5.0" } }, - "change-emitter": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/change-emitter/-/change-emitter-0.1.6.tgz", - "integrity": "sha1-6LL+PX8at9aaMhma/5HqaTFAlRU=" - }, "character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", @@ -10696,13 +10691,11 @@ } }, "react-spinners": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/react-spinners/-/react-spinners-0.5.13.tgz", - "integrity": "sha512-zrQTWlyhqs+3nQ4Zpg19eW4elYQgrrvu0fXL1tIP3CKgLBxkO+rmXdL8l34qTHrpDZnukMFGLxyqQebijeVSJA==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/react-spinners/-/react-spinners-0.9.0.tgz", + "integrity": "sha512-+x6eD8tn/aYLdxZjNW7fSR1uoAXLb9qq6TFYZR1dFweJvckcf/HfP8Pa/cy5HOvB/cvI4JgrYXTjh2Me3S6Now==", "requires": { - "@emotion/core": "10.0.28", - "prop-types": "15.7.2", - "recompose": "0.30.0" + "@emotion/core": "^10.0.15" } }, "react-table": { @@ -10884,26 +10877,6 @@ } } }, - "recompose": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/recompose/-/recompose-0.30.0.tgz", - "integrity": "sha512-ZTrzzUDa9AqUIhRk4KmVFihH0rapdCSMFXjhHbNrjAWxBuUD/guYlyysMnuHjlZC/KRiOKRtB4jf96yYSkKE8w==", - "requires": { - "@babel/runtime": "7.9.6", - "change-emitter": "0.1.6", - "fbjs": "0.8.17", - "hoist-non-react-statics": "2.5.5", - "react-lifecycles-compat": "3.0.4", - "symbol-observable": "1.2.0" - }, - "dependencies": { - "hoist-non-react-statics": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", - "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" - } - } - }, "redent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", diff --git a/monkey/monkey_island/cc/ui/package.json b/monkey/monkey_island/cc/ui/package.json index 3858a46c8..4cad22a74 100644 --- a/monkey/monkey_island/cc/ui/package.json +++ b/monkey/monkey_island/cc/ui/package.json @@ -97,7 +97,7 @@ "react-particles-js": "^3.2.1", "react-redux": "^5.1.2", "react-router-dom": "^4.3.1", - "react-spinners": "^0.5.13", + "react-spinners": "^0.9.0", "react-table": "^6.10.3", "react-toggle": "^4.1.1", "react-tooltip-lite": "^1.10.0", From 3fb1d248ae044753ec2364ecd3ce8c80e82fc2f3 Mon Sep 17 00:00:00 2001 From: Ace Pace Date: Wed, 15 Jul 2020 16:07:42 +0300 Subject: [PATCH 2/2] Fix typos --- monkey/common/data/zero_trust_consts.py | 2 +- monkey/common/utils/mongo_utils.py | 4 ++-- monkey/infection_monkey/exploit/shellshock.py | 4 ++-- monkey/infection_monkey/exploit/sshexec.py | 4 ++-- monkey/monkey_island/cc/models/monkey.py | 2 +- monkey/monkey_island/cc/services/config_schema.py | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/monkey/common/data/zero_trust_consts.py b/monkey/common/data/zero_trust_consts.py index 7135485da..8d55bc320 100644 --- a/monkey/common/data/zero_trust_consts.py +++ b/monkey/common/data/zero_trust_consts.py @@ -57,7 +57,7 @@ PRINCIPLES = { PRINCIPLE_ENDPOINT_SECURITY: "Use anti-virus and other traditional endpoint security solutions.", PRINCIPLE_DATA_TRANSIT: "Secure data at transit by encrypting it.", PRINCIPLE_RESTRICTIVE_NETWORK_POLICIES: "Configure network policies to be as restrictive as possible.", - PRINCIPLE_USERS_MAC_POLICIES: "Users' permissions to the network and to resources should be MAC (Mandetory " + PRINCIPLE_USERS_MAC_POLICIES: "Users' permissions to the network and to resources should be MAC (Mandatory " "Access Control) only.", } diff --git a/monkey/common/utils/mongo_utils.py b/monkey/common/utils/mongo_utils.py index 4c5a7f669..0dd610b01 100644 --- a/monkey/common/utils/mongo_utils.py +++ b/monkey/common/utils/mongo_utils.py @@ -24,7 +24,7 @@ class MongoUtils: return o elif isinstance(o, str): - # mongo dosn't like unprintable chars, so we use repr :/ + # mongo doesn't like unprintable chars, so we use repr :/ return repr(o) elif hasattr(o, "__class__") and o.__class__ == wmi._wmi_object: @@ -32,7 +32,7 @@ class MongoUtils: elif hasattr(o, "__class__") and o.__class__ == win32com.client.CDispatch: try: - # objectSid property of ds_user is problematic and need thie special treatment. + # objectSid property of ds_user is problematic and need this special treatment. # ISWbemObjectEx interface. Class Uint8Array ? if str(o._oleobj_.GetTypeInfo().GetTypeAttr().iid) == "{269AD56A-8A67-4129-BC8C-0506DCFE9880}": return o.Value diff --git a/monkey/infection_monkey/exploit/shellshock.py b/monkey/infection_monkey/exploit/shellshock.py index 4c4c9eff0..db3347c66 100644 --- a/monkey/infection_monkey/exploit/shellshock.py +++ b/monkey/infection_monkey/exploit/shellshock.py @@ -86,7 +86,7 @@ class ShellShockExploiter(HostExploiter): LOG.info("SSH Skipping unknown os: %s", uname_os) return False except Exception as exc: - LOG.debug("Error running uname os commad on victim %r: (%s)", self.host, exc) + LOG.debug("Error running uname os command on victim %r: (%s)", self.host, exc) return False if not self.host.os.get('machine'): try: @@ -95,7 +95,7 @@ class ShellShockExploiter(HostExploiter): if '' != uname_machine: self.host.os['machine'] = uname_machine.lower().strip() except Exception as exc: - LOG.debug("Error running uname machine commad on victim %r: (%s)", self.host, exc) + LOG.debug("Error running uname machine command on victim %r: (%s)", self.host, exc) return False # copy the monkey diff --git a/monkey/infection_monkey/exploit/sshexec.py b/monkey/infection_monkey/exploit/sshexec.py index 3966a7330..f13841785 100644 --- a/monkey/infection_monkey/exploit/sshexec.py +++ b/monkey/infection_monkey/exploit/sshexec.py @@ -129,7 +129,7 @@ class SSHExploiter(HostExploiter): LOG.info("SSH Skipping unknown os: %s", uname_os) return False except Exception as exc: - LOG.debug("Error running uname os commad on victim %r: (%s)", self.host, exc) + LOG.debug("Error running uname os command on victim %r: (%s)", self.host, exc) return False if not self.host.os.get('machine'): @@ -139,7 +139,7 @@ class SSHExploiter(HostExploiter): if '' != uname_machine: self.host.os['machine'] = uname_machine except Exception as exc: - LOG.debug("Error running uname machine commad on victim %r: (%s)", self.host, exc) + LOG.debug("Error running uname machine command on victim %r: (%s)", self.host, exc) if self.skip_exist: _, stdout, stderr = ssh.exec_command("head -c 1 %s" % self._config.dropper_target_path_linux) diff --git a/monkey/monkey_island/cc/models/monkey.py b/monkey/monkey_island/cc/models/monkey.py index ad10084d9..adaca4922 100644 --- a/monkey/monkey_island/cc/models/monkey.py +++ b/monkey/monkey_island/cc/models/monkey.py @@ -32,7 +32,7 @@ class Monkey(Document): ip_addresses = ListField(StringField()) keepalive = DateTimeField() modifytime = DateTimeField() - # TODO make "parent" an embedded document, so this can be removed and the schema explained (and validated) verbosly. + # TODO make "parent" an embedded document, so this can be removed and the schema explained (and validated) verbosely. # This is a temporary fix, since mongoengine doesn't allow for lists of strings to be null # (even with required=False of null=True). # See relevant issue: https://github.com/MongoEngine/mongoengine/issues/1904 diff --git a/monkey/monkey_island/cc/services/config_schema.py b/monkey/monkey_island/cc/services/config_schema.py index 367c281f7..b0378fc5c 100644 --- a/monkey/monkey_island/cc/services/config_schema.py +++ b/monkey/monkey_island/cc/services/config_schema.py @@ -576,7 +576,7 @@ SCHEMA = { "default": True, "description": "Determines whether the monkey should retry exploiting machines" - " it didn't successfuly exploit on previous iterations" + " it didn't successfully exploit on previous iterations" } } } @@ -713,7 +713,7 @@ SCHEMA = { "type": "boolean", "default": True, "description": - "Determines whether the dropper should try to move itsel instead of copying itself" + "Determines whether the dropper should try to move itself instead of copying itself" " to target path" } }