@tinfoilsh/verifier
v1.3.0
Published
AMD SEV-SNP attestation verifier for Node.js and browsers
Readme
@tinfoilsh/verifier
Browser-compatible TypeScript library for verifying AMD SEV-SNP attestation reports and Sigstore code provenance.
Most users should use the main tinfoil package instead. It includes this verifier and runs it automatically. Use this package directly for standalone verification, custom verification flows, or audit tooling.
Installation
npm install @tinfoilsh/verifierQuick Start
import { Verifier } from '@tinfoilsh/verifier';
const verifier = new Verifier({
serverURL: 'https://enclave.example.com',
configRepo: 'tinfoilsh/confidential-model-router',
});
const attestation = await verifier.verify();
console.log(attestation.measurement);
console.log(attestation.tlsPublicKeyFingerprint);
console.log(attestation.hpkePublicKey);
// Per-step results and measurements
const doc = verifier.getVerificationDocument();
console.log(doc?.securityVerified);verifyBundle(bundle) verifies an attestation bundle you already hold. Failed verification throws AttestationError, a failed fetch in verify() throws FetchError, and missing options throw ConfigurationError.
Obtaining tlsPublicKeyFingerprint does not pin anything: a custom transport must compare it with the live peer certificate's SPKI on every new TLS connection, in addition to normal hostname and certificate validation.
Release metadata and attestation bundles are fetched through Tinfoil-hosted GitHub proxy endpoints, so verification fails in environments that cannot reach them.
See Attestation architecture and Verification in Tinfoil for what gets verified.
Development
npm run build
npm test
npm run test:browserReporting Vulnerabilities
Please report security vulnerabilities by either:
- Emailing [email protected]
- Opening an issue on GitHub on this repository
We aim to respond to (legitimate) security reports within 24 hours.
