Skip to content

fix(csp): honor 'strict-dynamic' in script-src-attr - #679

Draft
caugner wants to merge 1 commit into
338-csp-attr-elem-unsafe-inlinefrom
338-csp-attr-strict-dynamic
Draft

caugner wants to merge 1 commit into
338-csp-attr-elem-unsafe-inlinefrom
338-csp-attr-strict-dynamic

Conversation

@caugner

@caugner caugner commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Description

Update the CSP analyzer to ignore 'unsafe-inline' in script-src-attr when 'strict-dynamic' is in the same source list.

Motivation

Prevent false positives: per CSP3 §6.7.3.2, 'strict-dynamic' makes 'unsafe-inline' ineffective for inline event handlers.

Additional details

Related issues and pull requests

Depends on:

Per CSP3 6.7.3.2, `'strict-dynamic'` makes `'unsafe-inline'`
ineffective for inline event handlers, so do not flag
`script-src-attr 'strict-dynamic' 'unsafe-inline'`.
@caugner
caugner added this pull request to stack #680 November 25, 2026 11:19

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant