Skip to content

Commit

Permalink
Merge pull request #75 from ait-aecid/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
4cti0nfi9ure authored Jun 24, 2020
2 parents 146a838 + ae80a64 commit bad5f4b
Show file tree
Hide file tree
Showing 88 changed files with 1,461 additions and 366 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ before_install:
- sed -e "s+{{SOURCEDIR}}+$PWD+g" .playbook.yml > playbook.yml

install:
- sudo -H -u root pip3 install coverage
- sudo pip3 install coverage
- sudo ansible-playbook playbook.yml
- sudo pip3 install kafka-python -U
- sudo ln -s /usr/lib/python3/dist-packages/kafka /etc/aminer/conf-enabled/kafka
- cd aecid-testsuite
- sudo chmod +x runUnittests.sh
Expand Down
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Roman Fiedler
Markus Wurzenberger <[email protected]>
Max Landauer <[email protected]>
Wolfgang Hotwagner <[email protected]>
Ernst Leierzopf <[email protected]>
5 changes: 5 additions & 0 deletions aecid-testsuite/demo/AMiner/demo-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ def build_analysis_pipeline(analysis_context):
analysis_context.register_component(whitelist_violation_detector, component_name="Whitelist")
atom_filter.add_handler(whitelist_violation_detector)

from aminer.analysis import ParserCount
parser_count = ParserCount(analysis_context.aminer_config, None, anomaly_event_handlers, 10, False)
analysis_context.register_component(parser_count, component_name="ParserCount")
atom_filter.add_handler(parser_count)

from aminer.analysis import NewMatchPathDetector
new_match_path_detector = NewMatchPathDetector(analysis_context.aminer_config, anomaly_event_handlers, auto_include_flag=True,
output_log_line=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ def build_analysis_pipeline(analysis_context):
analysis_context.register_component(whitelist_violation_detector, component_name="Whitelist")
atom_filter.add_handler(whitelist_violation_detector)

from aminer.analysis import ParserCount
parser_count = ParserCount(analysis_context.aminer_config, None, anomaly_event_handlers, 10, False)
analysis_context.register_component(parser_count, component_name="ParserCount")
atom_filter.add_handler(parser_count)

from aminer.analysis import NewMatchPathDetector
new_match_path_detector = NewMatchPathDetector(analysis_context.aminer_config, anomaly_event_handlers, auto_include_flag=True,
output_log_line=True)
Expand Down
5 changes: 5 additions & 0 deletions aecid-testsuite/demo/AMinerRemoteControl/demo-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ def build_analysis_pipeline(analysis_context):
analysis_context.register_component(whitelist_violation_detector, component_name="Whitelist")
atom_filters.add_handler(whitelist_violation_detector)

from aminer.analysis import ParserCount
parser_count = ParserCount(analysis_context.aminer_config, None, anomaly_event_handlers, 10, False)
analysis_context.register_component(parser_count, component_name="ParserCount")
atom_filters.add_handler(parser_count)

from aminer.analysis import NewMatchPathDetector
new_match_path_detector = NewMatchPathDetector(analysis_context.aminer_config, anomaly_event_handlers, auto_include_flag=False)
analysis_context.register_component(new_match_path_detector, component_name="NewMatchPath")
Expand Down
14 changes: 14 additions & 0 deletions aecid-testsuite/runCoverageTests.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
curl https://mirror.klaus-uwe.me/apache/kafka/2.5.0/kafka_2.12-2.5.0.tgz --output kafka.tgz
tar xvf kafka.tgz > /dev/null
rm kafka.tgz

kafka_2.12-2.5.0/bin/zookeeper-server-start.sh kafka_2.12-2.5.0/config/zookeeper.properties > /dev/null &
sleep 1
kafka_2.12-2.5.0/bin/kafka-server-start.sh kafka_2.12-2.5.0/config/server.properties > /dev/null &

sudo coverage run --source=./aminer -m unittest discover -s unit -p '*Test.py' > /dev/null
touch /tmp/report
echo 'Statement Coverage:' > /tmp/report
Expand All @@ -12,3 +20,9 @@ sudo rm /tmp/AMinerRemoteLog.txt
sudo rm /tmp/test4unixSocket.sock
sudo rm /tmp/test5unixSocket.sock
sudo rm /tmp/test6unixSocket.sock

kafka_2.12-2.5.0/bin/kafka-server-stop.sh > /dev/null
kafka_2.12-2.5.0/bin/zookeeper-server-stop.sh > /dev/null
sudo rm -r kafka_2.12-2.5.0/
sudo rm -r /tmp/zookeeper
sudo rm -r /tmp/kafka-logs
14 changes: 14 additions & 0 deletions aecid-testsuite/runUnittests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
curl https://mirror.klaus-uwe.me/apache/kafka/2.5.0/kafka_2.12-2.5.0.tgz --output kafka.tgz
tar xvf kafka.tgz > /dev/null
rm kafka.tgz

kafka_2.12-2.5.0/bin/zookeeper-server-start.sh kafka_2.12-2.5.0/config/zookeeper.properties > /dev/null &
sleep 1
kafka_2.12-2.5.0/bin/kafka-server-start.sh kafka_2.12-2.5.0/config/server.properties > /dev/null &

sudo python3 -m unittest discover -s unit -p '*Test.py' > /dev/null
test -e /var/mail/mail && sudo rm -f /var/mail/mail
sudo rm /tmp/AMinerRemoteLog.txt
sudo rm /tmp/test4unixSocket.sock
sudo rm /tmp/test5unixSocket.sock
sudo rm /tmp/test6unixSocket.sock

kafka_2.12-2.5.0/bin/kafka-server-stop.sh > /dev/null
kafka_2.12-2.5.0/bin/zookeeper-server-stop.sh > /dev/null
sudo rm -r kafka_2.12-2.5.0/
sudo rm -r /tmp/zookeeper
sudo rm -r /tmp/kafka-logs
Loading

0 comments on commit bad5f4b

Please sign in to comment.