Skip to content

Next.js use of globalThis causes CSP false positives without unsafe-eval #3772

Open
@mitchellrj

Description

@mitchellrj

Describe the bug

The solution to #3067 (#2015 ) first tries the approach that would be blocked by CSP, then falls back to an approach that is not blocked.

This causes a large number of false positive CSP reports to be generated, even when there is no threat and no impact to functionality.

Could the solution not try the safer version first, then the unsafe version if that fails? Or repurpose / adopt the work done in #3179 ?

Reproduction

N/A

Used Package Manager

npm

System Info

N/A

Validations

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