Skip to content

Minimum release age for @latest #850

Open

Description

@arty-name

When running for example corepack prepare pnpm@latest --activate the corepack will apparently install the latest tag even if it was created just minutes ago. In case the package manager is compromised and a malicious version of it is published, corepack users might get it installed if their timing is unlucky.

Would it make sense for corepack to support something like minReleaseAge to give security researchers time to detect compromised versions?

Activity

  1. MikeMcC399 commented on May 21, 2026

    @MikeMcC399
    Contributor

    It probably would make sense. Have you seen any standard for defining it in package.json?

    When I looked at the package managers that Corepack covers, I found different implementations for each one in terms of restricting dependency installation:

    Supply-chain attacks are on the increase unfortunately!

  2. arty-name commented on May 21, 2026

    @arty-name
    Author

    Thank you for the prompt response!

    Unfortunately I don’t know of any standard here, and even the naming is not aligned.

    Since I sometimes run the enable command outside of the context of any project, I’d be happy to see a more global configuration or a default value for this, not connected to any package.json. Arguably, this should be the default.

  3. MikeMcC399 commented on May 21, 2026

    @MikeMcC399
    Contributor

    corepack prepare pnpm@latest --activate

    This command is deprecated. The replacement would be:

    corepack install -g pnpm@latest`

    Just to mention it here, although it doesn't make any difference to your enhancement suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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