Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trusted types #235

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Trusted types #235

wants to merge 2 commits into from

Conversation

henrym2
Copy link

@henrym2 henrym2 commented Aug 12, 2020

Linked to issue #233

This PR extends the current CSP configuration within the Nelmio Security bundle to include the new Trusted-Types policy headers

  • trusted-types: <POLICY NAMES>
  • require-trusted-types-for: <DOM-SINK>

These directives interface with the new trusted types feature, with the hopes of reducing DOM based XSS sinks. They instruct user agents to restrict usage of known DOM XSS sinks to a predefined set of functions or Policies. Resources linked at the end of this description describe the spec for trusted types and their Benifits.

Added trusted-types header
add require-trusted-types-for header
Added script and style to quoted directives
Added TYPE_POLICIES_LIST
Added tests for trusted types keywords
added tests for trusted types in csp
Moved directives to be chrome only
@henrym2 henrym2 marked this pull request as ready for review August 13, 2020 11:40
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.

None yet

1 participant