/** * Novelty Checker — determines if a bounty finding has already been reported/patched. * * Layer 1 (fast, local): Git recency + release notes keyword scan. * Layer 2 (deep, API): GitHub Security Advisories + code comparison. */ export type NoveltyStatus = 'likely-novel' | 'likely-patched' | 'check-manually'; export interface NoveltyResult { status: NoveltyStatus; reason: string; } export interface GitSecurityResult { hasSecurityFixes: boolean; matchingCommits: string[]; } export interface DeepCheckResult { status: NoveltyStatus; reason: string; advisories: string[]; hacktivityMatches: string[]; codeStillVulnerable: boolean | null; } /** * Extract security-relevant keywords from a claim description. */ export declare function extractSecurityKeywords(claim: string): string[]; /** * Parse git log output and check for security-related commits * that mention any of the given keywords. */ export declare function parseGitLogForSecurityFixes(gitLog: string, keywords: string[]): GitSecurityResult; /** * Parse git tag output into a clean array of tag names. */ export declare function parseGitTags(output: string): string[]; /** * Layer 1: Quick novelty check using only local git data. */ export declare function checkNoveltyLocal(targetPath: string, file: string, claim: string): NoveltyResult; /** * Check GitHub Security Advisories for a repo. * Requires `gh` CLI to be installed and authenticated. */ export declare function checkGitHubAdvisories(owner: string, repo: string, keywords: string[]): { found: boolean; matches: string[]; }; /** * Check if the vulnerable code still exists on the main branch. * Now actually checks file existence + optionally greps for claim pattern. */ export declare function checkCodeOnMain(targetPath: string, file: string, claimKeywords?: string[]): { exists: boolean; lastModified: string | null; reason: string; }; /** * Layer 2: Full deep novelty check with API calls. */ export declare function deepNoveltyCheck(targetPath: string, file: string, claim: string, repoUrl: string): DeepCheckResult;