: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(docs): document Cloud Tasks and Self-Driving security (#124060)
Georgiy Tarasovcbf46d4f9bdd
diff --git a/docs/published/docs/self-driving/security.mdx b/docs/published/docs/self-driving/security.mdxnew file mode 100644index 000000000000..4ee4f712b356--- /dev/null+++ b/docs/published/docs/self-driving/security.mdx@@ -0,0 +1,42 @@+---+title: Self-Driving security+sidebarTitle: Security+sidebar: Docs+showTitle: true+---++Self-Driving uses Cloud Tasks to investigate signals and prepare code changes. This page describes its code access, prompt injection controls, and GitHub permissions.++Last reviewed: October 27, 2026.++## Code access and storage++Repository cloning is optional. When a Self-Driving run needs repository code, it can clone the repository into an isolated sandbox.++Self-Driving agents do not create repository snapshots. Snapshot creation for other Cloud Tasks depends on the task and its execution mode.++See [Cloud Tasks security](/docs/tasks/security) for sandbox lifetime, snapshot storage, and AI data processing information.++## Prompt injection controls++Prompt injection occurs when content that an agent reads tries to change its instructions. Events, error messages, feedback, repository files, and connected sources can contain such content.++Self-Driving uses controls at several stages:++1. **Incoming signals.** A large language model (LLM) safety filter checks ingested signals before further processing.+2. **Agent execution.** Agents run in isolated sandboxes with restricted outbound network access by default. Shell execution policies apply additional controls.+3. **Instructions and tools.** Agent prompts identify external content as data that must not change their instructions. Each agent type receives the capabilities and access needed for its work.+4. **Generated reports.** A safety judge checks reports before further research or implementation.+5. **Code changes.** Agents submit changes through pull requests. Your review process and GitHub branch protections control whether those changes merge.++These controls reduce risk. They do not guarantee that an agent will detect every prompt injection attempt. LLM safety checks can make mistakes.++Network access depends on the task environment. Restricted access is the default for Self-Driving agents. A restricted environment allows approved destinations. An environment configured for full network access permits unrestricted outbound connections. See [sandbox network access](/handbook/engineering/ai/sandboxed-agents#network-access) for the available settings.++## GitHub permissions++During [GitHub installation](/docs/libraries/github#all-repositories-or-selected-repositories), choose **Only select repositories** to limit the repositories that PostHog can access.++The Self-Driving GitHub integration does not support a read-only installation. It requests write access so agents can create branches and pull requests.++Review the permissions shown by GitHub before you approve the installation. Apply your required reviews, status checks, and branch protections to agent pull requests.diff --git a/docs/published/docs/tasks/security.mdx b/docs/published/docs/tasks/security.mdxnew file mode 100644index 000000000000..bee013c27a25--- /dev/null+++ b/docs/published/docs/tasks/security.mdx@@ -0,0 +1,35 @@+---+title: Cloud Tasks security+sidebarTitle: Security+sidebar: Docs+showTitle: true+---++Cloud Tasks run agents in isolated cloud sandboxes. This page describes their access to code, snapshot storage, and network controls.++Last reviewed: October 27, 2026.++## Code access and storage++Repository cloning is optional. When a task needs code access, it can clone the selected repository into its sandbox. Agents can send relevant code and product data to large language model (LLM) providers during a run.++Sandbox lifetime and saved snapshots have separate limits:++| Data or environment | Retention |+| ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |+| Running sandbox | Each sandbox has a maximum lifetime of 6 hours. PostHog terminates it when the run ends. |+| Repository snapshots from interactive cloud runs | Some tasks save snapshots for resume. These snapshots have no automatic expiry and remain stored indefinitely. |++Snapshot creation depends on the task and its execution mode. A snapshot preserves files so an interactive run can resume after its sandbox stops. The 6-hour sandbox limit does not delete a saved snapshot.++[Self-Driving agents](/docs/self-driving/security) do not create repository snapshots.++Reports, conversations, execution records, and output files are separate records. Code that an agent includes in a report or model request is subject to the retention for that record or provider.++Review [AI data processing access](/docs/posthog-ai/allow-access) before you enable agents for your organization. See [data storage](/docs/privacy/data-storage) for general PostHog storage and deletion information.++## Execution controls++Cloud Tasks use isolated sandboxes and shell execution policies. Network access depends on the task environment. A restricted environment allows approved destinations. An environment with full network access permits unrestricted outbound connections.++See [sandbox network access](/handbook/engineering/ai/sandboxed-agents#network-access) for the available settings. For the additional safety checks used by Self-Driving agents, see [Self-Driving security](/docs/self-driving/security).