Skip to content

Commit

Permalink
no py commons
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaran committed Jan 22, 2024
1 parent 21826c3 commit a54030f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions build_setup/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ dacite==1.8.1
tree_sitter==0.20.2
PyGithub==1.59.1
jsonschema==4.19.0
requests
git+ssh://[email protected]/FireTail-io/[email protected]
requests
3 changes: 1 addition & 2 deletions src/main_githubaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import uuid

import requests
from firetail_toolbox.ft_logger import logger_wrapper

from openapi.validation import parse_resolve_and_validate_openapi_spec
from static_analysis import LANGUAGE_ANALYSERS
Expand Down Expand Up @@ -148,7 +147,7 @@ def has_findings_over_x(ex_id: str, org_uuid: str, api_token: str):
endpoint = f"/organisations/{org_uuid}/events/external-id/{ex_id}"
event_resp = requests.get(endpoint, headers={"x-ft-api-key": api_token, "Content-Type": "application/json"})
if event_resp.status_code != 200:
logger_wrapper("ERROR", {"message": "Non 200 response from events", "resp": event_resp})
print("ERROR", {"message": "Non 200 response from events", "resp": event_resp})
thresholds = {"CRITICAL": 1, "HIGH": 1, "MEDIUM": 4, "LOW": 10} # note - skipping informational.
findings = event_resp.get("initialFindingSeverities")
for level, limit in thresholds.items():
Expand Down

0 comments on commit a54030f

Please sign in to comment.