You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spot.apache.org by na...@apache.org on 2018/01/24 01:00:30 UTC

[1/2] incubator-spot git commit: Incorrect assumption inbound/outbound crashes

Repository: incubator-spot
Updated Branches:
  refs/heads/master 6deaae39b -> 935dfb499


Incorrect assumption inbound/outbound crashes 

The code assumes that there are always inbound only and outbound only connections. This causes saving a scored threat that has either no inbound, or outbound only connections. Fix is simply moving the column header row to outside the check, so the array element is always initialized before being accessed.

Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/3baa75aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/3baa75aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/3baa75aa

Branch: refs/heads/master
Commit: 3baa75aaef6abdeaef3358acf502751cd5dbe919
Parents: 2ebe572
Author: castleguarders <ca...@users.noreply.github.com>
Authored: Tue Sep 26 14:29:14 2017 -0700
Committer: GitHub <no...@github.com>
Committed: Tue Sep 26 14:29:14 2017 -0700

----------------------------------------------------------------------
 spot-oa/api/resources/flow.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spot/blob/3baa75aa/spot-oa/api/resources/flow.py
----------------------------------------------------------------------
diff --git a/spot-oa/api/resources/flow.py b/spot-oa/api/resources/flow.py
index ab5105f..418f87c 100755
--- a/spot-oa/api/resources/flow.py
+++ b/spot-oa/api/resources/flow.py
@@ -492,8 +492,8 @@ def create_incident_progression(anchor, inbound, outbound, twoway, date):
     }
 
     #----- Add Inbound Connections-------#
+    obj["children"].append({'name': 'Inbound Only', 'children': [], 'impact': 0})
     if len(inbound) > 0:
-        obj["children"].append({'name': 'Inbound Only', 'children': [], 'impact': 0})
         in_ctxs = {}
         for ip in inbound:
             if 'nwloc' in inbound[ip] and len(inbound[ip]['nwloc']) > 0:
@@ -509,8 +509,8 @@ def create_incident_progression(anchor, inbound, outbound, twoway, date):
                 })
 
     #------ Add Outbound ----------------#
+    obj["children"].append({'name':'Outbound Only','children':[],'impact':0})
     if len(outbound) > 0:
-        obj["children"].append({'name':'Outbound Only','children':[],'impact':0})
         out_ctxs = {}
         for ip in outbound:
             if 'nwloc' in outbound[ip] and len(outbound[ip]['nwloc']) > 0:
@@ -526,8 +526,8 @@ def create_incident_progression(anchor, inbound, outbound, twoway, date):
                 })
 
     #------ Add TwoWay ----------------#
+    obj["children"].append({'name':'two way','children': [], 'impact': 0})
     if len(twoway) > 0:
-        obj["children"].append({'name':'two way','children': [], 'impact': 0})
         tw_ctxs = {}
         for ip in twoway:
             if 'nwloc' in twoway[ip] and len(twoway[ip]['nwloc']) > 0:


[2/2] incubator-spot git commit: Merge branch 'master' into pr/123 to close SPOT-254 and apache/incubator-spot#123

Posted by na...@apache.org.
Merge branch 'master' into pr/123 to close SPOT-254 and apache/incubator-spot#123


Project: http://git-wip-us.apache.org/repos/asf/incubator-spot/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spot/commit/935dfb49
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spot/tree/935dfb49
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spot/diff/935dfb49

Branch: refs/heads/master
Commit: 935dfb4992ead12b45e2ea7cb8e580d02678e08d
Parents: 3baa75a 6deaae3
Author: natedogs911 <na...@gmail.com>
Authored: Tue Jan 23 16:59:04 2018 -0800
Committer: natedogs911 <na...@gmail.com>
Committed: Tue Jan 23 16:59:04 2018 -0800

----------------------------------------------------------------------
 spot-ingest/common/kafka_topic.sh               |   2 +-
 spot-ingest/master_collector.py                 |  60 ++---
 spot-ingest/start_ingest_standalone.sh          |   2 +-
 spot-ingest/worker.py                           |  56 +++--
 spot-ml/ml_ops.sh                               |   2 +-
 spot-ml/ml_test.sh                              |   4 +-
 .../dns/model/DNSSuspiciousConnectsModel.scala  |  43 ++--
 .../org/apache/spot/lda/SpotLDAHelper.scala     | 173 ++++++++++++++
 .../org/apache/spot/lda/SpotLDAModel.scala      | 139 +++++++++++
 .../org/apache/spot/lda/SpotLDAResult.scala     |  43 ++++
 .../org/apache/spot/lda/SpotLDAWrapper.scala    | 226 +++---------------
 .../model/FlowSuspiciousConnectsModel.scala     |  27 +--
 .../proxy/ProxySuspiciousConnectsModel.scala    |  25 +-
 .../org/apache/spot/utilities/TopDomains.scala  |   1 -
 .../org/apache/spot/lda/SpotLDAHelperTest.scala | 133 +++++++++++
 .../apache/spot/lda/SpotLDAWrapperTest.scala    | 236 ++++++-------------
 spot-oa/oa/dns/dns_oa.py                        |   4 +-
 spot-oa/requirements.txt                        |   2 +-
 spot-oa/runIpython.sh                           |   2 +-
 spot-setup/hdfs_setup.sh                        |   2 +-
 20 files changed, 709 insertions(+), 473 deletions(-)
----------------------------------------------------------------------