npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@xeopsai/scanner-sdk

v1.0.0

Published

XeOps Security Scanner SDK for CI/CD integration

Readme

@xeops/scanner-sdk

XeOps Security Scanner SDK for CI/CD integration and programmatic access.

Installation

npm install @xeops/scanner-sdk

Usage

Basic Example

import { XeOpsScannerClient } from '@xeops/scanner-sdk';

const client = new XeOpsScannerClient({
  apiEndpoint: 'https://xeops-scanner-97758009309.europe-west1.run.app',
  apiKey: 'your-api-key'
});

// Start a scan
const scan = await client.startScan({
  targetUrl: 'https://example.com'
});

console.log('Scan ID:', scan.scanId);

// Wait for completion
const result = await client.waitForScanCompletion(scan.scanId, {
  onProgress: (result) => {
    console.log(`Progress: ${result.progress}%`);
  }
});

console.log('Vulnerabilities found:', result.vulnerabilitiesFound);

CI/CD Integration

import { XeOpsScannerClient } from '@xeops/scanner-sdk';
import * as fs from 'fs';

const client = new XeOpsScannerClient({
  apiEndpoint: process.env.XEOPS_API_ENDPOINT!,
  apiKey: process.env.XEOPS_API_KEY!
});

async function securityScan() {
  // Start scan
  const scan = await client.startScan({
    targetUrl: 'https://staging.example.com'
  });

  // Wait for completion with timeout
  const result = await client.waitForScanCompletion(scan.scanId, {
    timeout: 1800000, // 30 minutes
    onProgress: (r) => console.log(`${r.progress}%`)
  });

  // Download PDF report
  const pdf = await client.downloadPdfReport(scan.scanId, true);
  fs.writeFileSync('security-report.pdf', pdf);

  // Fail build if critical/high vulnerabilities found
  const critical = result.metadata?.criticalCount || 0;
  const high = result.metadata?.highCount || 0;

  if (critical > 0 || high > 0) {
    console.error(`Found ${critical} critical and ${high} high vulnerabilities`);
    process.exit(1);
  }
}

securityScan().catch(console.error);

API Reference

XeOpsScannerClient

Constructor

new XeOpsScannerClient(config: ScannerSDKConfig)

Config options:

  • apiEndpoint: XeOps API endpoint URL
  • apiKey: Your API key
  • timeout?: Request timeout in ms (default: 60000)
  • maxRetries?: Max retry attempts (default: 3)
  • retryDelay?: Delay between retries in ms (default: 1000)
  • debug?: Enable debug logging (default: false)

Methods

startScan(request: ScanRequest): Promise

Start a new security scan.

getScanResult(scanId: string): Promise

Get the current status and results of a scan.

waitForScanCompletion(scanId: string, options?: WaitForScanOptions): Promise

Wait for a scan to complete with polling.

Options:

  • pollingInterval?: Polling interval in ms (default: 5000)
  • timeout?: Maximum wait time in ms (default: 1800000)
  • onProgress?: Callback for progress updates

downloadPdfReport(scanId: string, validatePoc?: boolean): Promise

Download PDF report for a completed scan.

getUsage(): Promise

Get usage statistics for your account.

verifyApiKey(): Promise

Verify if the API key is valid.

cancelScan(scanId: string): Promise

Cancel a running scan.

listScans(params?: ListScansParams): Promise<ScanResult[]>

List scans for your account.

License

MIT