/**
 * URL Security Utilities
 *
 * Provides URL validation to prevent SSRF attacks
 * Blocks internal addresses, private IP ranges, and dangerous protocols
 */
import { SecurityError } from '../core/errors/index.js';
/**
 * Error thrown when a URL fails security validation
 * @deprecated Use SecurityError from core/errors instead
 */
export declare class UrlSecurityError extends SecurityError {
    readonly url: string;
    readonly reason: 'internal_address' | 'private_ip' | 'invalid_protocol' | 'invalid_url';
    readonly name: string;
    constructor(message: string, url: string, reason: 'internal_address' | 'private_ip' | 'invalid_protocol' | 'invalid_url');
}
/**
 * Validates a URL for security concerns (SSRF prevention)
 *
 * @param url - URL string to validate
 * @returns The validated URL if safe
 * @throws UrlSecurityError if the URL is potentially dangerous
 *
 * @example
 * ```typescript
 * // Valid external URL
 * validateExternalUrl('https://ci.example.com/job/plugin')
 *
 * // Throws UrlSecurityError
 * validateExternalUrl('http://127.0.0.1:8080/admin')
 * validateExternalUrl('http://169.254.169.254/latest/meta-data/')
 * validateExternalUrl('file:///etc/passwd')
 * ```
 */
export declare function validateExternalUrl(url: string): string;
/**
 * Checks if a URL is safe for external use without throwing
 *
 * @param url - URL string to check
 * @returns true if the URL is safe, false otherwise
 */
export declare function isExternalUrlSafe(url: string): boolean;
//# sourceMappingURL=url-security.d.ts.map