vulnzap-core
Version:
Secure AI-generated code by intercepting vulnerabilities in real-time
60 lines (59 loc) • 1.58 kB
TypeScript
/**
* VulnZap - The Missing Security Layer for AI-Generated Code
*
* This module provides the core functionality for the VulnZap security bridge,
* which protects AI-generated code from vulnerabilities.
*/
/**
* Configuration for the VulnZap MCP server
*/
export interface VulnZapConfig {
useMcp?: boolean;
ide?: string;
port?: number;
apiKey?: string;
}
/**
* Vulnerability check result interface
*/
export interface VulnerabilityResult {
isVulnerable: boolean;
advisories?: Array<{
id: string;
title: string;
severity: string;
cve_id?: string;
description: string;
source?: string;
}>;
fixedVersions?: string[];
message?: string;
error?: string;
isUnknown?: boolean;
sources?: string[];
}
/**
* Batch status interface
*/
export interface BatchStatus {
id: string;
status: 'pending' | 'processing' | 'completed' | 'failed';
progress: number;
results?: Array<VulnerabilityResult>;
}
/**
* Start the VulnZap MCP server
*
* @param config - Configuration options for the server
* @returns Promise<void>
*/
export declare function startMcpServer(config: VulnZapConfig): Promise<void>;
/**
* Check if a package is vulnerable
*
* @param ecosystem - The package ecosystem (npm, pip)
* @param packageName - The name of the package
* @param packageVersion - The version of the package
* @returns Promise<VulnerabilityResult>
*/
export declare function checkVulnerability(ecosystem: string, packageName: string, packageVersion: string): Promise<any>;