From a607f025ab87d2777aecddc71b8dbd9d4e73ae44 Mon Sep 17 00:00:00 2001 From: matt-saunders <31736190+matt-saunders@users.noreply.github.com> Date: Thu, 14 Jun 2018 19:40:10 -0400 Subject: [PATCH 1/2] Cybox library version error fix After a clean install if you log into MISP and navigate to Administration -> Server Settings -> Diagnostics in the STIX and Cybox libraries section you will see the error CYBOX library version...Incorrect CyBox version installed, found 2.1.0.17 expecting 2.1.0.18.dev0. I reached out the the developers of MISP and they told me to run pip3 uninstall cybox to uninstall the pip managed version. To test it out I did I clean install and SSH'd into the container then ran the command and the error went away. Not sure where the best place to incorporate this is, but this was were I tested it and I successfully ran a clean build with it. --- container/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/container/Dockerfile b/container/Dockerfile index d260e5a..8a89f9b 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -73,6 +73,8 @@ WORKDIR /usr/local/src/misp-modules RUN sudo pip3 install -I -r REQUIREMENTS ; \ sudo pip3 install -I . +RUN sudo pip3 uninstall -y cybox + WORKDIR /var/www/MISP/app RUN mkdir /var/www/.composer && chown -R www-data:www-data /var/www/.composer ; \ sudo -u www-data -H wget https://getcomposer.org/download/1.2.1/composer.phar -O composer.phar ; \ From af95d97b8b73ec3d43a2c6a5d620b7688b933372 Mon Sep 17 00:00:00 2001 From: matt-saunders <31736190+matt-saunders@users.noreply.github.com> Date: Fri, 15 Jun 2018 00:16:12 -0400 Subject: [PATCH 2/2] Update Dockerfile --- container/Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/container/Dockerfile b/container/Dockerfile index 8a89f9b..0599ff2 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -43,15 +43,15 @@ RUN sudo -u www-data -H git clone https://github.com/CybOXProject/python-cybox.g sudo -u www-data -H git clone https://github.com/STIXProject/python-stix.git WORKDIR /var/www/MISP/app/files/scripts/python-cybox -RUN python3 setup.py install +RUN sudo python3 setup.py install WORKDIR /var/www/MISP/app/files/scripts/python-stix -RUN python3 setup.py install +RUN sudo python3 setup.py install WORKDIR /var/www/MISP/app/files/scripts/ RUN sudo -u www-data -H git clone https://github.com/CybOXProject/mixbox.git ; \ cd /var/www/MISP/app/files/scripts/mixbox ; \ - python3 setup.py install + sudo python3 setup.py install WORKDIR /var/www/MISP RUN sudo -u www-data -H git submodule init ; \ @@ -128,9 +128,6 @@ RUN sed -i -e 's/db login/misp/g' /var/www/MISP/app/Config/database.php ; \ sed -i -e "s/bind 127.0.0.1 ::1/bind 0.0.0.0/" /etc/redis/redis.conf ; \ sudo chown -R www-data:www-data /var/www/MISP/app/Config ; \ sudo chmod -R 750 /var/www/MISP/app/Config ; \ - sudo pip2 install --upgrade pip ; \ - sudo pip2 install pyzmq ; \ - sudo pip2 install redis ; \ sudo pip3 install --upgrade pip ; \ sudo pip3 install pyzmq ; \ sudo pip3 install redis ; \ @@ -192,8 +189,8 @@ RUN echo "/var/www/MISP/app/tmp/logs/resque-*-error.log {" > misp ; \ echo " weekly" >> misp ; \ echo " copytruncate" >> misp ; \ echo "}" >> misp - - + + WORKDIR /var/www/MISP COPY supervisord.conf /etc/supervisor/conf.d/