Skip to main content

Function: deriveTrustTier()

deriveTrustTier(opts): ExtensionTrustTier

Defined in: Extensions/ExtensionManifest.ts:327

Classify an extension's provenance.

The important rule, and the one this function exists to enforce: a valid signature is not sufficient for the signed tier. Verification proves only that the bytes match the key bundled with the package, which a hostile author controls end to end. Promotion to signed additionally requires that key to appear in trustedPublisherKeys — a set the app controls.

Kept pure and dependency-free so the host and the renderer classify identically, and so the rule is trivially testable.

Parameters

opts

fromMarketplace?

boolean

True when the extension was installed from the curated catalog.

signatureKey?

string

Hex-encoded Ed25519 public key from the package signature, if any.

signatureStatus?

SignatureVerificationStatus

trustedPublisherKeys

readonly string[]

Hex-encoded keys the app is willing to vouch for.

Returns

ExtensionTrustTier