: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(semgrep): anchor path patterns to silence v2 deprecation warnings (#59293)
Rafael Audibertfc444dde4c1b
diff --git a/.semgrep/rules/admin-modeladmin-needs-register-decorator.yaml b/.semgrep/rules/admin-modeladmin-needs-register-decorator.yamlindex d526107e3c2a..d3753ce71eeb 100644--- a/.semgrep/rules/admin-modeladmin-needs-register-decorator.yaml+++ b/.semgrep/rules/admin-modeladmin-needs-register-decorator.yaml@@ -29,8 +29,8 @@ rules:# Only enforce inside admin modules. Other places might subclass# `ModelAdmin` for testing or as abstract scaffolding.include:- - 'posthog/admin/admins/*.py'- - 'products/*/backend/admin.py'+ - '/posthog/admin/admins/*.py'+ - '/products/*/backend/admin.py'metadata:category: correctnesstechnology:diff --git a/.semgrep/rules/hogql-no-string-table-chain.yaml b/.semgrep/rules/hogql-no-string-table-chain.yamlindex ec62d6bed0b3..2ddc5c11bbcf 100644--- a/.semgrep/rules/hogql-no-string-table-chain.yaml+++ b/.semgrep/rules/hogql-no-string-table-chain.yaml@@ -22,10 +22,10 @@ rules:and POE virtual-table paths working.paths:include:- - 'posthog/hogql/**/*.py'- - 'posthog/hogql_queries/**/*.py'- - 'products/**/*.py'- - 'ee/**/*.py'+ - '/posthog/hogql/**/*.py'+ - '/posthog/hogql_queries/**/*.py'+ - '/products/**/*.py'+ - '/ee/**/*.py'exclude:- '**/test/**'- '**/tests/**'diff --git a/.semgrep/rules/logs-alert-state-must-go-through-state-machine.yaml b/.semgrep/rules/logs-alert-state-must-go-through-state-machine.yamlindex 36d03c69d4fd..cf698d813ab8 100644--- a/.semgrep/rules/logs-alert-state-must-go-through-state-machine.yaml+++ b/.semgrep/rules/logs-alert-state-must-go-through-state-machine.yaml@@ -43,10 +43,10 @@ rules:confidence: HIGHpaths:include:- - 'products/logs/backend/**/*.py'+ - '/products/logs/backend/**/*.py'exclude:# The state machine itself — apply_outcome is the one legal mutator.- - 'products/logs/backend/alert_state_machine.py'+ - '/products/logs/backend/alert_state_machine.py'# Test files — fixtures and parametrized snapshots set state directly.- - 'products/logs/backend/test/**'- - 'products/logs/backend/**/test_*.py'+ - '/products/logs/backend/test/**'+ - '/products/logs/backend/**/test_*.py'diff --git a/.semgrep/rules/no-direct-fuse-instantiation.yaml b/.semgrep/rules/no-direct-fuse-instantiation.yamlindex 93e05a7f0ae2..2bd9a51bdc2c 100644--- a/.semgrep/rules/no-direct-fuse-instantiation.yaml+++ b/.semgrep/rules/no-direct-fuse-instantiation.yaml@@ -12,4 +12,4 @@ rules:regex: ^(Fuse|FuseClass|_Fuse)$paths:exclude:- - frontend/src/lib/utils/fuseSearch.ts+ - /frontend/src/lib/utils/fuseSearch.tsdiff --git a/.semgrep/rules/no-direct-kafka-producer.yaml b/.semgrep/rules/no-direct-kafka-producer.yamlindex 6ed9c75c95ee..526df01665dc 100644--- a/.semgrep/rules/no-direct-kafka-producer.yaml+++ b/.semgrep/rules/no-direct-kafka-producer.yaml@@ -17,22 +17,22 @@ rules:paths:exclude:# Routing module is the only allowed constructor of the primitives.- - posthog/kafka_client/routing.py+ - /posthog/kafka_client/routing.py# The primitives live here.- - posthog/kafka_client/client.py+ - /posthog/kafka_client/client.py# Tests for the primitives themselves.- - posthog/kafka_client/test/test_client.py+ - /posthog/kafka_client/test/test_client.py# Existing integration tests that explicitly opt out of the test stub# to exercise a real broker. These are gated behind KAFKA_ROUNDTRIP_TESTS.- - posthog/dags/tests/test_person_property_reconciliation.py- - posthog/temporal/tests/dlq_replay/test_activities.py- - posthog/temporal/tests/common/test_logger.py+ - /posthog/dags/tests/test_person_property_reconciliation.py+ - /posthog/temporal/tests/dlq_replay/test_activities.py+ - /posthog/temporal/tests/common/test_logger.py# DLQ replay needs per-message header passthrough, which confluent's# AIOProducer refuses in batch mode. Uses raw aiokafka with cluster# config resolved via get_profile_settings().- - posthog/temporal/dlq_replay/activities.py+ - /posthog/temporal/dlq_replay/activities.py# Batch export metrics path — tests assert metrics land in ClickHouse# via the kafka→CH ingest pipeline, and the confluent AIOProducer# behaves differently in that test environment. Left on raw aiokafka# to keep existing tests passing; migrate in a follow-up PR.- - products/batch_exports/backend/temporal/batch_exports.py+ - /products/batch_exports/backend/temporal/batch_exports.py