Update status codes to match SOC

This commit is contained in:
Jason Ertel
2022-04-05 07:20:23 -04:00
parent 04eef0d31f
commit d2fa80e48a
2 changed files with 3 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ jobs:
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov 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 - name: Lint with flake8
run: | run: |
flake8 ${{ matrix.python-code-path }} --show-source --max-complexity=10 --doctests --max-line-length=200 --statistics flake8 ${{ matrix.python-code-path }} --show-source --max-complexity=10 --doctests --max-line-length=200 --statistics

View File

@@ -18,13 +18,13 @@ def sendReq(meta, payload):
def prepareResults(raw): def prepareResults(raw):
if 'threat' in raw: if 'threat' in raw:
summary = raw['threat'] summary = raw['threat']
status = "danger" status = "threat"
elif 'query_status' in raw: elif 'query_status' in raw:
summary = raw['query_status'] summary = raw['query_status']
if summary == 'no_results': if summary == 'no_results':
status = "ok" status = "ok"
else: else:
status = "error" status = "caution"
results = {'response': raw, 'summary': summary, 'status': status} results = {'response': raw, 'summary': summary, 'status': status}
return results return results