mirror of https://github.com/MISP/MISP
fix: Update requirements.txt to match app/Controller/AppController.php, add test.
parent
369f7cdede
commit
e54b75cebd
|
@ -274,6 +274,9 @@ jobs:
|
|||
python tools/misp-feed/validate.py
|
||||
deactivate
|
||||
|
||||
- name: Check requirements.txt
|
||||
run: python tests/check_requirements.py
|
||||
|
||||
- name: Logs
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
|
|
|
@ -6,7 +6,7 @@ misp-lib-stix2>=3.0.1.1
|
|||
mixbox>=1.0.5
|
||||
plyara>=2.1.1
|
||||
pydeep2>=0.5.1
|
||||
pymisp==2.4.176
|
||||
pymisp==2.4.178
|
||||
python-magic>=0.4.27
|
||||
pyzmq>=25.1.1
|
||||
redis>=5.0.1
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import re
|
||||
|
||||
requirements_file = 'requirements.txt'
|
||||
app_controller = 'app/Controller/AppController.php'
|
||||
|
||||
with open(requirements_file) as f:
|
||||
req_version = re.findall('pymisp==(.*)', f.read())[0]
|
||||
|
||||
with open(app_controller) as f:
|
||||
controler_version = re.findall('pyMispVersion = \'(.*)\'', f.read())[0]
|
||||
|
||||
if not req_version == controler_version:
|
||||
raise Exception(f'PyMISP in {requirements_file} ({req_version}) differs from the one in {app_controller} ({controler_version})')
|
Loading…
Reference in New Issue