Repository navigation
Conversation
24c02
force-pushed
the
csp-and-data-attributes
branch
6 times, most recently
from
October 20, 2026 21:21
16d19f9 to
2308994
Compare
- activate Content-Security-Policy with nonces for scripts/styles
- allowlist external domains: jsdelivr (fonts), googleapis (maps),
hackclub CDNs (images), are-we-there-yet (iframe)
- no unsafe-inline for scripts in any environment
- dev: unsafe-inline for styles (vite HMR), vite host for scripts/ws
convert every onclick/onsubmit/onerror attribute in ERB and Phlex to
data-* attributes with delegated addEventListener handlers:
views: backend/identities, backend/verifications, backend/static_pages,
backend/verification_cases, backend/shared/_review_document_files,
identities/new, developer_apps/show, docs/show, static_pages/slack_id,
error pages, layouts/backend
components: backup_codes_display, window, code_input, sidebar, banner
add nonce to all inline <script> blocks in layouts and the google
maps helper. zero inline event handlers remain in ERB or Phlex.
24c02
force-pushed
the
csp-and-data-attributes
branch
from
October 20, 2026 21:31
2308994 to
94d40f0
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
what
strict Content-Security-Policy with nonces. zero inline event handlers remain in ERB or Phlex.
follows up on the stored XSS fix in 6ba7897 — this eliminates the entire class of JS-context XSS from inline handlers, so even if another unescaped interpolation slips through, CSP blocks execution.
CSP policy
script-src 'self'+ nonces (nounsafe-inlinein any env)style-src 'self'(+unsafe-inlinein dev for vite HMR)inline handler migration
every
onclick,onsubmit,onerror,onloadattribute across all ERB views and Phlex components converted todata-*attributes with delegatedaddEventListenerhandlers in nonced<script>blocks.views: backend/identities, backend/verifications, backend/static_pages, backend/verification_cases, backend/shared/_review_document_files, identities/new, developer_apps/show, docs/show, static_pages/slack_id, error pages, layouts/backend
components: backup_codes_display, window, code_input, sidebar, banner
verification