Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sigstore/oci

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sigstore/oci

OCI artifact support

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@sigstore/oci · npm version CI Status Smoke Test Status

Attach artifacts to images in OCI registries.

Prerequisites

  • Node.js version >= 18.17.0

Installation

npm install @sigstore/oci

Usage

const { attachArtifactToImage } = require('@sigstore/oci');
import { attachArtifactToImage } from '@sigstore/oci';

attachArtifactToImage(options)

Uploads the provided artifact to the registry and associates it with an OCI image.

  • options Object

    • artifact Buffer: Bytes of the artifact to upload.
    • mediaType string: Content type to assign to the artifact.
    • imageName string: Fully-qualified name of the image to which the artifact should be associated.
    • imageDigest string: Digest of the image to which the artifact should be associated. Should be of the form <alg>:<digest>.
    • credentials Object
      • username string: Username to use when authenticating with the registry.
      • password string: Password to use when authenticating with the registry.
    • annotations Record<string, string>: Arbitrary name/value pairs to be associated with artifact.

getRegistryCredentials(imageName)

Reads the local $HOME/.docker/config.json file and returns the credentials associated with the image's registry.

  • imageName string: Fully-qualified name of the image from which to extract the registry hostname.

Returns a Credentials object with the following keys:

  • username string
  • password string

Throws if the Docker config cannot be located or if there are no credentials for the specified registry.

FAQs

Package last updated on 14 Oct 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