
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@socketsecurity/sdk
Advanced tools
JavaScript SDK for Socket.dev API - Security analysis, vulnerability scanning, and compliance monitoring for software supply chains.
| Feature | Description |
|---|---|
| Package Analysis | Quick security checks for npm packages |
| Full Scans | Deep analysis with SBOM support |
| Batch Operations | Analyze multiple packages efficiently |
| Policy Management | Configure security & license rules |
| Quota Utilities | Cost calculation & planning helpers |
| TypeScript | Full type safety with auto-generated types |
Requirements: Node.js 18+ ·ESM only (v2.0+)
pnpm add @socketsecurity/sdk
Note: Version 2.0+ is ESM-only. For CommonJS support, use version 1.x.
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(`Security Score: ${result.data.score}/100`)
}
// Batch analyze multiple packages
const batchResult = await client.batchPackageFetch({
components: [
{ purl: 'pkg:npm/express@4.18.0' },
{ purl: 'pkg:npm/react@18.0.0' }
]
})
Quick security checks: batchPackageFetch() ·batchPackageStream() ·getIssuesByNpmPackage() ·getScoreByNpmPackage()
Project scanning: createDependenciesSnapshot() ·createOrgFullScan() ·createScanFromFilepaths() ·getScan() ·getScanList() ·getSupportedScanFiles()
Organizations and repositories: getOrganizations() ·createOrgRepo() ·getOrgRepo() ·getOrgRepoList() ·updateOrgRepo() ·deleteOrgRepo()
Security configuration: getOrgSecurityPolicy() ·updateOrgSecurityPolicy() ·getOrgLicensePolicy() ·updateOrgLicensePolicy() ·postSettings()
Deep analysis: getOrgFullScanList() ·getOrgFullScanMetadata() ·getOrgFullScanBuffered() ·streamOrgFullScan() ·deleteOrgFullScan()
Scan comparison: createOrgDiffScanFromIds() ·getDiffScanById() ·listOrgDiffScans() ·deleteOrgDiffScan()
Security fixes: streamPatchesFromScan() ·viewPatch()
Alert management: getOrgTriage() ·updateOrgAlertTriage()
SBOM export: exportCDX() ·exportSPDX() ·searchDependencies() ·uploadManifestFiles()
Categorization: createOrgRepoLabel() ·getOrgRepoLabel() ·getOrgRepoLabelList() ·updateOrgRepoLabel() ·deleteOrgRepoLabel()
Usage metrics: getQuota() ·getOrgAnalytics() ·getRepoAnalytics() ·getAuditLogEvents()
API tokens: getAPITokens() ·postAPIToken() ·postAPITokensRotate() ·postAPITokensRevoke() ·postAPITokenUpdate()
Feature access: getEnabledEntitlements() ·getEntitlements()
Cost helpers: getQuotaCost() ·getRequiredPermissions() ·calculateTotalQuotaCost() ·hasQuotaForMethods() ·getMethodsByQuotaCost() ·getMethodsByPermissions() ·getQuotaUsageSummary() ·getAllMethodRequirements()
Raw API access: getApi() ·sendApi()
| Guide | Description |
|---|---|
| API Reference | Complete API method documentation |
| Usage Examples | Real-world patterns and code samples |
| Getting Started | Development setup and workflow |
| Quota Management | Cost tiers (0/10/100) and utilities |
| Testing Guide | Test helpers, fixtures, and patterns |
| Method Reference | Quick method selection guide |
See usage-examples.md for complete examples including:
| Project | Description |
|---|---|
| Socket.dev API | Official REST API documentation |
| Socket CLI | Command-line interface |
| Socket GitHub App | Automated GitHub integration |
MIT
FAQs
SDK for the Socket API client
The npm package @socketsecurity/sdk receives a total of 2,086 weekly downloads. As such, @socketsecurity/sdk popularity was classified as popular.
We found that @socketsecurity/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.