diff --git a/github_app_geo_project/module/audit/__init__.py b/github_app_geo_project/module/audit/__init__.py index b3efc35d5fa..5212db42e7f 100644 --- a/github_app_geo_project/module/audit/__init__.py +++ b/github_app_geo_project/module/audit/__init__.py @@ -152,6 +152,7 @@ async def _process_snyk_dpkg( with open(".github/ghci.yaml", encoding="utf-8") as file: local_config = yaml.load(file, Loader=yaml.SafeLoader).get("audit", {}) + logs_url = urllib.parse.urljoin(context.service_url, f"logs/{context.job_id}") if context.module_event_data.type == "snyk": python_version = "" if os.path.exists(".tool-versions"): @@ -166,7 +167,6 @@ async def _process_snyk_dpkg( else: env = os.environ.copy() - logs_url = urllib.parse.urljoin(context.service_url, f"logs/{context.job_id}") result, body, short_message, new_success = await audit_utils.snyk( branch, context.module_config.get("snyk", {}), diff --git a/github_app_geo_project/views/webhook.py b/github_app_geo_project/views/webhook.py index 3f21d2f76d8..2d40a028f1c 100644 --- a/github_app_geo_project/views/webhook.py +++ b/github_app_geo_project/views/webhook.py @@ -37,7 +37,7 @@ def webhook(request: pyramid.request.Request) -> dict[str, None]: raise pyramid.httpexceptions.HTTPBadRequest("No signature in the request") our_signature = hmac.new( - key=os.environ["GITHUB_SECRET"].encode("utf-8"), + key=github_secret.encode("utf-8"), msg=request.body, digestmod=hashlib.sha256, ).hexdigest()