Repository navigation
Description
Summary
docs/embedding.md now tells a host that the refused eval they see on the recommended CSP is
expected and harmless. What it still says has not been measured is a Turnstile challenge being
solved under that policy. Every write the widget makes is captcha-gated, so if a solve needs
'unsafe-eval', the recommended policy silently costs a visitor their registration.
#272 held this question and #271 closed it, having
answered the documentation half and ruled out the cheap route. This ticket owns the half that
remains, so the gap has an owner rather than a sentence.
Approach
A routine cannot do this, which is why it is a ticket and not a finding. Two credentials are
needed and neither can reach a cloud session: the production VITE_TURNSTILE_SITE_KEY (held in
the Cloudflare Pages environment) and a SahajCloud client key the backend accepts. .env ships
the always-passes test key 1x00000000000000000000AA.
That test key is now measured, not suspected. Chromium 141, 2026-10-10, an isolated page
sending the documented policy as a response header and loading
api.js?render=explicit exactly as src/hooks/use-turnstile.ts does: turnstile.render
succeeds, hands back the literal XXXX.DUMMY.TOKEN.XXXX, renders no challenge iframe, and trips
no securitypolicyviolation at all — under the documented policy and with 'unsafe-eval'
added, 3 runs each. So the test key short-circuits before any code path that evals, and cannot
answer this question however it is driven. #272's ⚠ guessed this; it is
confirmed.
Three places move depending on the answer:
docs/embedding.md:788— thescript-srcline in the policy block, if'unsafe-eval'is
required.docs/embedding.md:830— the note naming the refusal expected and harmless. It is currently
worded as what was observed, not as something every page view must produce.docs/embedding.md:1224— the troubleshooting row for the console message, which currently
sends a host away from the fatal blocked-Turnstile row above it.
Acceptance criteria
- It is established, in a browser, with the production site key, whether a Turnstile
challenge yields a token under the documentedscript-srccarrying no'unsafe-eval'. - If it does:
docs/embedding.md:830and:1224keep their claims, now dated against a
solved challenge, and the policy block is unchanged. - If it does not:
'unsafe-eval'joins thescript-srcline, the
challenges.cloudflare.comrow atdocs/embedding.md:810says why, andCHANGELOG.md
carries an entry — a host can observe this one. - Either way the claim is dated and names the browser, as the
style-srcnote added in
docs(embedding): re-measure whatstyle-srcbreaks, and name Turnstile's refusedeval#271 does. - Map mode is covered too, or the note says it was not. docs(embedding): re-measure what
style-srcbreaks, and name Turnstile's refusedeval#271 measured a
map=falseembed only, for want ofVITE_MAPBOX_ACCESSTOKEN.
Verification checklist
-
pnpm build, then servedist/and a host page from one origin with a
Content-Security-Policyresponse header.pnpm review:embedsends no header, so front it
with a proxy or a throwaway server. - Build with the production
VITE_TURNSTILE_SITE_KEYand a client key the backend accepts,
and confirm the rendered challenge is not the dummy-token path — a challenge iframe from
challenges.cloudflare.commust appear. - Send the policy from
docs/embedding.md:787-796verbatim. Open the report-issue form,
solve the challenge, and record whether a token is produced and the submission accepted. - Repeat with
'unsafe-eval'added toscript-src, and compare. - Record the
securitypolicyviolationentries and console text from both runs. -
grep -n "unsafe-eval" docs/embedding.md— every hit agrees with what was measured. -
pnpm lint && pnpm typecheck && pnpm test:runpass.
Notes
No automated lane can hold this. The smoke lane reads deployed file content over fetch, so
it cannot observe a CSP decision made by a rendering engine — docs/testing.md states the same
limit. The guard is that the claim was observed once and dated.
Related: #182 made Turnstile essential and wrote the script-src and
frame-src rows. #272 raised this question. #271
answered its documentation half and measured the test key out.
🤖 Written by the sydevs autonomous loop — see what this is
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Oct 11, 2026
@sydevs-bot implement
sydevs-bot commentedon Oct 11, 2026
🤖 no session running
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.