fix(integration-v2): CSP guidance — script-src is required even when bundling#278
Open
gewenyu99 wants to merge 1 commit into
Open
fix(integration-v2): CSP guidance — script-src is required even when bundling#278gewenyu99 wants to merge 1 commit into
gewenyu99 wants to merge 1 commit into
Conversation
…bundling The init skill taught that bundling posthog-js satisfies script-src, so agents extended connect-src only and replay/surveys silently failed to lazy-load from the assets CDN (react-router saas-template finding). Init now demands all directives in one pass with a copy-paste block, its handoff names the directives touched, and the review dimension verifies directive-by-directive instead of trusting the handoff. Generated-By: PostHog Code Task-Id: 2d43c175-646e-4d73-a974-760280c8c95b
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause of the recurring "adds connect-src, misses script-src" review finding (e.g. wizard-workbench#3112 react-router/saas-template): init/description.md's "Work within it" bullet said bundling posthog-js satisfies script-src. It doesn't — replay recorder, surveys, and the toolbar lazy-load from the assets CDN as scripts regardless of how the entry bundle ships. Agents followed the skill faithfully and produced partial CSPs; the review dimension then deferred to the init handoff's "handled". Sol-effort reviews only caught it by over-reading into posthog-best-practices/references/session-replay.md, where the correct fact lives.
Three edits: init teaches the full directive set with a copy-paste block (script-src / connect-src / worker-src), the init handoff names exactly which directives were touched, and the build/review dimension verifies directive-by-directive rather than trusting the handoff — converting an accidental sol-only catch into a deterministic check both arms pass.
Created with PostHog Code