Skip to content

Commit 2691df3

Browse files
snomiaoclaude
andcommitted
chore: enhance telemetry CI scan to detect Mixpanel and Impact
Expand the existing CI telemetry scan workflow to detect additional telemetry libraries beyond Google Tag Manager. Added detection patterns for: - Mixpanel (mixpanel-browser, api/cdn domains, init/track/identify methods) - Impact Analytics (impactcdn.com, tracking ID) Also improved error messaging to: - List all telemetry providers being checked - Provide troubleshooting guidance - Reference PR #8311 for historical context This prevents accidental inclusion of telemetry code in OSS builds, similar to the GTM incident in PR #8311. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5f7a6e7 commit 2691df3

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/ci-dist-telemetry-scan.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,29 @@ jobs:
4545
-e '(?i)\bgtm\.js\b' \
4646
-e '(?i)googletagmanager\.com/gtm\.js\\?id=' \
4747
-e '(?i)googletagmanager\.com/ns\.html\\?id=' \
48+
-e 'mixpanel-browser' \
49+
-e '(?i)api\.mixpanel\.com' \
50+
-e '(?i)cdn\.mxpnl\.com' \
51+
-e '(?i)mixpanel\.init' \
52+
-e '(?i)mixpanel\.track' \
53+
-e '(?i)mixpanel\.identify' \
54+
-e '(?i)mixpanel\.people' \
55+
-e '(?i)impactcdn\.com' \
56+
-e 'A6951770-3747-434a-9ac7-4e582e67d91f1' \
4857
dist; then
49-
echo 'Telemetry references found in dist assets.'
58+
echo '❌ Telemetry references found in dist assets.'
59+
echo ''
60+
echo 'This CI check scans for telemetry libraries that should not be included in OSS builds:'
61+
echo ' - Google Tag Manager (GTM)'
62+
echo ' - Mixpanel'
63+
echo ' - Impact Analytics'
64+
echo ''
65+
echo 'If you see this error:'
66+
echo ' 1. Check your build configuration to ensure telemetry code is properly excluded'
67+
echo ' 2. Verify conditional imports are working correctly'
68+
echo ' 3. Review the matched lines above to identify the source'
69+
echo ''
70+
echo 'For context, see PR #8311 which accidentally shipped GTM code to OSS builds.'
5071
exit 1
5172
fi
52-
echo 'No telemetry references found in dist assets.'
73+
echo 'No telemetry references found in dist assets.'

0 commit comments

Comments
 (0)