Skip to content

Commit

Permalink
Add phantom-toolbox to requirements files and Makefile (#114)
Browse files Browse the repository at this point in the history
* Add phantom-toolbox to requirements files and Makefile

Does not yet deploy `phantom-toolbox` or use NiceBaseConnector
  • Loading branch information
baristaTam authored Sep 11, 2024
1 parent 1d0f4e3 commit 4de1629
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 45 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ $(SRCS_DIR)/$(PACKAGE).json: $(WHEELS)
sed $(SED_INPLACE) "s/APP_ID/$(APP_ID)/" $@
sed $(SED_INPLACE) "s/APP_NAME/$(APP_NAME)/" $@
sed $(SED_INPLACE) "s/MODULE/$(MODULE)/" $@
sed $(SED_INPLACE) "s/WHEEL/$(shell ls $(WHEELS))/" $@
@echo "WHEELS: $(WHEELS)"
sed $(SED_INPLACE) "s/WHEEL_TDX/$(shell ls $(WHEELS) | grep -E 'TDX.*\.whl')/" $@
sed $(SED_INPLACE) "s/WHEEL_TOOLBOX/$(shell ls ./$(WHEELS) | grep -E 'phantom_toolbox.*\.whl')/" $@

deploy: $(PACKAGE).tar
python deploy.py $^
deploy: $(PACKAGE).tar venv
$(VENV_PYTHON) -m phtoolbox deploy --file $<

venv: requirements-test.txt requirements.in
rm -rf $@
Expand All @@ -87,12 +89,14 @@ $(WHEELS): requirements.in

requirements-test.txt: export PYTEST_SOAR_REPO=git+https://github.com/splunk/pytest-splunk-soar-connectors.git
requirements-test.txt: export VCR_CLEANER_REPO=git+https://github.com/techservicesillinois/vcrpy-cleaner.git
requirements-test.txt: requirements-test.in
requirements-test.txt: requirements.in requirements-test.in
rm -rf $(VENV_REQS)
python -m venv $(VENV_REQS)
$(VENV_REQS)/bin/python -m pip install -r $^
$(VENV_REQS)/bin/python -m pip install --upgrade pip
$(VENV_REQS)/bin/python -m pip install -r requirements.in
$(VENV_REQS)/bin/python -m pip install -r requirements-test.in
$(VENV_REQS)/bin/python -m pip freeze -qqq > $@
# REMOVE once pytest-splunk-soar-connectors is on pypi
# REMOVE once pytest-splunk-soar-connectors is on pypi
sed $(SED_INPLACE) "s;^pytest-splunk-soar-connectors==.*;$(PYTEST_SOAR_REPO);" $@
sed $(SED_INPLACE) "s;^vcr-cleaner==.*;$(VCR_CLEANER_REPO);" $@

Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PROD_APP_ID:=3685f573-89ce-4c4e-9ce5-196e3aa3fb55
PROD_APP_NAME:=Team Dynamix
TEST_APP_ID:=c3453c7d-2b99-4da6-9f81-8d115366391c
TEST_APP_ID:=5a633bce-abfb-4826-9ed1-b7231a00a048
22 changes: 0 additions & 22 deletions deploy.py

This file was deleted.

36 changes: 22 additions & 14 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
autopep8==2.3.1
beautifulsoup4==4.12.3
certifi==2024.8.30
charset-normalizer==3.3.2
exceptiongroup==1.2.2
flake8==7.1.0
idna==3.7
flake8==7.1.1
idna==3.8
iniconfig==2.0.0
markdown-it-py==3.0.0
mccabe==0.7.0
mdurl==0.1.2
multidict==6.0.5
mypy==1.11.0
mypy==1.11.2
mypy-extensions==1.0.0
packaging==24.1
phantom-toolbox @ git+https://github.com/techservicesillinois/phantom-toolbox.git@3cdfd63b7214b32407c590e4f4ef6ca5c9c6c9a6
pluggy==1.5.0
pycodestyle==2.12.0
pycodestyle==2.12.1
pyflakes==3.2.0
Pygments==2.18.0
PyJWT==2.8.0
pytest==8.3.1
git+https://github.com/splunk/pytest-splunk-soar-connectors.git
PyYAML==6.0.1
rich==13.7.1
soupsieve==2.5
PyJWT==2.9.0
pytest==8.3.2
pytest-splunk-soar-connectors @ git+https://github.com/splunk/pytest-splunk-soar-connectors.git@400d45b90d73a1220e38bd4a7d7a4b77cc495bd0
python-dateutil==2.9.0.post0
PyYAML==6.0.2
requests==2.32.3
rich==13.8.0
setuptools-scm==8.1.0
six==1.16.0
soupsieve==2.6
TDXLib==0.5.2
tomli==2.0.1
types-beautifulsoup4==4.12.0.20240511
types-html5lib==1.1.11.20240228
types-beautifulsoup4==4.12.0.20240907
types-html5lib==1.1.11.20240806
types-requests==2.31.0.2
types-urllib3==1.26.25.14
typing_extensions==4.12.2
urllib3==1.26.19
vcr_cleaner @ git+https://github.com/techservicesillinois/vcrpy-cleaner.git@6771ec7b22e13ec58f73769d6b57ee73d1a4b38f
vcr_cleaner @ git+https://github.com/techservicesillinois/vcrpy-cleaner.git@82bd9745642e81b2f794781aec89676540fab5cc
vcrpy==6.0.1
wrapt==1.16.0
yarl==1.9.4
yarl==1.11.0
3 changes: 2 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
TDXLib==0.5.2
TDXLib==0.5.2
git+https://github.com/techservicesillinois/phantom-toolbox.git
6 changes: 5 additions & 1 deletion src/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@
"wheel": [
{
"module": "TDXLib",
"input_file": "wheels/WHEEL"
"input_file": "wheels/WHEEL_TDX"
},
{
"module": "phantom-toolbox",
"input_file": "wheels/WHEEL_TOOLBOX"
}
]
}
Expand Down

0 comments on commit 4de1629

Please sign in to comment.