first
This commit is contained in:
1
safekiso-server/node_modules/snyk/dist/cli/commands/test/format-test-error.d.ts
generated
vendored
Normal file
1
safekiso-server/node_modules/snyk/dist/cli/commands/test/format-test-error.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function formatTestError(error: any): any;
|
||||
5
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/index.d.ts
generated
vendored
Normal file
5
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { MethodArgs } from '../../../args';
|
||||
import { TestCommandResult } from '../../types';
|
||||
import { IaCTestFlags } from './local-execution/types';
|
||||
export default function (...args: MethodArgs): Promise<TestCommandResult>;
|
||||
export declare function getFlag(options: IaCTestFlags, flag: string): string | undefined;
|
||||
8
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/analytics.d.ts
generated
vendored
Normal file
8
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/analytics.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { FormattedResult, PerformanceAnalyticsKey, RulesOrigin } from './types';
|
||||
import { DescribeOptions, DriftAnalysis } from '../../../../../lib/iac/types';
|
||||
export declare function addIacAnalytics(formattedResults: FormattedResult[], opts: {
|
||||
ignoredIssuesCount: number;
|
||||
rulesOrigin: RulesOrigin;
|
||||
}): void;
|
||||
export declare const performanceAnalyticsObject: Record<PerformanceAnalyticsKey, number | null>;
|
||||
export declare function addIacDriftAnalytics(analysis: DriftAnalysis, options: DescribeOptions): void;
|
||||
45
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/assert-iac-options-flag.d.ts
generated
vendored
Normal file
45
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/assert-iac-options-flag.d.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
import { IacOrgSettings } from './types';
|
||||
import { Options, TestOptions } from '../../../../../lib/types';
|
||||
export declare class FlagError extends CustomError {
|
||||
constructor(key: string);
|
||||
}
|
||||
export declare class IntegratedFlagError extends CustomError {
|
||||
constructor(key: string, org: string);
|
||||
}
|
||||
export declare class FeatureFlagError extends CustomError {
|
||||
constructor(key: string, featureFlag: string, hasSnykPreview?: boolean);
|
||||
}
|
||||
export declare class FlagValueError extends CustomError {
|
||||
constructor(key: string, value: string, supportedValues: string);
|
||||
}
|
||||
export declare class UnsupportedEntitlementFlagError extends CustomError {
|
||||
constructor(key: string, entitlementName: string);
|
||||
}
|
||||
export declare class UnsupportedEntitlementCommandError extends CustomError {
|
||||
constructor(key: string, entitlementName: string);
|
||||
}
|
||||
/**
|
||||
* Validates the command line flags passed to the snyk iac test
|
||||
* command. The current argument parsing is very permissive and
|
||||
* allows unknown flags to be provided without validation.
|
||||
*
|
||||
* For snyk iac we need to explicitly validate the flags to avoid
|
||||
* misconfigurations and typos. For example, if the --experimental
|
||||
* flag were to be misspelled we would end up sending the client
|
||||
* data to our backend rather than running it locally as intended.
|
||||
* @param argv command line args passed to the process
|
||||
*/
|
||||
export declare function assertIaCOptionsFlags(argv: string[]): void;
|
||||
/**
|
||||
* Check that the flags used for the v1 flow do not contain any flag that are
|
||||
* only usable with the new IaC+ flow
|
||||
* @param settings organisation settings, used to get the org name
|
||||
* @param argv command line args
|
||||
*/
|
||||
export declare function assertIntegratedIaCOnlyOptions(settings: IacOrgSettings, argv: string[]): void;
|
||||
export declare function assertTerraformPlanModes(scanModeArgValue: string): void;
|
||||
export declare function isIacShareResultsOptions(options: Options & TestOptions): boolean | undefined;
|
||||
export declare class InvalidArgumentError extends CustomError {
|
||||
constructor(key: string);
|
||||
}
|
||||
22
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/directory-loader.d.ts
generated
vendored
Normal file
22
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/directory-loader.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Gets all nested directories for the path that we ran a scan.
|
||||
* @param pathToScan - the path to scan provided by the user
|
||||
* @param maxDepth? - An optional `maxDepth` argument can be provided to limit how deep in the file tree the search will go.
|
||||
* @returns {string[]} An array with all the non-empty nested directories in this path
|
||||
*/
|
||||
export declare function getAllDirectoriesForPath(pathToScan: string, maxDepth?: number): string[];
|
||||
/**
|
||||
* Gets all file paths for the specific directory
|
||||
* @param pathToScan - the path to scan provided by the user
|
||||
* @param currentDirectory - the directory which we want to return files for
|
||||
* @returns {string[]} An array with all the Terraform filePaths for this directory
|
||||
*/
|
||||
export declare function getFilesForDirectory(pathToScan: string, currentDirectory: string): string[];
|
||||
/**
|
||||
* Iterates through the makeFileAndDirectoryGenerator function and gets all the Terraform files in the specified directory
|
||||
* @param pathToScan - the pathToScan to scan provided by the user
|
||||
* @returns {Generator<string>} - a generator which holds all the filepaths
|
||||
*/
|
||||
export declare function getFilesForDirectoryGenerator(pathToScan: string): Generator<string>;
|
||||
export declare const shouldBeParsed: (pathToScan: string) => boolean;
|
||||
export declare const getFileType: (pathToScan: string) => string;
|
||||
1
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/error-utils.d.ts
generated
vendored
Normal file
1
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/error-utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function getErrorStringCode(code: number): string;
|
||||
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-loader.d.ts
generated
vendored
Normal file
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-loader.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { IacFileData } from './types';
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
export declare function loadContentForFiles(filePaths: string[]): Promise<IacFileData[]>;
|
||||
export declare function tryLoadFileData(pathToScan: string): Promise<IacFileData>;
|
||||
export declare class NoFilesToScanError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
export declare class FailedToLoadFileError extends CustomError {
|
||||
filename: string;
|
||||
constructor(filename: string);
|
||||
}
|
||||
9
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-parser.d.ts
generated
vendored
Normal file
9
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-parser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { IacFileData, IacFileParsed, IaCTestFlags, ParsingResults } from './types';
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
export declare function parseFiles(filesData: IacFileData[], options?: IaCTestFlags): Promise<ParsingResults>;
|
||||
export declare function parseNonTerraformFiles(filesData: IacFileData[], options: IaCTestFlags): ParsingResults;
|
||||
export declare function parseTerraformFiles(filesData: IacFileData[]): ParsingResults;
|
||||
export declare function tryParseIacFile(fileData: IacFileData, options?: IaCTestFlags): IacFileParsed[];
|
||||
export declare class UnsupportedFileTypeError extends CustomError {
|
||||
constructor(fileType: string);
|
||||
}
|
||||
18
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-scanner.d.ts
generated
vendored
Normal file
18
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-scanner.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { IacFileParsed, IacFileScanResult } from './types';
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
import { IacFileInDirectory } from '../../../../../lib/types';
|
||||
export declare function scanFiles(parsedFiles: Array<IacFileParsed>): Promise<{
|
||||
scannedFiles: IacFileScanResult[];
|
||||
failedScans: IacFileInDirectory[];
|
||||
}>;
|
||||
export declare function validateResultFromCustomRules(result: IacFileScanResult): {
|
||||
validatedResult: IacFileScanResult;
|
||||
invalidIssues: IacFileInDirectory[];
|
||||
};
|
||||
export declare function clearPolicyEngineCache(): void;
|
||||
export declare class FailedToBuildPolicyEngine extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
export declare class FailedToExecutePolicyEngine extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
12
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-utils.d.ts
generated
vendored
Normal file
12
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/file-utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/// <reference types="node" />
|
||||
export declare function createIacDir(): void;
|
||||
export declare function extractBundle(response: NodeJS.ReadableStream): Promise<void>;
|
||||
export declare function isValidBundle(wasmPath: string, dataPath: string): boolean;
|
||||
export declare function computeCustomRulesBundleChecksum(): string | undefined;
|
||||
/**
|
||||
* makeFileAndDirectoryGenerator is a generator function that helps walking the directory and file structure of this pathToScan
|
||||
* @param root
|
||||
* @param maxDepth? - An optional `maxDepth` argument can be provided to limit how deep in the file tree the search will go.
|
||||
* @returns {Generator<object>} - a generator which yields an object with directories or paths for the path to scan
|
||||
*/
|
||||
export declare function makeFileAndDirectoryGenerator(root?: string, maxDepth?: number): Generator<any, void, any>;
|
||||
10
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/index.d.ts
generated
vendored
Normal file
10
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { IacFileParsed, IacFileParseFailure, IacOrgSettings, IaCTestFlags, RulesOrigin, SafeAnalyticsOutput, TestReturnValue } from './types';
|
||||
import { ResultsProcessor } from './process-results';
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
import { Tag } from '../../../../../lib/types';
|
||||
export declare function test(resultsProcessor: ResultsProcessor, pathToScan: string, options: IaCTestFlags, iacOrgSettings: IacOrgSettings, rulesOrigin: RulesOrigin): Promise<TestReturnValue>;
|
||||
export declare function removeFileContent({ filePath, fileType, failureReason, projectType, }: IacFileParsed | IacFileParseFailure): SafeAnalyticsOutput;
|
||||
export declare function parseTags(options: IaCTestFlags): Tag[] | undefined;
|
||||
export declare class InvalidVarFilePath extends CustomError {
|
||||
constructor(path: string, message?: string);
|
||||
}
|
||||
25
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/local-cache.d.ts
generated
vendored
Normal file
25
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/local-cache.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import { EngineType } from './types';
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
export declare const LOCAL_POLICY_ENGINE_DIR: string;
|
||||
export declare const CUSTOM_POLICY_ENGINE_WASM_PATH: string;
|
||||
export declare function assertNever(value: never): never;
|
||||
export declare function getLocalCachePath(engineType: EngineType): string[];
|
||||
export declare function initLocalCache({ customRulesPath, }?: {
|
||||
customRulesPath?: string;
|
||||
}): Promise<void>;
|
||||
export declare function cleanLocalCache(): void;
|
||||
export declare class FailedToInitLocalCacheError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
export declare class FailedToDownloadRulesError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
export declare class FailedToExtractCustomRulesError extends CustomError {
|
||||
constructor(path: string, message?: string);
|
||||
}
|
||||
export declare class InvalidCustomRules extends CustomError {
|
||||
constructor(path: string, message?: string);
|
||||
}
|
||||
export declare class InvalidCustomRulesPath extends CustomError {
|
||||
constructor(path: string, message?: string);
|
||||
}
|
||||
21
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/measurable-methods.d.ts
generated
vendored
Normal file
21
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/measurable-methods.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { PerformanceAnalyticsKey } from './types';
|
||||
type Awaited<T> = T extends PromiseLike<infer U> ? U : T;
|
||||
export declare function asyncPerformanceAnalyticsDecorator<T extends (...args: any[]) => Promise<any>>(measurableMethod: T, analyticsKey: PerformanceAnalyticsKey): (...args: Parameters<T>) => Promise<Awaited<ReturnType<T>>>;
|
||||
export declare function performanceAnalyticsDecorator<T extends (...args: any[]) => any>(measurableMethod: T, analyticsKey: PerformanceAnalyticsKey): (...args: Parameters<T>) => ReturnType<T>;
|
||||
declare const measurableInitLocalCache: (args_0?: {
|
||||
customRulesPath?: string | undefined;
|
||||
} | undefined) => Promise<void>;
|
||||
declare const measurableParseFiles: (filesData: import("./types").IacFileData[], options?: import("./types").IaCTestFlags | undefined) => Promise<import("./types").ParsingResults>;
|
||||
declare const measurableloadContentForFiles: (filePaths: string[]) => Promise<import("./types").IacFileData[]>;
|
||||
declare const measurableScanFiles: (parsedFiles: import("./types").IacFileParsed[]) => Promise<{
|
||||
scannedFiles: import("./types").IacFileScanResult[];
|
||||
failedScans: import("../../../../../lib/types").IacFileInDirectory[];
|
||||
}>;
|
||||
declare const measurableGetIacOrgSettings: (publicOrgId?: string | undefined) => Promise<import("./types").IacOrgSettings>;
|
||||
declare const measurableApplyCustomSeverities: (scannedFiles: import("./types").IacFileScanResult[], customPolicies: import("./types").IacCustomPolicies) => Promise<import("./types").IacFileScanResult[]>;
|
||||
declare const measurableCleanLocalCache: () => void;
|
||||
declare const measurableFormatScanResults: (scanResults: import("./types").IacFileScanResult[], options: import("./types").IaCTestFlags, meta: import("./types").TestMeta, projectPublicIds: Record<string, string>, projectRoot: string, gitRemoteUrl?: string | undefined) => import("./types").FormattedResult[];
|
||||
declare const measurableTrackUsage: (formattedResults: import("./usage-tracking").TrackableResult[], org: string) => Promise<void>;
|
||||
declare const measurableLocalTest: (resultsProcessor: import("./process-results").ResultsProcessor, pathToScan: string, options: import("./types").IaCTestFlags, iacOrgSettings: import("./types").IacOrgSettings, rulesOrigin: import("./types").RulesOrigin) => Promise<import("./types").TestReturnValue>;
|
||||
declare const measurableOciPull: (registry: import("./rules/oci-registry").OciRegistry, repository: string, tag: string) => Promise<string>;
|
||||
export { measurableInitLocalCache as initLocalCache, measurableloadContentForFiles as loadContentForFiles, measurableParseFiles as parseFiles, measurableScanFiles as scanFiles, measurableGetIacOrgSettings as getIacOrgSettings, measurableApplyCustomSeverities as applyCustomSeverities, measurableFormatScanResults as formatScanResults, measurableTrackUsage as trackUsage, measurableCleanLocalCache as cleanLocalCache, measurableLocalTest as localTest, measurableOciPull as pull, };
|
||||
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/org-settings/apply-custom-severities.d.ts
generated
vendored
Normal file
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/org-settings/apply-custom-severities.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { IacCustomPolicies, IacFileScanResult } from '../types';
|
||||
export declare function applyCustomSeverities(scannedFiles: IacFileScanResult[], customPolicies: IacCustomPolicies): Promise<IacFileScanResult[]>;
|
||||
6
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/org-settings/get-iac-org-settings.d.ts
generated
vendored
Normal file
6
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/org-settings/get-iac-org-settings.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { IacOrgSettings } from '../types';
|
||||
import { CustomError } from '../../../../../../lib/errors';
|
||||
export declare function getIacOrgSettings(publicOrgId?: string): Promise<IacOrgSettings>;
|
||||
export declare class FailedToGetIacOrgSettingsError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
6
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/config-type-detection.d.ts
generated
vendored
Normal file
6
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/config-type-detection.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { IacFileData, IacFileParsed } from '../types';
|
||||
export declare const REQUIRED_K8S_FIELDS: string[];
|
||||
export declare const REQUIRED_CLOUDFORMATION_FIELDS: string[];
|
||||
export declare const REQUIRED_ARM_FIELDS: string[];
|
||||
export declare function detectConfigType(fileData: IacFileData, parsedIacFiles: any[]): IacFileParsed[];
|
||||
export declare function checkRequiredFieldsMatch(parsedDocument: any, requiredFields: string[]): boolean;
|
||||
10
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/hcl-to-json-v2/index.d.ts
generated
vendored
Normal file
10
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/hcl-to-json-v2/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
type FilePath = string;
|
||||
type FileContent = string;
|
||||
type MapOfFiles = Record<FilePath, FileContent>;
|
||||
type ParsedResults = {
|
||||
parsedFiles: MapOfFiles;
|
||||
failedFiles: MapOfFiles;
|
||||
debugLogs: MapOfFiles;
|
||||
};
|
||||
export default function hclToJsonV2(files: MapOfFiles): ParsedResults;
|
||||
export {};
|
||||
0
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/hcl-to-json-v2/parser.d.ts
generated
vendored
Normal file
0
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/hcl-to-json-v2/parser.d.ts
generated
vendored
Normal file
5
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/terraform-file-parser.d.ts
generated
vendored
Normal file
5
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/terraform-file-parser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { CustomError } from '../../../../../../lib/errors';
|
||||
export declare class FailedToParseTerraformFileError extends CustomError {
|
||||
filename: string;
|
||||
constructor(filename: string);
|
||||
}
|
||||
9
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/terraform-plan-parser.d.ts
generated
vendored
Normal file
9
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/parsers/terraform-plan-parser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { IacFileData, IacFileParsed, TerraformPlanJson } from '../types';
|
||||
import { CustomError } from '../../../../../../lib/errors';
|
||||
export declare function isTerraformPlan(terraformPlanJson: TerraformPlanJson): boolean;
|
||||
export declare function tryParsingTerraformPlan(terraformPlanFile: IacFileData, terraformPlanJson: TerraformPlanJson, { isFullScan }?: {
|
||||
isFullScan: boolean;
|
||||
}): Array<IacFileParsed>;
|
||||
export declare class FailedToExtractResourcesInTerraformPlanError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/cli-share-results.d.ts
generated
vendored
Normal file
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/cli-share-results.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { IacShareResultsFormat, IaCTestFlags, ShareResultsOutput } from '../types';
|
||||
import { Policy } from 'snyk-policy';
|
||||
import { IacOutputMeta, ProjectAttributes, Tag } from '../../../../../../lib/types';
|
||||
export declare function shareResults({ results, policy, tags, attributes, options, meta, }: {
|
||||
results: IacShareResultsFormat[];
|
||||
policy: Policy | undefined;
|
||||
tags?: Tag[];
|
||||
attributes?: ProjectAttributes;
|
||||
options: IaCTestFlags;
|
||||
meta: IacOutputMeta;
|
||||
}): Promise<ShareResultsOutput>;
|
||||
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/extract-line-number.d.ts
generated
vendored
Normal file
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/extract-line-number.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { CloudConfigFileTypes, MapsDocIdToTree } from '@snyk/cloud-config-parser';
|
||||
export declare function getFileTypeForParser(fileType: string): CloudConfigFileTypes;
|
||||
export declare function extractLineNumber(cloudConfigPath: string[], fileType: CloudConfigFileTypes, treeByDocId: MapsDocIdToTree): number;
|
||||
21
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/index.d.ts
generated
vendored
Normal file
21
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { Policy } from 'snyk-policy';
|
||||
import { IacOutputMeta, ProjectAttributes, Tag } from '../../../../../../lib/types';
|
||||
import { FormattedResult, IacFileScanResult, IacOrgSettings, IaCTestFlags } from '../types';
|
||||
export interface ResultsProcessor {
|
||||
processResults(resultsWithCustomSeverities: IacFileScanResult[], policy: Policy | undefined, tags: Tag[] | undefined, attributes: ProjectAttributes | undefined): Promise<{
|
||||
filteredIssues: FormattedResult[];
|
||||
ignoreCount: number;
|
||||
}>;
|
||||
}
|
||||
export declare class SingleGroupResultsProcessor implements ResultsProcessor {
|
||||
private projectRoot;
|
||||
private orgPublicId;
|
||||
private iacOrgSettings;
|
||||
private options;
|
||||
private meta;
|
||||
constructor(projectRoot: string, orgPublicId: string, iacOrgSettings: IacOrgSettings, options: IaCTestFlags, meta: IacOutputMeta);
|
||||
processResults(resultsWithCustomSeverities: IacFileScanResult[], policy: Policy | undefined, tags: Tag[] | undefined, attributes: ProjectAttributes | undefined): Promise<{
|
||||
filteredIssues: FormattedResult[];
|
||||
ignoreCount: number;
|
||||
}>;
|
||||
}
|
||||
6
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/policy.d.ts
generated
vendored
Normal file
6
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/policy.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { FormattedResult } from '../types';
|
||||
import { Policy } from 'snyk-policy';
|
||||
export declare function filterIgnoredIssues(policy: Policy | undefined, results: FormattedResult[]): {
|
||||
filteredIssues: FormattedResult[];
|
||||
ignoreCount: number;
|
||||
};
|
||||
7
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/process-results.d.ts
generated
vendored
Normal file
7
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/process-results.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Policy } from 'snyk-policy';
|
||||
import { IacOutputMeta, ProjectAttributes, Tag } from '../../../../../../lib/types';
|
||||
import { FormattedResult, IacFileScanResult, IacOrgSettings, IaCTestFlags } from '../types';
|
||||
export declare function processResults(resultsWithCustomSeverities: IacFileScanResult[], orgPublicId: string, iacOrgSettings: IacOrgSettings, policy: Policy | undefined, tags: Tag[] | undefined, attributes: ProjectAttributes | undefined, options: IaCTestFlags, projectRoot: string, meta: IacOutputMeta): Promise<{
|
||||
filteredIssues: FormattedResult[];
|
||||
ignoreCount: number;
|
||||
}>;
|
||||
8
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/results-formatter.d.ts
generated
vendored
Normal file
8
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/results-formatter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { FormattedResult, IacFileScanResult, IaCTestFlags, PolicyMetadata, TestMeta } from '../types';
|
||||
import { SEVERITY } from '../../../../../../lib/snyk-test/common';
|
||||
import { CustomError } from '../../../../../../lib/errors';
|
||||
export declare function formatScanResults(scanResults: IacFileScanResult[], options: IaCTestFlags, meta: TestMeta, projectPublicIds: Record<string, string>, projectRoot: string, gitRemoteUrl?: string): FormattedResult[];
|
||||
export declare function filterPoliciesBySeverity(violatedPolicies: PolicyMetadata[], severityThreshold?: SEVERITY): PolicyMetadata[];
|
||||
export declare class FailedToFormatResults extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/share-results-formatter.d.ts
generated
vendored
Normal file
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/share-results-formatter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { IacFileScanResult, IacShareResultsFormat } from '../types';
|
||||
import { IacOutputMeta } from '../../../../../../lib/types';
|
||||
export declare function formatShareResults(projectRoot: string, scanResults: IacFileScanResult[], meta: IacOutputMeta): IacShareResultsFormat[];
|
||||
13
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/share-results.d.ts
generated
vendored
Normal file
13
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/process-results/share-results.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Policy } from 'snyk-policy';
|
||||
import { IacOutputMeta, ProjectAttributes, Tag } from '../../../../../../lib/types';
|
||||
import { IacFileScanResult, IaCTestFlags, ShareResultsOutput } from '../types';
|
||||
export declare function formatAndShareResults({ results, options, orgPublicId, policy, tags, attributes, projectRoot, meta, }: {
|
||||
results: IacFileScanResult[];
|
||||
options: IaCTestFlags;
|
||||
orgPublicId: string;
|
||||
policy: Policy | undefined;
|
||||
tags?: Tag[];
|
||||
attributes?: ProjectAttributes;
|
||||
projectRoot: string;
|
||||
meta: IacOutputMeta;
|
||||
}): Promise<ShareResultsOutput>;
|
||||
29
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/rules/oci-pull.d.ts
generated
vendored
Normal file
29
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/rules/oci-pull.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { OCIRegistryURLComponents } from '../types';
|
||||
import { CustomError } from '../../../../../../lib/errors';
|
||||
import { OciRegistry } from './oci-registry';
|
||||
export declare const CUSTOM_RULES_TARBALL = "custom-bundle.tar.gz";
|
||||
export declare function extractOCIRegistryURLComponents(OCIRegistryURL: string): OCIRegistryURLComponents;
|
||||
/**
|
||||
* Downloads an OCI Artifact from a remote OCI Registry and writes it to the
|
||||
* disk. The artifact here is a custom rules bundle stored in a remote registry.
|
||||
* In order to do that, it calls an external docker registry v2 client to get
|
||||
* the manifests, the layers and then builds the artifact. Example:
|
||||
* https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest
|
||||
*
|
||||
* @param registry The client for accessing an OCI registry.
|
||||
* @param repository The name of an OCI repository.
|
||||
* @param tag The tag of an image in an OCI repository.
|
||||
**/
|
||||
export declare function pull(registry: OciRegistry, repository: string, tag: string): Promise<string>;
|
||||
export declare class FailedToBuildOCIArtifactError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
export declare class InvalidManifestSchemaVersionError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
export declare class InvalidRemoteRegistryURLError extends CustomError {
|
||||
constructor(url?: string);
|
||||
}
|
||||
export declare class UnsupportedEntitlementPullError extends CustomError {
|
||||
constructor(entitlement: string);
|
||||
}
|
||||
24
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/rules/oci-registry.d.ts
generated
vendored
Normal file
24
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/rules/oci-registry.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/// <reference types="node" />
|
||||
export type GetManifestResponse = {
|
||||
schemaVersion: number;
|
||||
layers: Layer[];
|
||||
};
|
||||
export type Layer = {
|
||||
digest: string;
|
||||
};
|
||||
export type GetLayerResponse = {
|
||||
blob: Buffer;
|
||||
};
|
||||
export interface OciRegistry {
|
||||
getManifest(repository: string, tag: string): Promise<GetManifestResponse>;
|
||||
getLayer(repository: string, digest: string): Promise<GetLayerResponse>;
|
||||
}
|
||||
export declare class RemoteOciRegistry implements OciRegistry {
|
||||
private registry;
|
||||
private username?;
|
||||
private password?;
|
||||
private static options;
|
||||
constructor(registry: string, username?: string | undefined, password?: string | undefined);
|
||||
getManifest(repository: string, tag: string): Promise<GetManifestResponse>;
|
||||
getLayer(repository: string, digest: string): Promise<GetLayerResponse>;
|
||||
}
|
||||
15
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/rules/rules.d.ts
generated
vendored
Normal file
15
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/rules/rules.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { IacOrgSettings, IaCTestFlags, RulesOrigin } from '../types';
|
||||
import { CustomError } from '../../../../../../lib/errors';
|
||||
import { OciRegistry } from './oci-registry';
|
||||
export declare function initRules(buildOciRegistry: () => OciRegistry, iacOrgSettings: IacOrgSettings, options: IaCTestFlags, orgPublicId: string): Promise<RulesOrigin>;
|
||||
export declare function buildDefaultOciRegistry(settings: IacOrgSettings): OciRegistry;
|
||||
/**
|
||||
* Pull and store the IaC custom-rules bundle from the remote OCI Registry.
|
||||
*/
|
||||
export declare function pullIaCCustomRules(buildOciRegistry: () => OciRegistry, iacOrgSettings: IacOrgSettings): Promise<string>;
|
||||
export declare class FailedToPullCustomBundleError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
export declare class FailedToExecuteCustomRulesError extends CustomError {
|
||||
constructor(message?: string);
|
||||
}
|
||||
292
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/types.d.ts
generated
vendored
Normal file
292
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,292 @@
|
||||
import { IacFileTypes, IacProjectType, IacProjectTypes } from '../../../../../lib/iac/constants';
|
||||
import { SEVERITY } from '../../../../../lib/snyk-test/common';
|
||||
import { AnnotatedIssue, IgnoreSettings, TestResult } from '../../../../../lib/snyk-test/legacy';
|
||||
import { IacFileInDirectory, Options, TestOptions, PolicyOptions } from '../../../../../lib/types';
|
||||
export interface IacFileData extends IacFileInDirectory {
|
||||
fileContent: string;
|
||||
}
|
||||
export declare const VALID_FILE_TYPES: string[];
|
||||
export declare const VALID_TERRAFORM_FILE_TYPES: string[];
|
||||
export interface IacFileParsed extends IacFileData {
|
||||
jsonContent: Record<string, unknown> | TerraformScanInput;
|
||||
projectType: IacProjectType;
|
||||
engineType: EngineType;
|
||||
docId?: number;
|
||||
}
|
||||
export interface IacFileParseFailure extends IacFileData {
|
||||
jsonContent: null;
|
||||
engineType: null;
|
||||
failureReason: string;
|
||||
err: Error;
|
||||
}
|
||||
export type ParsingResults = {
|
||||
parsedFiles: Array<IacFileParsed>;
|
||||
failedFiles: Array<IacFileParseFailure>;
|
||||
};
|
||||
export interface IacFileScanResult extends IacFileParsed {
|
||||
violatedPolicies: PolicyMetadata[];
|
||||
}
|
||||
export interface IacShareResultsFormat {
|
||||
projectName: string;
|
||||
targetFile: string;
|
||||
filePath: string;
|
||||
fileType: IacFileTypes;
|
||||
projectType: IacProjectType;
|
||||
violatedPolicies: PolicyMetadata[];
|
||||
}
|
||||
export interface FormattedTestMeta {
|
||||
isPrivate: boolean;
|
||||
isLicensesEnabled: boolean;
|
||||
org: string;
|
||||
orgPublicId: string;
|
||||
ignoreSettings?: IgnoreSettings | null;
|
||||
projectId?: string;
|
||||
policy?: string;
|
||||
gitRemoteUrl?: string;
|
||||
}
|
||||
export type FormattedResult = {
|
||||
result: {
|
||||
cloudConfigResults: Array<PolicyMetadata>;
|
||||
projectType: IacProjectTypes;
|
||||
};
|
||||
meta: FormattedTestMeta;
|
||||
filesystemPolicy: boolean;
|
||||
vulnerabilities: AnnotatedIssue[];
|
||||
dependencyCount: number;
|
||||
licensesPolicy: object | null;
|
||||
ignoreSettings: IgnoreSettings | null;
|
||||
targetFile: string;
|
||||
projectName: string;
|
||||
org: string;
|
||||
policy: string;
|
||||
isPrivate: boolean;
|
||||
targetFilePath: string;
|
||||
packageManager: IacProjectType;
|
||||
};
|
||||
export type IacCustomPolicies = Record<string, {
|
||||
severity?: string;
|
||||
}>;
|
||||
export declare enum RulesOrigin {
|
||||
Local = "local",
|
||||
Remote = "remote",
|
||||
Internal = "internal"
|
||||
}
|
||||
export interface IacCustomRules {
|
||||
isEnabled?: boolean;
|
||||
ociRegistryURL?: string;
|
||||
ociRegistryTag?: string;
|
||||
}
|
||||
export interface IacEntitlements {
|
||||
infrastructureAsCode?: boolean;
|
||||
iacDrift?: boolean;
|
||||
iacCustomRulesEntitlement?: boolean;
|
||||
}
|
||||
export interface IacOrgSettings {
|
||||
meta: TestMeta;
|
||||
customPolicies: IacCustomPolicies;
|
||||
customRules?: IacCustomRules;
|
||||
entitlements?: IacEntitlements;
|
||||
}
|
||||
export interface TestMeta {
|
||||
org: string;
|
||||
orgPublicId: string;
|
||||
ignoreSettings?: IgnoreSettings | null;
|
||||
projectId?: string;
|
||||
gitRemoteUrl?: string;
|
||||
}
|
||||
export interface OpaWasmInstance {
|
||||
evaluate: (data: Record<string, any>) => {
|
||||
results: PolicyMetadata[];
|
||||
};
|
||||
setData: (data: Record<string, any>) => void;
|
||||
}
|
||||
export type SafeAnalyticsOutput = Omit<IacFileParsed | IacFileParseFailure, 'fileContent' | 'jsonContent' | 'engineType'>;
|
||||
export declare enum EngineType {
|
||||
Kubernetes = 0,
|
||||
Terraform = 1,
|
||||
CloudFormation = 2,
|
||||
ARM = 3,
|
||||
Custom = 4
|
||||
}
|
||||
export interface PolicyMetadata {
|
||||
id?: string;
|
||||
publicId: string;
|
||||
type?: string;
|
||||
subType: string;
|
||||
title: string;
|
||||
documentation?: string;
|
||||
isGeneratedByCustomRule?: boolean;
|
||||
description?: string;
|
||||
severity: SEVERITY | 'none';
|
||||
msg: string;
|
||||
issue: string;
|
||||
impact: string;
|
||||
resolve: string;
|
||||
references: string[];
|
||||
remediation?: Partial<Record<'terraform' | 'cloudformation' | 'arm' | 'kubernetes', string>>;
|
||||
docId?: number;
|
||||
}
|
||||
export type IaCTestFlags = Pick<Options & TestOptions & PolicyOptions, 'org' | 'insecure' | 'debug' | 'experimental' | 'detectionDepth' | 'severityThreshold' | 'json' | 'sarif' | 'report' | 'target-reference' | 'var-file' | 'ignore-policy' | 'policy-path' | 'tags' | 'remote-repo-url' | 'target-name'> & {
|
||||
'json-file-output'?: string;
|
||||
'sarif-file-output'?: string;
|
||||
v?: boolean;
|
||||
version?: boolean;
|
||||
h?: boolean;
|
||||
help?: 'help';
|
||||
q?: boolean;
|
||||
quiet?: boolean;
|
||||
path?: string;
|
||||
rules?: string;
|
||||
'custom-rules'?: boolean;
|
||||
'snyk-cloud-environment'?: string;
|
||||
'project-tags'?: string;
|
||||
'project-environment'?: string;
|
||||
'project-lifecycle'?: string;
|
||||
'project-business-criticality'?: string;
|
||||
'iac-test-output-file'?: string;
|
||||
} & TerraformPlanFlags;
|
||||
interface TerraformPlanFlags {
|
||||
scan?: TerraformPlanScanMode;
|
||||
}
|
||||
export declare enum TerraformPlanScanMode {
|
||||
DeltaScan = "resource-changes",
|
||||
FullScan = "planned-values"
|
||||
}
|
||||
export interface TerraformPlanResource {
|
||||
address: string;
|
||||
mode: string;
|
||||
type: string;
|
||||
name: string;
|
||||
values: Record<string, unknown>;
|
||||
index: number | string;
|
||||
}
|
||||
export interface TerraformPlanResourceChange extends Omit<TerraformPlanResource, 'values'> {
|
||||
change: {
|
||||
actions: ResourceActions;
|
||||
before: Record<string, unknown> | null;
|
||||
after: Record<string, unknown> | null;
|
||||
};
|
||||
}
|
||||
export interface TerraformPlanJson {
|
||||
resource_changes: Array<TerraformPlanResourceChange>;
|
||||
configuration: {
|
||||
root_module: {
|
||||
resources: Array<TerraformPlanReferencedResource>;
|
||||
};
|
||||
};
|
||||
}
|
||||
export interface TerraformPlanReferencedResource extends TerraformPlanResource {
|
||||
expressions?: Record<string, TerraformPlanExpression>;
|
||||
}
|
||||
export interface TerraformPlanExpression {
|
||||
references: Array<string>;
|
||||
}
|
||||
export interface TerraformScanInput {
|
||||
resource: Record<string, Record<string, unknown>>;
|
||||
data: Record<string, Record<string, unknown>>;
|
||||
}
|
||||
export type ResourceActions = ['no-op'] | ['create'] | ['read'] | ['update'] | ['delete', 'create'] | ['create', 'delete'] | ['delete'];
|
||||
export declare const VALID_RESOURCE_ACTIONS_FOR_DELTA_SCAN: ResourceActions[];
|
||||
export declare const VALID_RESOURCE_ACTIONS_FOR_FULL_SCAN: ResourceActions[];
|
||||
export declare enum IaCErrorCodes {
|
||||
FailedToInitLocalCacheError = 1000,
|
||||
FailedToCleanLocalCacheError = 1001,
|
||||
FailedToDownloadRulesError = 1002,
|
||||
FailedToExtractCustomRulesError = 1003,
|
||||
InvalidCustomRules = 1004,
|
||||
InvalidCustomRulesPath = 1005,
|
||||
InvalidVarFilePath = 1006,
|
||||
NoFilesToScanError = 1010,
|
||||
FailedToLoadFileError = 1011,
|
||||
CurrentWorkingDirectoryTraversalError = 1012,
|
||||
UnsupportedFileTypeError = 1020,
|
||||
InvalidJsonFileError = 1021,
|
||||
InvalidYamlFileError = 1022,
|
||||
FailedToDetectJsonConfigError = 1023,
|
||||
FailedToDetectYamlConfigError = 1024,
|
||||
MissingRequiredFieldsInKubernetesYamlError = 1031,
|
||||
FailedToParseHelmError = 1032,
|
||||
FailedToParseTerraformFileError = 1040,
|
||||
FailedToExtractResourcesInTerraformPlanError = 1052,
|
||||
FailedToBuildPolicyEngine = 1060,
|
||||
FailedToExecutePolicyEngine = 1061,
|
||||
FailedToFormatResults = 1070,
|
||||
FailedToExtractLineNumberError = 1071,
|
||||
FailedToGetIacOrgSettingsError = 1080,
|
||||
FlagError = 1090,
|
||||
FlagValueError = 1091,
|
||||
UnsupportedEntitlementFlagError = 1092,
|
||||
FeatureFlagError = 1093,
|
||||
InvalidArgumentError = 1094,
|
||||
FailedToExecuteCustomRulesError = 1100,
|
||||
FailedToPullCustomBundleError = 1101,
|
||||
FailedToBuildOCIArtifactError = 1102,
|
||||
InvalidRemoteRegistryURLError = 1103,
|
||||
InvalidManifestSchemaVersionError = 1104,
|
||||
UnsupportedFeatureFlagPullError = 1105,
|
||||
UnsupportedEntitlementPullError = 1106,
|
||||
InvalidServiceError = 1110,
|
||||
InvalidUserRulesBundlePathError = 1130,
|
||||
InvalidUserPolicyEnginePathError = 1140,
|
||||
FailedToDownloadPolicyEngineError = 1141,
|
||||
FailedToCachePolicyEngineError = 1142,
|
||||
PolicyEngineScanError = 1150,
|
||||
NoPaths = 2000,
|
||||
CwdTraversal = 2003,
|
||||
NoBundle = 2004,
|
||||
OpenBundle = 2005,
|
||||
InvalidSeverityThreshold = 2006,
|
||||
Scan = 2100,
|
||||
UnableToRecognizeInputType = 2101,
|
||||
UnsupportedInputType = 2102,
|
||||
UnableToResolveLocation = 2103,
|
||||
UnrecognizedFileExtension = 2104,
|
||||
FailedToParseInput = 2105,
|
||||
InvalidInput = 2106,
|
||||
UnableToReadFile = 2107,
|
||||
UnableToReadDir = 2108,
|
||||
UnableToReadStdin = 2109,
|
||||
FailedToLoadRegoAPI = 2110,
|
||||
FailedToLoadRules = 2111,
|
||||
FailedToCompile = 2112,
|
||||
UnableToReadPath = 2113,
|
||||
NoLoadableInput = 2114,
|
||||
FailedToMakeResourcesResolvers = 2115,
|
||||
ResourcesResolverError = 2116,
|
||||
FailedToProcessResults = 2200,
|
||||
EntitlementNotEnabled = 2201,
|
||||
ReadSettings = 2202,
|
||||
SubmoduleLoadingError = 3000,
|
||||
MissingRemoteSubmodulesError = 3001,
|
||||
EvaluationError = 3002,
|
||||
MissingTermError = 3003
|
||||
}
|
||||
export interface TestReturnValue {
|
||||
results: TestResult | TestResult[];
|
||||
failures?: IacFileInDirectory[];
|
||||
ignoreCount: number;
|
||||
}
|
||||
export interface OCIRegistryURLComponents {
|
||||
registryBase: string;
|
||||
repo: string;
|
||||
tag: string;
|
||||
}
|
||||
export declare enum PerformanceAnalyticsKey {
|
||||
InitLocalCache = "cache-init-ms",
|
||||
FileLoading = "file-loading-ms",
|
||||
FileParsing = "file-parsing-ms",
|
||||
FileScanning = "file-scanning-ms",
|
||||
OrgSettings = "org-settings-ms",
|
||||
CustomSeverities = "custom-severities-ms",
|
||||
ResultFormatting = "results-formatting-ms",
|
||||
UsageTracking = "usage-tracking-ms",
|
||||
CacheCleanup = "cache-cleanup-ms",
|
||||
Total = "total-iac-ms"
|
||||
}
|
||||
export interface ShareResultsOutput {
|
||||
projectPublicIds: {
|
||||
[targetFile: string]: string;
|
||||
};
|
||||
gitRemoteUrl?: string;
|
||||
}
|
||||
export {};
|
||||
4
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/url-utils.d.ts
generated
vendored
Normal file
4
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/url-utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Checks if the provided URL string is valid.
|
||||
*/
|
||||
export declare function isValidUrl(urlStr: string): boolean;
|
||||
13
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/usage-tracking.d.ts
generated
vendored
Normal file
13
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/usage-tracking.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
export declare function trackUsage(formattedResults: TrackableResult[], org: string): Promise<void>;
|
||||
export declare class TestLimitReachedError extends CustomError {
|
||||
constructor();
|
||||
}
|
||||
export interface TrackableResult {
|
||||
meta: {
|
||||
isPrivate: boolean;
|
||||
};
|
||||
result: {
|
||||
cloudConfigResults: any[];
|
||||
};
|
||||
}
|
||||
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/yaml-parser.d.ts
generated
vendored
Normal file
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/local-execution/yaml-parser.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { CustomError } from '../../../../../lib/errors';
|
||||
import { IacFileData } from './types';
|
||||
export declare function parseYAMLOrJSONFileData(fileData: IacFileData): any[];
|
||||
export declare class InvalidJsonFileError extends CustomError {
|
||||
filename: string;
|
||||
constructor(filename: string);
|
||||
}
|
||||
export declare class InvalidYamlFileError extends CustomError {
|
||||
filename: string;
|
||||
constructor(filename: string);
|
||||
}
|
||||
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/meta.d.ts
generated
vendored
Normal file
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/meta.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { IacOutputMeta } from '../../../../lib/types';
|
||||
import { IacOrgSettings } from './local-execution/types';
|
||||
export interface GitRepository {
|
||||
readonly path: string;
|
||||
readRemoteUrl(): Promise<string | undefined>;
|
||||
}
|
||||
export interface GitRepositoryFinder {
|
||||
findRepositoryForPath(path: string): Promise<GitRepository | undefined>;
|
||||
}
|
||||
export declare function buildMeta(repositoryFinder: GitRepositoryFinder, orgSettings: IacOrgSettings, projectRoot: string, remoteRepoUrl?: string, targetName?: string): Promise<IacOutputMeta>;
|
||||
export declare function getProjectNameFromGitUrl(url: string): string;
|
||||
35
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/output.d.ts
generated
vendored
Normal file
35
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/output.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import { TestCommandResult } from '../../types';
|
||||
import * as ora from 'ora';
|
||||
import { IacFileInDirectory, IacOutputMeta, Options, TestOptions } from '../../../../lib/types';
|
||||
import { IaCTestFlags } from './local-execution/types';
|
||||
export declare function buildSpinner(options: IaCTestFlags): ora.Ora | undefined;
|
||||
export declare function printHeader(options: IaCTestFlags): void;
|
||||
export declare function buildOutput({ results, options, isIacShareCliResultsCustomRulesSupported, isIacCustomRulesEntitlementEnabled, iacOutputMeta, iacScanFailures, iacIgnoredIssuesCount, testSpinner, }: {
|
||||
results: any[];
|
||||
options: Options & TestOptions;
|
||||
isIacShareCliResultsCustomRulesSupported: boolean;
|
||||
isIacCustomRulesEntitlementEnabled: boolean;
|
||||
iacOutputMeta: IacOutputMeta;
|
||||
iacScanFailures: IacFileInDirectory[];
|
||||
iacIgnoredIssuesCount: number;
|
||||
testSpinner?: ora.Ora;
|
||||
}): TestCommandResult;
|
||||
export declare function buildShareResultsSummary({ orgName, projectName, options, isIacCustomRulesEntitlementEnabled, isIacShareCliResultsCustomRulesSupported, }: {
|
||||
orgName: string;
|
||||
projectName: string;
|
||||
options: IaCTestFlags;
|
||||
isIacCustomRulesEntitlementEnabled: boolean;
|
||||
isIacShareCliResultsCustomRulesSupported: boolean;
|
||||
}): string;
|
||||
export declare function buildShareResultsSummaryIacPlus({ orgName, projectName, options, isIacCustomRulesEntitlementEnabled, isIacShareCliResultsCustomRulesSupported, }: {
|
||||
orgName: string;
|
||||
projectName: string;
|
||||
options: IaCTestFlags;
|
||||
isIacCustomRulesEntitlementEnabled: boolean;
|
||||
isIacShareCliResultsCustomRulesSupported: boolean;
|
||||
}): string;
|
||||
export declare function buildShareResultsSummaryIacV2({ orgName, projectPublicId, }: {
|
||||
orgName: string;
|
||||
projectPublicId: string | undefined;
|
||||
}): string;
|
||||
export declare function shouldPrintShareResultsTip(options: IaCTestFlags): boolean;
|
||||
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/scan.d.ts
generated
vendored
Normal file
11
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/scan.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { IacFileInDirectory, IacOutputMeta, Options, TestOptions } from '../../../../lib/types';
|
||||
import * as ora from 'ora';
|
||||
import { IacOrgSettings } from './local-execution/types';
|
||||
import { OciRegistry } from './local-execution/rules/oci-registry';
|
||||
export declare function scan(iacOrgSettings: IacOrgSettings, options: any, testSpinner: ora.Ora | undefined, paths: string[], orgPublicId: string, buildOciRules: () => OciRegistry, projectRoot: string, remoteRepoUrl?: string, targetName?: string): Promise<{
|
||||
iacOutputMeta: IacOutputMeta;
|
||||
iacScanFailures: IacFileInDirectory[];
|
||||
iacIgnoredIssuesCount: number;
|
||||
results: any[];
|
||||
resultOptions: (Options & TestOptions)[];
|
||||
}>;
|
||||
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/v2/assert-iac-options.d.ts
generated
vendored
Normal file
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/v2/assert-iac-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { IaCTestFlags } from '../local-execution/types';
|
||||
export declare function assertIacV2Options(options: IaCTestFlags): void;
|
||||
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/v2/index.d.ts
generated
vendored
Normal file
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/iac/v2/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { TestCommandResult } from '../../../types';
|
||||
import { IaCTestFlags } from '../local-execution/types';
|
||||
export declare function test(paths: string[], options: IaCTestFlags, iacNewEngine?: boolean): Promise<TestCommandResult>;
|
||||
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/index.d.ts
generated
vendored
Normal file
3
safekiso-server/node_modules/snyk/dist/cli/commands/test/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { MethodArgs } from '../../args';
|
||||
import { TestCommandResult } from '../../commands/types';
|
||||
export default function test(...args: MethodArgs): Promise<TestCommandResult>;
|
||||
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/set-default-test-options.d.ts
generated
vendored
Normal file
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/set-default-test-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { Options, TestOptions } from '../../../lib/types';
|
||||
export declare function setDefaultTestOptions<CommandOptions>(options: Options & CommandOptions): Options & TestOptions & CommandOptions;
|
||||
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/utils.d.ts
generated
vendored
Normal file
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { TestResult } from '../../../lib/snyk-test/legacy';
|
||||
export declare function getPathWithOptionalProjectName(currPath: string, testResult: Pick<TestResult, 'projectName'>): string;
|
||||
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/validate-credentials.d.ts
generated
vendored
Normal file
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/validate-credentials.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { TestOptions, Options } from '../../../lib/types';
|
||||
export declare function validateCredentials(options: Options & TestOptions): void;
|
||||
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/validate-test-options.d.ts
generated
vendored
Normal file
2
safekiso-server/node_modules/snyk/dist/cli/commands/test/validate-test-options.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import { TestOptions, Options } from '../../../lib/types';
|
||||
export declare function validateTestOptions(options: TestOptions & Options): void;
|
||||
Reference in New Issue
Block a user