posthog-analytics
Enables product analytics with PostHog for event tracking, user identification, and feature flags to enhance decision-making.
Install this skill
Security score
The posthog-analytics skill was audited on Jun 8, 2026 and we found 21 security issues across 3 threat categories. Review the findings below before installing.
Categories Tested
Security Issues
Template literal with variable interpolation in command context
| 85 | url += `?${searchParams.toString()}`; |
Access to .env file
| 46 | posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, { |
Access to .env file
| 47 | api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST || 'https://us.i.posthog.com', |
Access to .env file
| 52 | if (process.env.NODE_ENV === 'development') { |
Access to .env file
| 118 | posthog.init(import.meta.env.VITE_POSTHOG_KEY, { |
Access to .env file
| 119 | api_host: import.meta.env.VITE_POSTHOG_HOST || 'https://us.i.posthog.com', |
Access to .env file
| 180 | const posthog = new PostHog(process.env.POSTHOG_API_KEY!, { |
Access to .env file
| 181 | host: process.env.POSTHOG_HOST || 'https://us.i.posthog.com', |
Access to .env file
| 211 | # .env.local (Next.js) - SAFE: These are meant to be public |
Access to .env file
| 215 | # .env (Backend) - Keep private |
Access to .env file
| 499 | const posthog = new PostHog(process.env.POSTHOG_API_KEY!); |
Access to .env file
| 819 | if (process.env.NODE_ENV === 'development') { |
Access to .env file
| 874 | if (process.env.NODE_ENV === 'development') { |
Access to .env file
| 888 | if (process.env.NODE_ENV === 'development') { |
External URL reference
| 14 | **Sources:** [PostHog Docs](https://posthog.com/docs) | [Product Analytics](https://posthog.com/docs/product-analytics) | [Feature Flags](https://posthog.com/docs/feature-flags) |
External URL reference
| 47 | api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST || 'https://us.i.posthog.com', |
External URL reference
| 119 | api_host: import.meta.env.VITE_POSTHOG_HOST || 'https://us.i.posthog.com', |
External URL reference
| 152 | posthog.host = os.environ.get("POSTHOG_HOST", "https://us.i.posthog.com") |
External URL reference
| 181 | host: process.env.POSTHOG_HOST || 'https://us.i.posthog.com', |
External URL reference
| 213 | NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com |
External URL reference
| 217 | POSTHOG_HOST=https://us.i.posthog.com |