mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Update status codes to match SOC
This commit is contained in:
2
.github/workflows/pythontest.yml
vendored
2
.github/workflows/pythontest.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install flake8 pytest pytest-cov
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
find . -name requirements.txt -exec pip install -r {} \;
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
flake8 ${{ matrix.python-code-path }} --show-source --max-complexity=10 --doctests --max-line-length=200 --statistics
|
||||
|
||||
@@ -18,13 +18,13 @@ def sendReq(meta, payload):
|
||||
def prepareResults(raw):
|
||||
if 'threat' in raw:
|
||||
summary = raw['threat']
|
||||
status = "danger"
|
||||
status = "threat"
|
||||
elif 'query_status' in raw:
|
||||
summary = raw['query_status']
|
||||
if summary == 'no_results':
|
||||
status = "ok"
|
||||
else:
|
||||
status = "error"
|
||||
status = "caution"
|
||||
results = {'response': raw, 'summary': summary, 'status': status}
|
||||
return results
|
||||
|
||||
|
||||
Reference in New Issue
Block a user