Skip to content

Include `script-sample' for "eval" violations #197

@arturjanc

Description

@arturjanc

In #119 we talked about including a script-sample for "inline" violations to help developers identify the markup that caused the violation (or determine that the violation is a false positive caused by an extension).

@lweichselbaum suggested that it would similarly make sense to include the string argument to an eval-like function if the blocked-uri is "eval". For developers who adopt policies without 'unsafe-eval' this would help detect the sources of any eval()-related violations and give them confidence that the policy will not break the application.

This is less pressing than the work in #119 but seems consistent with the spirit of the script-sample field. In the future it could help developers get rid of 'unsafe-eval' to reduce the possibility of eval()-based DOM gadgets allowing CSP bypasses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs concrete proposalMoving the issue forward requires someone to figure out a detailed plan

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions