Skip to content

Support strict CSP policies for style-src 'self' #12139

Closed
@lightswitch05

Description

@lightswitch05

Feature Request

Angular material is currently incompatible with a strict Content Security Policy (CSP) of style-src 'self';. The most strict CSP policy for style-src that I've been able to use with Angular Material is style-src 'self' 'unsafe-inline';, which isn't terrible, but still gets flagged on security scanners like https://csp-evaluator.withgoogle.com

It would be nice if Angular Material could become compatible with strict CSPs. What it would mean is removing any in-line style tags, such as the one in checkbox.html

Questions

  • Given the nature of this project and its heavy use of dynamic styling, is this even possible?
  • Does the material team have any interest in avoiding in-line style tags?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions