atomic-threat-coverage/Makefile

74 lines
2.2 KiB
Makefile
Raw Normal View History

.PHONY: all analytics navigator elastic setup clean visualizations
2018-12-12 05:19:57 +00:00
all: setup_repo markdown confluence analytics navigator elastic
analytics: create_analytics_and_pivoting_csv
navigator: create_attack_navigator_profile create_attack_navigator_profile_per_customer
elastic: create_es_export
setup: setup_repo setup_confluence setup_markdown
visualizations: make_visualizations
2018-12-12 05:19:57 +00:00
setup_repo:
@echo "[*] Updating 3rd party repository"
2018-12-12 05:19:57 +00:00
git submodule init
git submodule update
2019-02-13 01:46:37 +00:00
git submodule foreach git pull origin master
2018-12-12 05:19:57 +00:00
setup_confluence:
2019-02-19 17:02:53 +00:00
@echo "[*] Setting up confluence"
@cd scripts && python3 main.py -C --init
2018-12-12 05:19:57 +00:00
setup_markdown:
@echo "[*] Setting up markdown"
2019-02-19 17:02:53 +00:00
@cd scripts && python3 main.py -M --init
2018-12-12 05:19:57 +00:00
2019-02-09 22:32:55 +00:00
push_to_confluence:
2019-02-19 17:02:53 +00:00
@echo "[*] Pushing data to confluence"
@cd scripts && python3 main.py -C -A
2018-12-12 05:19:57 +00:00
push_to_markdown:
@echo "[*] Pushing data to markdown"
@cd scripts && python3 main.py -M -A
2018-12-12 05:19:57 +00:00
create_analytics_and_pivoting_csv:
@echo "[*] Creating analytics.csv and pivoting.csv"
@cd scripts && python3 yamls2csv.py
2018-12-12 05:19:57 +00:00
create_attack_navigator_profile:
@echo "[*] Creating ATT&CK Navigator profile"
@cd scripts && python3 attack_navigator_export.py
create_attack_navigator_profile_per_customer:
@echo "[*] Creating ATT&CK Navigator profile"
@cd scripts && python3 attack_navigator_per_customer_export.py
2019-02-19 17:02:53 +00:00
markdown:
@echo "[*] Creating markdown repository and pushing data"
@cd scripts && python3 main.py --markdown --auto --init
confluence:
@echo "[*] Creating conflunce repository and pushing data"
@cd scripts && python3 main.py --confluence --auto --init
create_es_export:
@echo "[*] Creating elastic index"
@cd scripts && python3 es_index_export.py
make_visualizations:
@echo "[*] Creating visualizations.."
ifeq ($(GUI), 1)
@cd scripts && python3 main.py -V --vis-export-type
else
@cd scripts && python3 main.py -V
endif
# TODO: make clean works with non default paths from config
2018-12-12 05:19:57 +00:00
clean:
@echo "[*] Cleaning up..."
2019-03-25 02:12:52 +00:00
@rm -rf ./Atomic_Threat_Coverage
@rm -f ./generated_analytics/atc_attack_navigator_profile*.json
@rm -f ./generated_analytics/analytics.csv
@rm -f ./generated_analytics/pivoting.csv
@rm -f ./generated_analytics/atc_es_index.json
2019-04-01 20:24:08 +00:00
@rm -f ./generated_analytics/visualizations/*.json