microsoft / microsoft/typespec

Run configured package manager verify signatures

Open
#6,277 1 comment 0 reactions 0 assignees View on GitHub
compiler:core feature triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

The initial implementation https://github.com/microsoft/typespec/pull/6220 doesn't verify the signature of the downloaded package.

The concern is that corepack today include the registry keys in their codebase which means when rotated any older version is now broken(without passing the flag to ignore key validation) https://github.com/nodejs/corepack/issues/616

Seems like a suggested solution is to use the npm approach to call tuf sigtool to retrieve teh keys with a fallback on downloading them from npm registry (with potentially logging a warning to the user)

npm implementation
https://github.com/npm/cli/blob/593c84921b0df963cef2ca7b13e44acc20cbd558/lib/utils/verify-signatures.js#L178-L191

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.