Skip to content

Feature request: Allowlist for third-party scripts run during installationΒ #255

@Gudahtt

Description

@Gudahtt

Problem

Third-party scripts (i.e. scripts from dependencies) run during installation can be used for supply-chain attacks, which have been increasingly common recently.

Feature request

To protect against this risk, Yarn should run no third-party scripts by default. The only code run by default during installation should be from Yarn itself, the project author directly (i.e. top-level install scripts), or foundational system dependencies (e.g. Node.js, Bash, etc.).

Instead of running by default, install scripts from dependencies can be selectively enabled using an allowlist. This allows the project author to accept the risks of install scripts on a case-by-case basis, giving them the opportunity to do whatever analysis/audit/risk assessment they deem necessary. It also protects against new unexpected or unwanted install scripts.

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