import type { RuleCheck } from './rules/types'; export type WebhookPlatform = 'dingtalk' | 'feishu' | 'wecom'; export interface WebhookPayload { platform: WebhookPlatform; url: string; task?: string; rules: RuleCheck[]; exitCode: number; } /** * SSRF 防护——webhook URL 指向本机/内网时拒绝推送。 * 审计数据(可能含文件路径/代码片段)不应被投递到内网服务: * 恶意 Agent 若可写 config.yml 的 webhook.url,就能把审计数据 POST 到 * 内网管理端口(如 http://127.0.0.1:8080/admin)。 * 规则:http/https + 非回环/非私网/非链路本地/非内网域名后缀。 */ export declare function isPrivateWebhookUrl(rawUrl: string): boolean; /** * 推送审计结果到 webhook * v1.1.3: PASS 也推送(之前只在 WARN/FAIL 时推送) * 超时 5 秒,超时/失败 silently return false * @returns true 推送成功, false 推送失败 */ export declare function pushAuditResult(payload: WebhookPayload, customPatterns?: { pattern: RegExp; replacement: string; }[]): Promise; //# sourceMappingURL=webhook.d.ts.map