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.

chore: add comment describing security implication of code (#64342)

Tom Piccirellofc92fb61e054
diff --git a/products/data_warehouse/backend/api/table.py b/products/data_warehouse/backend/api/table.py
index b91186b9bbed..5dec316952a5 100644
--- a/products/data_warehouse/backend/api/table.py
+++ b/products/data_warehouse/backend/api/table.py
@@ -134,9 +134,10 @@ class TableSerializer(UserAccessControlSerializerMixin, serializers.ModelSeriali
access_key: str | None = credential.get("access_key")
access_secret: str | None = credential.get("access_secret")
+ # CRITICAL: users MUST provide an access key and secret, otherwise we'll fall back to using the EC2 node's internal role.
+ # this would allow an external user to then access one of PostHog's internal S3 buckets
if not access_key or not access_secret:
raise serializers.ValidationError("Access key and secret are required")
-
if len(access_key.strip()) == 0 or len(access_secret.strip()) == 0:
raise serializers.ValidationError("Access key and secret can't be blank")