UNPKG

detect-secrets-js

Version:

A JavaScript implementation of Yelp's detect-secrets tool - no Python required

35 lines (34 loc) 1.2 kB
import { ScanOptions, ScanResults } from './types'; /** * Initialize the WebAssembly module and Python environment */ export declare function initialize(): Promise<void>; /** * Scan a file or string content for secrets * @param content The file content to scan * @param filePath The path of the file (for reporting) * @param options Scan options * @returns Scan results */ export declare function scanContent(content: string, filePath: string, options?: Partial<ScanOptions>): Promise<ScanResults>; /** * Scan a file for secrets * @param filePath The path of the file to scan * @param options Scan options * @returns Scan results */ export declare function scanFile(filePath: string, options?: Partial<ScanOptions>): Promise<ScanResults>; /** * Scan a directory for secrets * @param directory The directory to scan * @param options Scan options * @returns Scan results */ export declare function scanDirectory(directory?: string, options?: Partial<ScanOptions>): Promise<ScanResults>; declare const _default: { initialize: typeof initialize; scanContent: typeof scanContent; scanFile: typeof scanFile; scanDirectory: typeof scanDirectory; }; export default _default;