From 2423a8376c8742f73af14840994debcdcd399343 Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Thu, 28 Sep 2017 14:38:04 -0600 Subject: [PATCH 1/6] Move cloud_details to hubblestack/ directory --- hubblestack/{extmods/returners => }/cloud_details.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hubblestack/{extmods/returners => }/cloud_details.py (100%) diff --git a/hubblestack/extmods/returners/cloud_details.py b/hubblestack/cloud_details.py similarity index 100% rename from hubblestack/extmods/returners/cloud_details.py rename to hubblestack/cloud_details.py From dd4adb83977440787f9313b4e4509b2d7db5a5eb Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Thu, 28 Sep 2017 14:39:06 -0600 Subject: [PATCH 2/6] Fix references to cloud_details --- hubblestack/extmods/returners/logstash_nebula_return.py | 2 +- hubblestack/extmods/returners/logstash_nova_return.py | 2 +- hubblestack/extmods/returners/logstash_pulsar_return.py | 2 +- hubblestack/extmods/returners/splunk_nebula_return.py | 2 +- hubblestack/extmods/returners/splunk_nova_return.py | 2 +- hubblestack/extmods/returners/splunk_pulsar_return.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hubblestack/extmods/returners/logstash_nebula_return.py b/hubblestack/extmods/returners/logstash_nebula_return.py index 9df5ce13a..c02d71330 100644 --- a/hubblestack/extmods/returners/logstash_nebula_return.py +++ b/hubblestack/extmods/returners/logstash_nebula_return.py @@ -32,7 +32,7 @@ import socket import requests from datetime import datetime -from cloud_details import get_cloud_details +from hubblestack.cloud_details import get_cloud_details from requests.auth import HTTPBasicAuth diff --git a/hubblestack/extmods/returners/logstash_nova_return.py b/hubblestack/extmods/returners/logstash_nova_return.py index 3f0a2c567..1d8a1d0b9 100644 --- a/hubblestack/extmods/returners/logstash_nova_return.py +++ b/hubblestack/extmods/returners/logstash_nova_return.py @@ -31,7 +31,7 @@ import time import socket import requests -from cloud_details import get_cloud_details +from hubblestack.cloud_details import get_cloud_details from requests.auth import HTTPBasicAuth def returner(ret): diff --git a/hubblestack/extmods/returners/logstash_pulsar_return.py b/hubblestack/extmods/returners/logstash_pulsar_return.py index d3b564df5..2ef164738 100644 --- a/hubblestack/extmods/returners/logstash_pulsar_return.py +++ b/hubblestack/extmods/returners/logstash_pulsar_return.py @@ -32,7 +32,7 @@ import json import requests from collections import defaultdict -from cloud_details import get_cloud_details +from hubblestack.cloud_details import get_cloud_details from requests.auth import HTTPBasicAuth diff --git a/hubblestack/extmods/returners/splunk_nebula_return.py b/hubblestack/extmods/returners/splunk_nebula_return.py index 45a625a26..6d3fa9921 100644 --- a/hubblestack/extmods/returners/splunk_nebula_return.py +++ b/hubblestack/extmods/returners/splunk_nebula_return.py @@ -40,7 +40,7 @@ ''' import socket # Import cloud details -from cloud_details import get_cloud_details +from hubblestack.cloud_details import get_cloud_details # Imports for http event forwarder import requests diff --git a/hubblestack/extmods/returners/splunk_nova_return.py b/hubblestack/extmods/returners/splunk_nova_return.py index 1a0ce9f7e..28fc73fb3 100644 --- a/hubblestack/extmods/returners/splunk_nova_return.py +++ b/hubblestack/extmods/returners/splunk_nova_return.py @@ -40,7 +40,7 @@ ''' import socket # Import cloud details -from cloud_details import get_cloud_details +from hubblestack.cloud_details import get_cloud_details # Imports for http event forwarder import requests diff --git a/hubblestack/extmods/returners/splunk_pulsar_return.py b/hubblestack/extmods/returners/splunk_pulsar_return.py index 6c0a9181f..e3b10ddda 100644 --- a/hubblestack/extmods/returners/splunk_pulsar_return.py +++ b/hubblestack/extmods/returners/splunk_pulsar_return.py @@ -40,7 +40,7 @@ ''' import socket # Import cloud details -from cloud_details import get_cloud_details +from hubblestack.cloud_details import get_cloud_details # Imports for http event forwarder import requests From c63844b5577881baee97dd70b9003703dbd4ef7f Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Thu, 28 Sep 2017 14:56:32 -0600 Subject: [PATCH 3/6] Fix one more cloud_details import --- hubblestack/splunklogging.py | 2 +- pkg/centos6/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hubblestack/splunklogging.py b/hubblestack/splunklogging.py index 604df24c3..a3b05acf0 100644 --- a/hubblestack/splunklogging.py +++ b/hubblestack/splunklogging.py @@ -36,7 +36,7 @@ ''' import socket # Import cloud details -from hubblestack.extmods.returners.cloud_details import get_cloud_details +from hubblestack.cloud_details import get_cloud_details # Imports for http event forwarder import requests diff --git a/pkg/centos6/Dockerfile b/pkg/centos6/Dockerfile index 6a17d59e1..6208d51c8 100644 --- a/pkg/centos6/Dockerfile +++ b/pkg/centos6/Dockerfile @@ -93,9 +93,9 @@ RUN yum install -y rpmbuild gcc make rh-ruby23 rh-ruby23-ruby-devel \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 +ENV HUBBLE_CHECKOUT=fixup ENV HUBBLE_VERSION=2.2.6 -ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git +ENV HUBBLE_GIT_URL=https://github.com/basepi/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" ENV _BINARY_LOG_LEVEL="INFO" From 4eebb8473cd0f30f34f1011f36407cc796e1f4f9 Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Thu, 28 Sep 2017 15:04:43 -0600 Subject: [PATCH 4/6] Revert Dockerfile changes (whoops) --- pkg/centos6/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/centos6/Dockerfile b/pkg/centos6/Dockerfile index 6208d51c8..6a17d59e1 100644 --- a/pkg/centos6/Dockerfile +++ b/pkg/centos6/Dockerfile @@ -93,9 +93,9 @@ RUN yum install -y rpmbuild gcc make rh-ruby23 rh-ruby23-ruby-devel \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=fixup +ENV HUBBLE_CHECKOUT=v2.2.6 ENV HUBBLE_VERSION=2.2.6 -ENV HUBBLE_GIT_URL=https://github.com/basepi/hubble.git +ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" ENV _BINARY_LOG_LEVEL="INFO" From 638a5016b65de3fcee41c5ecb33f76fed7ebe30e Mon Sep 17 00:00:00 2001 From: Chandler Date: Thu, 28 Sep 2017 15:15:33 -0600 Subject: [PATCH 5/6] Update nebula_osquery.py --- hubblestack/extmods/modules/nebula_osquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hubblestack/extmods/modules/nebula_osquery.py b/hubblestack/extmods/modules/nebula_osquery.py index a4448031f..f0e4ceb8b 100644 --- a/hubblestack/extmods/modules/nebula_osquery.py +++ b/hubblestack/extmods/modules/nebula_osquery.py @@ -201,7 +201,7 @@ def queries(query_group, for query_name, query_ret in r.iteritems(): for result in query_ret['data']: for key, value in result.iteritems(): - if value and isinstance(value, str) and value.startswith('__JSONIFY__'): + if value and isinstance(value, basestring) and value.startswith('__JSONIFY__'): result[key] = json.loads(value[len('__JSONIFY__'):]) return ret From 51b6e2108d5652e2347539186f9ee4e0133876b0 Mon Sep 17 00:00:00 2001 From: Colton Myers Date: Thu, 28 Sep 2017 15:18:18 -0600 Subject: [PATCH 6/6] Rev to 2.2.7 --- hubblestack/__init__.py | 2 +- pkg/amazonlinux2016.09/Dockerfile | 4 ++-- pkg/amazonlinux2017.03/Dockerfile | 4 ++-- pkg/centos6/Dockerfile | 4 ++-- pkg/centos7/Dockerfile | 4 ++-- pkg/coreos/Dockerfile | 4 ++-- pkg/debian7/Dockerfile | 4 ++-- pkg/debian8/Dockerfile | 4 ++-- pkg/debian9/Dockerfile | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hubblestack/__init__.py b/hubblestack/__init__.py index 5d724e8d2..04e669086 100644 --- a/hubblestack/__init__.py +++ b/hubblestack/__init__.py @@ -1 +1 @@ -__version__ = '2.2.6' +__version__ = '2.2.7' diff --git a/pkg/amazonlinux2016.09/Dockerfile b/pkg/amazonlinux2016.09/Dockerfile index b3efaa8d4..9a7c42479 100644 --- a/pkg/amazonlinux2016.09/Dockerfile +++ b/pkg/amazonlinux2016.09/Dockerfile @@ -91,8 +91,8 @@ RUN yum install -y ruby ruby-devel rpmbuild rubygems gcc make \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" diff --git a/pkg/amazonlinux2017.03/Dockerfile b/pkg/amazonlinux2017.03/Dockerfile index ae5ac4ce8..0e7dcb2d9 100644 --- a/pkg/amazonlinux2017.03/Dockerfile +++ b/pkg/amazonlinux2017.03/Dockerfile @@ -91,8 +91,8 @@ RUN yum install -y ruby ruby-devel rpmbuild rubygems gcc make \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" diff --git a/pkg/centos6/Dockerfile b/pkg/centos6/Dockerfile index 6a17d59e1..0f473977a 100644 --- a/pkg/centos6/Dockerfile +++ b/pkg/centos6/Dockerfile @@ -93,8 +93,8 @@ RUN yum install -y rpmbuild gcc make rh-ruby23 rh-ruby23-ruby-devel \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" diff --git a/pkg/centos7/Dockerfile b/pkg/centos7/Dockerfile index fa4b8fb4e..550bf5941 100644 --- a/pkg/centos7/Dockerfile +++ b/pkg/centos7/Dockerfile @@ -90,8 +90,8 @@ RUN yum install -y ruby ruby-devel rpmbuild rubygems gcc make \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" diff --git a/pkg/coreos/Dockerfile b/pkg/coreos/Dockerfile index be943cd6a..0ab349910 100644 --- a/pkg/coreos/Dockerfile +++ b/pkg/coreos/Dockerfile @@ -88,8 +88,8 @@ RUN pip install --upgrade pip \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" diff --git a/pkg/debian7/Dockerfile b/pkg/debian7/Dockerfile index 4dd45a80c..e0feeb91f 100644 --- a/pkg/debian7/Dockerfile +++ b/pkg/debian7/Dockerfile @@ -115,8 +115,8 @@ RUN apt-get install -y ruby ruby-dev rubygems gcc make \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" diff --git a/pkg/debian8/Dockerfile b/pkg/debian8/Dockerfile index 0372a2212..0af385d68 100644 --- a/pkg/debian8/Dockerfile +++ b/pkg/debian8/Dockerfile @@ -96,8 +96,8 @@ RUN apt-get install -y ruby ruby-dev rubygems gcc make \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/" diff --git a/pkg/debian9/Dockerfile b/pkg/debian9/Dockerfile index 758119214..6cf11ec92 100644 --- a/pkg/debian9/Dockerfile +++ b/pkg/debian9/Dockerfile @@ -92,8 +92,8 @@ RUN apt-get install -y ruby ruby-dev rubygems gcc make \ #pyinstaller start #commands specified for ENTRYPOINT and CMD are executed when the container is run, not when the image is built #use the following variables to choose the version of hubble -ENV HUBBLE_CHECKOUT=v2.2.6 -ENV HUBBLE_VERSION=2.2.6 +ENV HUBBLE_CHECKOUT=v2.2.7 +ENV HUBBLE_VERSION=2.2.7 ENV HUBBLE_GIT_URL=https://github.com/hubblestack/hubble.git ENV HUBBLE_SRC_PATH=/hubble_src ENV _HOOK_DIR="./pkg/"