-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging a new version that removes python3 and ansible builds, and exposes new BHR functionality to user control
- Loading branch information
1 parent
b4f4df0
commit 0a462b2
Showing
15 changed files
with
281 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
hpfeeds-bhr-testing.env | ||
docker-compose-testing.yml | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ pep8: | |
|
||
build_container: | ||
stage: build | ||
when: always | ||
tags: | ||
- container_scanning | ||
services: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
FROM ubuntu:18.04 | ||
FROM python:3.7 | ||
|
||
LABEL maintainer Alexander Merck <[email protected]> | ||
LABEL maintainer Jesse Bowling <[email protected]> | ||
LABEL maintainer Team STINGAR <[email protected]> | ||
LABEL name "hpfeeds-bhr" | ||
LABEL version "0.1" | ||
LABEL version "1.9" | ||
LABEL release "1" | ||
LABEL summary "HPFeeds BHR handler" | ||
LABEL description "HPFeeds BHR handler is a tool for submitting black hole routes from honeypot events." | ||
LABEL authoritative-source-url "https://github.com/CommunityHoneyNetwork/hpfeeds-bhr" | ||
LABEL changelog-url "https://github.com/CommunityHoneyNetwork/hpfeeds-bhr/commits/master" | ||
|
||
ENV playbook "hpfeeds-bhr.yml" | ||
COPY requirements.txt /opt/requirements.txt | ||
ENV DEBIAN_FRONTEND "noninteractive" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y ansible | ||
RUN apt-get update && apt-get upgrade -y && apt-get install -y gcc git python3-dev python3-pip | ||
RUN pip3 install -r /opt/requirements.txt | ||
RUN pip3 install git+https://github.com/CommunityHoneyNetwork/hpfeeds3.git | ||
|
||
RUN echo "localhost ansible_connection=local" >> /etc/ansible/hosts | ||
ADD . /opt/ | ||
RUN ansible-playbook /opt/${playbook} | ||
RUN chmod 755 /opt/entrypoint.sh | ||
|
||
ENTRYPOINT ["/usr/bin/runsvdir", "-P", "/etc/service"] | ||
ENTRYPOINT ["/opt/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
version: '2' | ||
services: | ||
redis: | ||
image: stingar/redis:1.7 | ||
volumes: | ||
- ./storage/redis:/var/lib/redis:z | ||
image: stingar/redis:1.8 | ||
mongodb: | ||
image: stingar/mongodb:1.8 | ||
hpfeeds-bhr: | ||
build: | ||
context: . | ||
image: hpfeeds-bhr:ubuntu | ||
volumes: | ||
- ./hpfeeds-bhr.sysconfig:/etc/default/hpfeeds-bhr:z | ||
image: hpfeeds-bhr:latest | ||
env_file: | ||
- hpfeeds-bhr.env | ||
links: | ||
- redis:redis | ||
- mongodb:mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
trap "exit 130" SIGINT | ||
trap "exit 137" SIGKILL | ||
trap "exit 143" SIGTERM | ||
|
||
set -o nounset | ||
set -o pipefail | ||
|
||
|
||
main () { | ||
python3 /opt/scripts/build_config.py | ||
if [[ $? -ne 0 ]] | ||
then | ||
echo "Config build failed; verify config and then restart the container." | ||
sleep 120 | ||
exit 1 | ||
fi | ||
cat /opt/hpfeeds-bhr.cfg | ||
python3 /opt/hpfeeds-bhr/feedhandler.py /opt/hpfeeds-bhr.cfg | ||
} | ||
|
||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.