UNPKG

supamend

Version:

Pluggable DevSecOps Security Scanner with 10+ scanners and multiple reporting channels

101 lines 4.33 kB
import { LogContext } from './logger'; export declare class SupaMendError extends Error { readonly code: string; readonly context?: LogContext; readonly recoverable: boolean; readonly retryable: boolean; readonly cause?: Error; constructor(message: string, code: string, options?: { context?: LogContext; recoverable?: boolean; retryable?: boolean; cause?: Error; }); } export declare class ScannerError extends SupaMendError { constructor(message: string, scannerName: string, options?: { context?: LogContext; recoverable?: boolean; retryable?: boolean; cause?: Error; }); } export declare class ReporterError extends SupaMendError { constructor(message: string, reporterName: string, options?: { context?: LogContext; recoverable?: boolean; retryable?: boolean; cause?: Error; }); } export declare class GitError extends SupaMendError { constructor(message: string, operation: string, options?: { context?: LogContext; recoverable?: boolean; retryable?: boolean; cause?: Error; }); } export declare class ConfigurationError extends SupaMendError { constructor(message: string, file?: string, options?: { context?: LogContext; recoverable?: boolean; retryable?: boolean; cause?: Error; }); } export declare class PluginError extends SupaMendError { constructor(message: string, pluginName: string, options?: { context?: LogContext; recoverable?: boolean; retryable?: boolean; cause?: Error; }); } export declare class ValidationError extends SupaMendError { constructor(message: string, field?: string, options?: { context?: LogContext; recoverable?: boolean; retryable?: boolean; cause?: Error; }); } export declare const ErrorCodes: { readonly SCANNER_NOT_FOUND: "SCANNER_NOT_FOUND"; readonly SCANNER_NOT_AVAILABLE: "SCANNER_NOT_AVAILABLE"; readonly SCANNER_EXECUTION_FAILED: "SCANNER_EXECUTION_FAILED"; readonly REPORTER_NOT_FOUND: "REPORTER_NOT_FOUND"; readonly REPORTER_NOT_AVAILABLE: "REPORTER_NOT_AVAILABLE"; readonly REPORTER_EXECUTION_FAILED: "REPORTER_EXECUTION_FAILED"; readonly GIT_CLONE_FAILED: "GIT_CLONE_FAILED"; readonly GIT_CLEANUP_FAILED: "GIT_CLEANUP_FAILED"; readonly CONFIG_LOAD_FAILED: "CONFIG_LOAD_FAILED"; readonly CONFIG_INVALID: "CONFIG_INVALID"; readonly PLUGIN_LOAD_FAILED: "PLUGIN_LOAD_FAILED"; readonly PLUGIN_INIT_FAILED: "PLUGIN_INIT_FAILED"; readonly VALIDATION_FAILED: "VALIDATION_FAILED"; readonly NETWORK_ERROR: "NETWORK_ERROR"; readonly PERMISSION_ERROR: "PERMISSION_ERROR"; readonly TIMEOUT_ERROR: "TIMEOUT_ERROR"; readonly UNKNOWN_ERROR: "UNKNOWN_ERROR"; }; export declare const RecoverySuggestions: { readonly SCANNER_NOT_FOUND: "Check if the scanner is properly installed and available in PATH"; readonly SCANNER_NOT_AVAILABLE: "Install the required scanner or check its configuration"; readonly SCANNER_EXECUTION_FAILED: "Check scanner configuration and try again"; readonly REPORTER_NOT_FOUND: "Check if the reporter is properly installed"; readonly REPORTER_NOT_AVAILABLE: "Check reporter configuration and ensure all required dependencies are installed"; readonly REPORTER_EXECUTION_FAILED: "Check reporter configuration and try again"; readonly GIT_CLONE_FAILED: "Check repository URL and access permissions"; readonly GIT_CLEANUP_FAILED: "Manually clean up temporary files if needed"; readonly CONFIG_LOAD_FAILED: "Check configuration file path and format"; readonly CONFIG_INVALID: "Validate configuration file syntax"; readonly PLUGIN_LOAD_FAILED: "Check plugin installation and dependencies"; readonly PLUGIN_INIT_FAILED: "Check plugin configuration and try again"; readonly VALIDATION_FAILED: "Check input parameters and try again"; readonly NETWORK_ERROR: "Check network connectivity and try again"; readonly PERMISSION_ERROR: "Check file permissions and try again"; readonly TIMEOUT_ERROR: "Increase timeout settings or try again"; readonly UNKNOWN_ERROR: "Check logs for more details and try again"; }; //# sourceMappingURL=errors.d.ts.map