GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SocketDev/socket-sdk-js: JavaScript SDK for the socket.dev API

BranchesTags
Open more actions menu

Latest commit

 

History

1,921 Commits
1,921 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude
.claude
 
 
.config
.config
 
 
.git-hooks
.git-hooks
 
 
.github
.github
 
 
assets
assets
 
 
data
data
 
 
docs
docs
 
 
patches/fleet
patches/fleet
 
 
scripts
scripts
 
 
src
src
 
 
test
test
 
 
types
types
 
 
.editorconfig
.editorconfig
 
 
.env.test
.env.test
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.node-version
.node-version
 
 
.npmrc
.npmrc
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
depot.json
depot.json
 
 
llms.txt
llms.txt
 
 
openapi-v1.json
openapi-v1.json
 
 
openapi.json
openapi.json
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
tsconfig.dts.json
tsconfig.dts.json
 
 
tsconfig.json
tsconfig.json
 
 
vitest.config.mts
vitest.config.mts
 
 

Repository files navigation

@socketsecurity/sdk

Socket Badge Coverage

Follow @SocketSecurity Follow @socket.dev on Bluesky

JavaScript SDK for the Socket.dev API - package scoring, quota management, batch lookups, dependency analysis.

@socketsecurity/sdk is the canonical JavaScript/TypeScript client for the Socket.dev API. It exists so any Node app - your build pipeline, your registry tooling, your custom security gate - can call Socket's package-scoring and analysis endpoints without hand-rolling auth, retries, and response shapes. The SDK is consumed by Socket's own CLI, MCP server, and third-party integrations.

Install

pnpm add @socketsecurity/sdk

Usage

Quickstart: construct SocketSdk with retries, retryDelay and timeout, then call getQuota, getScoreByNpmPackage, and batchPackageFetch
import { SocketSdk } from '@socketsecurity/sdk'

const client = new SocketSdk('your-api-key', {
  retries: 3, // Retry failed requests up to 3 times
  retryDelay: 1000, // Start with 1s delay, exponential backoff
  timeout: 30000, // 30 second timeout
})

// Check your quota
const quota = await client.getQuota()
if (quota.success) {
  console.log(`Available quota: ${quota.data.quota} units`)
}

// Analyze a package
const result = await client.getScoreByNpmPackage('express', '4.18.0')
if (result.success) {
  console.log(`Dependency Score: ${result.data.depscore}`)
}

// Batch analyze multiple packages
const batchResult = await client.batchPackageFetch({
  components: [
    { purl: 'pkg:npm/[email protected]' },
    { purl: 'pkg:npm/[email protected]' },
  ],
})

Development

Contributor commands
pnpm install
pnpm run build
pnpm test
pnpm run check

Documentation

Guide Description
API Reference Class methods, exported helpers, and types
SDK Concepts Results, pagination, uploads, and runtime behavior
Quota Management Metadata-backed costs and quota helpers
Unsupported endpoints Endpoints the SDK does not wrap

License

MIT

Socket

About

JavaScript SDK for the socket.dev API

socket.dev/npm/package/@socketsecurity/sdk

Topics

apijavascriptsdksecuritysockettypescript

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

59 stars

Watchers

16 watching

Forks

22 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.