Socket
Socket
Sign inDemoInstall

@sigstore/tuf

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sigstore/tuf

Client for the Sigstore TUF repository


Version published
Weekly downloads
4.7M
decreased by-2.46%
Maintainers
2
Weekly downloads
 
Created

What is @sigstore/tuf?

@sigstore/tuf is an npm package that provides functionalities for secure software supply chain management using The Update Framework (TUF). It helps in ensuring the integrity and authenticity of software updates.

What are @sigstore/tuf's main functionalities?

Initialize TUF Client

This feature allows you to initialize a TUF client with a specified remote repository URL and a local cache path. The TUF client is used to interact with the TUF repository for secure updates.

const { TUFClient } = require('@sigstore/tuf');
const client = new TUFClient({
  remoteRepoURL: 'https://example.com/tuf-repo',
  localCachePath: './tuf-cache'
});

Fetch Metadata

This feature allows you to fetch metadata from the TUF repository. In this example, it fetches the 'root.json' metadata file and logs it to the console.

async function fetchMetadata() {
  const metadata = await client.getMetadata('root.json');
  console.log(metadata);
}
fetchMetadata();

Verify Targets

This feature allows you to verify the integrity and authenticity of a target file using the TUF client. It checks if the target file is valid according to the TUF metadata.

async function verifyTarget(targetFile) {
  const isValid = await client.verifyTarget(targetFile);
  console.log(`Target ${targetFile} is valid: ${isValid}`);
}
verifyTarget('example-target.txt');

Other packages similar to @sigstore/tuf

FAQs

Package last updated on 16 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc