logo

Database

Posthog Api Key

Description

The source code repository contains sensitive information: PostHog API Key

Weakness:

009 - Sensitive information in source code

Category: Information Collection

Detection Strategy

    • Matches PostHog API Key patterns in source code and configuration files

Vulnerable code example

POSTHOG_PERSONAL_API_KEY=phx_mFgmjBhghHTzsLY2Wuduki3ntbXxjDXtoMB7eJmXKfoiqNvs
export POSTHOG_API_KEY="phx_hs8AA7HoiVLHEvVhppFmfbRXFAwmzLSkjMMuAaQsHxVVrT6jz"
curl https://us.posthog.com/api/users/@me/ -H "Authorization: Bearer phx_qCABTOVLaICQWZxMHCrE9YN0hAYsxSHZbPYp8cTNvDrNO1u"
posthog = Posthog(personal_api_key='phx_uadjaCoBjvHG1ZHQ7uukGJCJQ3gnhsNIUcyOYxkHX3wHv', host='https://eu.posthog.com')
headers: { Authorization: `Bearer phx_rGtH97n6xevkaFEpFETBGDDyuDwqWohqbHH2CWHVpt8kjH6H` }
POSTHOG_PERSONAL_API_KEY=phx_Q7mK2vL9pR4tYwN6bC1dF8hJ3sU5aE0gIxZcVbNmLkJ