UNPKG

pastoralist

Version:

A tool to watch over node module resolutions and overrides

56 lines (55 loc) 1.79 kB
import { execFile } from "child_process"; import { DependabotAlert, SecurityAlert, SecurityCheckOptions } from "../../../types"; declare const defaultExecFileAsync: typeof execFile.__promisify__; export declare class GitHubSecurityProvider { readonly providerType: "github"; private owner; private repo; private token?; private log; protected execFileAsync: typeof defaultExecFileAsync; constructor(options: SecurityCheckOptions & { debug?: boolean; }); initialize(): Promise<void>; private getRepoOwner; private getRepoName; private isGitHubUrl; fetchAlerts(packages?: Array<{ name: string; version: string; }>, _options?: { root?: string; }): Promise<SecurityAlert[]>; fetchDependabotAlerts(): Promise<DependabotAlert[]>; private isMockMode; private fetchRealAlerts; private fetchMockAlerts; private shouldForceVulnerable; private getMockVulnerableAlerts; private loadMockFile; private getDefaultMockAlerts; private isGhCliAvailable; private executeGhCli; private fetchAlertsWithGhCli; private retryGhCliFetch; private handleGhCliRetryFailure; private parseGhCliAlerts; private handleGhCliFetchError; private isPermissionError; private fetchFromGitHubAPI; private requestDependabotAlerts; private readDependabotResponse; private throwDependabotResponseError; private fetchAlertsWithApi; convertToSecurityAlerts(dependabotAlerts: DependabotAlert[], packages?: Array<{ name: string; version: string; }>): SecurityAlert[]; private shouldIncludeAlert; private convertDependabotAlert; private isNpmAlert; private extractCurrentVersion; private normalizeSeverity; } export {};