Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(tasks): authenticate custom image security scans (#72859)

Alessandro Pogliaghice0a119b5d3d
diff --git a/products/tasks/backend/temporal/build_image/activities.py b/products/tasks/backend/temporal/build_image/activities.py
index da7dadaf5594..79cae883faa0 100644
--- a/products/tasks/backend/temporal/build_image/activities.py
+++ b/products/tasks/backend/temporal/build_image/activities.py
@@ -108,7 +108,7 @@ def _judge_spec_safety(spec_yaml: str, team_id: int, repository: str = "") -> Sc
if repository
else ""
)
- client = get_llm_client(product="posthog_code", team_id=team_id)
+ client = get_llm_client(product="django", team_id=team_id)
response = client.chat.completions.create(
model=SCAN_JUDGE_MODEL,
messages=[
diff --git a/products/tasks/backend/temporal/build_image/test_activities.py b/products/tasks/backend/temporal/build_image/test_activities.py
index 94a42e0bdb9a..332fff4d0f7c 100644
--- a/products/tasks/backend/temporal/build_image/test_activities.py
+++ b/products/tasks/backend/temporal/build_image/test_activities.py
@@ -36,7 +36,7 @@ def test_security_scan_uses_glm_json_output(mock_get_llm_client: MagicMock) -> N
assert result.passed is True
assert result.findings == [{"severity": "low", "detail": "Pinned development tool"}]
- mock_get_llm_client.assert_called_once_with(product="posthog_code", team_id=42)
+ mock_get_llm_client.assert_called_once_with(product="django", team_id=42)
request = mock_get_llm_client.return_value.chat.completions.create.call_args.kwargs
assert request["model"] == SCAN_JUDGE_MODEL
assert request["response_format"] == {"type": "json_object"}