/* * © 2024 Snyk Limited * * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an 'AS IS' BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BadNPMVersionError = exports.UnableToReplaceBrokerURLError = exports.CouldNotFindBrokerURLError = exports.CouldNotParseNPMRegistryURLError = exports.NoRepoFoundForTheNPMPackageError = exports.CannotReachConfiguredRepositoryError = exports.TimeoutWhenProcessingTheDepTreeError = exports.SourceNotSupportedError = exports.NoReleasedVersionForVersionsRangeError = exports.CannotCreateGitHostError = exports.CannotGetBuildFileFromRepoError = exports.CannotResolveTargetPomFromRepoError = exports.CannotResolveTargetPomFromXmlError = exports.MissingProjectFromPomError = exports.PomFileNotFoundError = exports.SkippedGroupError = exports.InvalidCoordinatesError = exports.UnableToParseXMLError = exports.CyclicPropertyDetectedInPomFileError = exports.UnableToResolveVersionForPropertyError = exports.UnableToResolveValueForPropertyError = exports.MissingRequirementFromPomError = exports.ToolchainNotAvailableError = exports.UnableToUseCredentialsError = exports.UnableToAccessPrivateDepsError = exports.UnsupportedExternalFileGenerationSCMError = exports.InconsistentVendoringError = exports.IncompleteProjectError = exports.SsoReAuthRequiredError = exports.GoModFileMissingError = exports.PrivateModuleError = exports.ProjectSkippedAndNotFoundError = exports.OutdatedSDKVersionRequestedError = exports.NoTargetFrameworksFoundError = exports.MissingMSBuildConditionError = exports.FailedToAccessPrivatePackageSourceError = exports.PublishFailedError = exports.MissingStaticMainFunctionError = exports.UnsupportedTargetFrameworkError = exports.UnsupportedManifestFileError = exports.GitCloneFailedError = exports.BrokeredConnectionNotSupportedError = exports.MissingEnvironmentVariableError = exports.CannotGetFileFromSourceError = exports.UnprocessableFileError = exports.MissingPayloadError = exports.MissingHeaderError = exports.UnknownDependencyVersionError = exports.UnparseableLockFileError = exports.UnparseableManifestError = void 0; exports.PythonDependenciesSpaceLimitExceededError = exports.PipenvNoMatchingPythonDistributionError = exports.PipenvUnsupportedPythonVersionError = exports.InstallationFailureError = exports.PipNoMatchingPythonDistributionError = exports.PythonVersionConfictError = exports.PipUnsupportedPythonVersionError = exports.SyntaxIssuesError = exports.PythonPackageNotFoundError = exports.FailedToApplyDependencyUpdatesError = exports.TooManyManifestFilesError = exports.UnsupportedRequirementsFileError = exports.PermissionDeniedError = exports.OutdatedYarnLockFileError = exports.UnableToReachRegistryError = exports.YarnPackageNotFoundError = exports.PnpmUnsupportedLockfileVersionError = exports.PnpmOutOfSyncError = exports.InvalidConfigurationError = exports.MissingSupportedFileError = exports.Base64DecodeError = exports.Base64EncodeError = exports.CouldNotParseJSONFileError = exports.NoDependencyUpdatesError = exports.NoValidPackageUpgradesError = exports.ChildProcessExecutionError = exports.NoResultsFromForkerProcessesError = exports.UnknownBlobEncodingOnGithubError = void 0; const types_1 = require("../types"); const problem_error_1 = require("../problem-error"); /** * @class * @name UnparseableManifestError * @description The provided manifest file could not be parsed as it has invalid syntax or does not match the expected schema. Review the manifest file, then try again. * @summary Unable to parse manifest file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnparseableManifestError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to parse manifest file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0001', status: 400, description: `The provided manifest file could not be parsed as it has invalid syntax or does not match the expected schema. Review the manifest file, then try again.`, errorCode: 'SNYK-OS-0001', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnparseableManifestError = UnparseableManifestError; /** * @class * @name UnparseableLockFileError * @description The provided lock file could not be parsed as it has invalid syntax or does not match the expected schema. Review the lock file, then try again. * @summary Unable to parse lock file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnparseableLockFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to parse lock file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0002', status: 400, description: `The provided lock file could not be parsed as it has invalid syntax or does not match the expected schema. Review the lock file, then try again.`, errorCode: 'SNYK-OS-0002', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnparseableLockFileError = UnparseableLockFileError; /** * @class * @name UnknownDependencyVersionError * @description Dependency version could not be resolved. * * See more: * - [https://support.snyk.io/s/article/Could-not-determine-version-for-dependencies](https://support.snyk.io/s/article/Could-not-determine-version-for-dependencies) * @summary Unknown dependency version * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnknownDependencyVersionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unknown dependency version', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0003', status: 404, description: `Dependency version could not be resolved.`, errorCode: 'SNYK-OS-0003', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://support.snyk.io/s/article/Could-not-determine-version-for-dependencies', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnknownDependencyVersionError = UnknownDependencyVersionError; /** * @class * @name MissingHeaderError * @description The server encountered a request that is missing a mandatory request header. * @summary Missing required request header * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingHeaderError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Missing required request header', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0004', status: 422, description: `The server encountered a request that is missing a mandatory request header.`, errorCode: 'SNYK-OS-0004', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingHeaderError = MissingHeaderError; /** * @class * @name MissingPayloadError * @description The server could not process the request. * @summary Payload missing required elements * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingPayloadError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Payload missing required elements', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0005', status: 422, description: `The server could not process the request.`, errorCode: 'SNYK-OS-0005', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingPayloadError = MissingPayloadError; /** * @class * @name UnprocessableFileError * @description The dependency service could not process the files. * @summary Files cannot be processed * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnprocessableFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Files cannot be processed', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0006', status: 422, description: `The dependency service could not process the files.`, errorCode: 'SNYK-OS-0006', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnprocessableFileError = UnprocessableFileError; /** * @class * @name CannotGetFileFromSourceError * @description Could not get the file from the source URL. * @summary Cannot get file from source * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CannotGetFileFromSourceError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Cannot get file from source', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0007', status: 500, description: `Could not get the file from the source URL.`, errorCode: 'SNYK-OS-0007', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CannotGetFileFromSourceError = CannotGetFileFromSourceError; /** * @class * @name MissingEnvironmentVariableError * @description The server encountered a critical operation that requires a specific environment variable, but the variable is not set or is not accessible within the current environment. * @summary Missing environment variable * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingEnvironmentVariableError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Missing environment variable', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0008', status: 500, description: `The server encountered a critical operation that requires a specific environment variable, but the variable is not set or is not accessible within the current environment.`, errorCode: 'SNYK-OS-0008', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingEnvironmentVariableError = MissingEnvironmentVariableError; /** * @class * @name BrokeredConnectionNotSupportedError * @description The service encountered a permissions or credentials error most likely related to an import through a brokered connection for a scanner that does not yet support that. * @summary Brokered connections not currently supported * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class BrokeredConnectionNotSupportedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Brokered connections not currently supported', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0009', status: 500, description: `The service encountered a permissions or credentials error most likely related to an import through a brokered connection for a scanner that does not yet support that.`, errorCode: 'SNYK-OS-0009', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.BrokeredConnectionNotSupportedError = BrokeredConnectionNotSupportedError; /** * @class * @name GitCloneFailedError * @description We encountered a fatal error from Git while trying to clone your code using your provided credentials. Please verify that: * * * Your provided credentials are correct or not scoped too narrowly. * * The branch you've asked us to clone exists. * * The repository you've provided is accessible from the internet and you are not connected through a broker. * * And try the operation again. * @summary Snyk failed to clone your repository * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class GitCloneFailedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Snyk failed to clone your repository', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-0010', status: 422, description: `We encountered a fatal error from Git while trying to clone your code using your provided credentials. Please verify that: * Your provided credentials are correct or not scoped too narrowly. * The branch you've asked us to clone exists. * The repository you've provided is accessible from the internet and you are not connected through a broker. And try the operation again.`, errorCode: 'SNYK-OS-0010', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.GitCloneFailedError = GitCloneFailedError; /** * @class * @name UnsupportedManifestFileError * @description The provided manifest file is not supported by Snyk for .NET. * * See more: * - [https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/.net](https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/.net) * @summary Unsupported manifest file type for remediation * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedManifestFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported manifest file type for remediation', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0001', status: 400, description: `The provided manifest file is not supported by Snyk for .NET.`, errorCode: 'SNYK-OS-DOTNET-0001', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/.net', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedManifestFileError = UnsupportedManifestFileError; /** * @class * @name UnsupportedTargetFrameworkError * @description The provided manifest file defines a `` or `` that is not currently supported by Snyk's .NET scanning solution. * @summary Target framework not supported * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedTargetFrameworkError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Target framework not supported', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0002', status: 422, description: `The provided manifest file defines a \`\` or \`\` that is not currently supported by Snyk's .NET scanning solution.`, errorCode: 'SNYK-OS-DOTNET-0002', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedTargetFrameworkError = UnsupportedTargetFrameworkError; /** * @class * @name MissingStaticMainFunctionError * @description This error occurs when no static Main method with a correct signature is found in the code that produces an executable file. * It also occurs if the entry point function, `Main`, is defined with the wrong case, such as lower-case main. * * In order to fix this issue, ensure that your program has a .cs file that contains a main function, such as * ```c# * namespace Example * { * class Program * { * static void Main(string[] args) * { * Console.WriteLine("hello world"); * } * } * } * ``` * * See more: * - [https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs5001](https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs5001) * @summary Your C# code is missing a static Main function * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingStaticMainFunctionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Your C# code is missing a static Main function', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0003', status: 422, description: `This error occurs when no static Main method with a correct signature is found in the code that produces an executable file. It also occurs if the entry point function, \`Main\`, is defined with the wrong case, such as lower-case main. In order to fix this issue, ensure that your program has a .cs file that contains a main function, such as \`\`\`c# namespace Example { class Program { static void Main(string[] args) { Console.WriteLine("hello world"); } } } \`\`\``, errorCode: 'SNYK-OS-DOTNET-0003', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs5001', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingStaticMainFunctionError = MissingStaticMainFunctionError; /** * @class * @name PublishFailedError * @description This error occurs when running `dotnet publish --sc --framework ` fails to generate a * self-contained binary. Snyk needs to run this command in order to adequately determine the dependency tree for your project. If this command fails, Snyk cannot continue. * * Steps to determine why this happened: * * * Checkout a clean version of your project in a temporary folder * * Run `dotnet publish --sc --framework ` on your project, and confirm this step fails. * * If this step is successful locally, it is possible that Snyk is running another version of the .NET SDK. To tell Snyk which version of the .NET SDK to use, consider using the [global.json](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json) solution provided by Microsoft. * * See more: * - [https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/](https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/) * - [https://learn.microsoft.com/en-us/dotnet/core/tools/global-json](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json) * - [https://github.com/snyk/snyk-nuget-plugin/blob/885486aa656c28d3db465c8d22710770d5cc6773/lib/nuget-parser/cli/dotnet.ts#L67](https://github.com/snyk/snyk-nuget-plugin/blob/885486aa656c28d3db465c8d22710770d5cc6773/lib/nuget-parser/cli/dotnet.ts#L67) * @summary The dotnet CLI is unable to generate a self-contained binary * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PublishFailedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'The dotnet CLI is unable to generate a self-contained binary', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0004', status: 422, description: `This error occurs when running \`dotnet publish --sc --framework \` fails to generate a self-contained binary. Snyk needs to run this command in order to adequately determine the dependency tree for your project. If this command fails, Snyk cannot continue. Steps to determine why this happened: * Checkout a clean version of your project in a temporary folder * Run \`dotnet publish --sc --framework \` on your project, and confirm this step fails. If this step is successful locally, it is possible that Snyk is running another version of the .NET SDK. To tell Snyk which version of the .NET SDK to use, consider using the [global.json](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json) solution provided by Microsoft.`, errorCode: 'SNYK-OS-DOTNET-0004', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/', 'https://learn.microsoft.com/en-us/dotnet/core/tools/global-json', 'https://github.com/snyk/snyk-nuget-plugin/blob/885486aa656c28d3db465c8d22710770d5cc6773/lib/nuget-parser/cli/dotnet.ts#L67', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PublishFailedError = PublishFailedError; /** * @class * @name FailedToAccessPrivatePackageSourceError * @description This error occurs when running `dotnet restore` fails to access dependencies stored in a private package source that Snyk does not have access to. * * This means that your `.csproj` file or files refer to a dependency hosted on a private package store or Nuget Artifact Registry defined in your `NuGet.config` file, such as: * * ```xml * * * * * * * * * ``` * * In order to allow Snyk to access your private dependency package source, you must supply Snyk with a valid JSON object as a private registry token in the .NET language settings. * * You can set up a connection to your private Nuget repository in your Snyk integration settings. * * See more: * - [https://github.com/microsoft/artifacts-credprovider#environment-variables](https://github.com/microsoft/artifacts-credprovider#environment-variables) * @summary The dotnet CLI was unable to restore from private package sources * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class FailedToAccessPrivatePackageSourceError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'The dotnet CLI was unable to restore from private package sources', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0005', status: 401, description: `This error occurs when running \`dotnet restore\` fails to access dependencies stored in a private package source that Snyk does not have access to. This means that your \`.csproj\` file or files refer to a dependency hosted on a private package store or Nuget Artifact Registry defined in your \`NuGet.config\` file, such as: \`\`\`xml \`\`\` In order to allow Snyk to access your private dependency package source, you must supply Snyk with a valid JSON object as a private registry token in the .NET language settings. You can set up a connection to your private Nuget repository in your Snyk integration settings.`, errorCode: 'SNYK-OS-DOTNET-0005', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://github.com/microsoft/artifacts-credprovider#environment-variables', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.FailedToAccessPrivatePackageSourceError = FailedToAccessPrivatePackageSourceError; /** * @class * @name MissingMSBuildConditionError * @description The `dotnet` tool was unable to locate the `.targets`, `.csproj` or `.props` file responsible for one or more MSBuild conditions in your project file. * * The tool encountered an error like * ``` * /path/to/file/project.csproj(33,13): error MSB4100: Expected "$(SomeCondition)" to evaluate to a boolean instead of "", in condition "!$(SomeCondition)". * ``` * * This means the condition definition is missing in the project file that is currently being restored and in any project linked to it from there. * * Snyk can scan only the project files accessible in the current repository or the private dependencies available to Snyk. * * For example, if your code has the following structure: * * ```title=project.targets * * * false * * * ``` * * And * * ```title=project.csproj * * * * net8.0 * * * * * * ``` * * And `external-libraries` is not a part of your repository currently being scanned, Snyk is not able to find it. * * This error occurs when your code depends on external libraries that are added to or generated from your source code using external tools unknown to Snyk or as part of a build step in your build or a deployment pipeline. * * See more: * - [https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-conditional-constructs](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-conditional-constructs) * @summary Missing MSBuild Condition Construct in project file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingMSBuildConditionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Missing MSBuild Condition Construct in project file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0006', status: 422, description: `The \`dotnet\` tool was unable to locate the \`.targets\`, \`.csproj\` or \`.props\` file responsible for one or more MSBuild conditions in your project file. The tool encountered an error like \`\`\` /path/to/file/project.csproj(33,13): error MSB4100: Expected "$(SomeCondition)" to evaluate to a boolean instead of "", in condition "!$(SomeCondition)". \`\`\` This means the condition definition is missing in the project file that is currently being restored and in any project linked to it from there. Snyk can scan only the project files accessible in the current repository or the private dependencies available to Snyk. For example, if your code has the following structure: \`\`\`title=project.targets false \`\`\` And \`\`\`title=project.csproj net8.0 \`\`\` And \`external-libraries\` is not a part of your repository currently being scanned, Snyk is not able to find it. This error occurs when your code depends on external libraries that are added to or generated from your source code using external tools unknown to Snyk or as part of a build step in your build or a deployment pipeline.`, errorCode: 'SNYK-OS-DOTNET-0006', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [ 'https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-conditional-constructs', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingMSBuildConditionError = MissingMSBuildConditionError; /** * @class * @name NoTargetFrameworksFoundError * @description Snyk was unable to detect any ``s in the supplied manifest files. * * If you are using `Directory.Build.props` files to determine the target framework, ensure that it is named as such. Due to performance considerations on the customer's SCM network, Snyk does not perform case-insensitive searches for `.props` files. * * See more: * - [https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets](https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets) * @summary No target frameworks found in manifest files * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class NoTargetFrameworksFoundError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No target frameworks found in manifest files', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0007', status: 422, description: `Snyk was unable to detect any \`\`s in the supplied manifest files. If you are using \`Directory.Build.props\` files to determine the target framework, ensure that it is named as such. Due to performance considerations on the customer's SCM network, Snyk does not perform case-insensitive searches for \`.props\` files.`, errorCode: 'SNYK-OS-DOTNET-0007', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory?view=vs-2022#directorybuildprops-and-directorybuildtargets', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.NoTargetFrameworksFoundError = NoTargetFrameworksFoundError; /** * @class * @name OutdatedSDKVersionRequestedError * @description Snyk supports the latest channels of .NET which is currently [supported by Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet), but does **not** guarantee to support all SDK versions within each currently supported channel. * * Within the supported channels, Snyk aims to support most, if not all, of the SDK versions currently released under the **newest** of the channels. * * If the channels currently supported by Microsoft are `8.0`, `7.0` and `6.0`, Snyk **will** support all of the *latest* SDKs released for these channels. * * If the SDK versions released under `8.0.3` are: `8.0.203`, `8.0.202` and `8.0.103`, Snyk **cannot** guarantee to support *all* of them, but makes an effort to do so. Snyk **will** support the latest of the SDK versions currently released by Microsoft. * * If channel `8.0` is the newest channel currently supported, Snyk **cannot** guarantee that multiple, specific SDK versions for older, still supported channels such as .NET 6. * * ### Example support matrix * * If: * * * .NET channels currently supported by Microsoft are `.NET 8.0`, `.NET 7.0` and `.NET 6.0` * * Newest SDK version under `.NET 8.0` is `8.0.203` * * Then: * * | Channel | SDK | End-of-Life | Supported | * |:-------:|:----------------------------:|:-----------:|:-----------:| * | 8.0 | 8.0.203 (latest in channel) | No | Yes | * | 8.0 | 8.0.202 | No | Yes | * | 8.0 | 8.0.103 | No | Yes | * | | (...) | | | * | 7.0 | 7.0.407 (latest in channel) | No | Yes | * | 7.0 | 7.0.314 | No | No | * | | (...) | | | * | 6.0 | 6.0.420 | No | Yes | * | 6.0 | 6.0.128 | No | No | * | | (..) | | | * | 5.0 | 5.0.408 (latest in channel) | Yes | No | * | 5.0 | 5.0.214 | Yes | No | * | | (..) | | | * * ### Workarounds * * This limitation can lead to scan failures for customers that are pinning SDK versions in their `global.json` files without a [rollForward](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#rollforward) directive, such as: * ```json * { * "sdk": { * "version": "6.0.101" * } * } * ``` * Since as `6.0` is not the newest .NET channel. * * To work around this issue, we recommend that customers employ some flexibility in their `global.json` file by employing the `rollFoward` directive to be `latestMajor`, as such: * ```json * { * "sdk": { * "version": "6.0.101", * "rollForward": "latestMajor" * } * } * ``` * * Which will allow Snyk to scan your code using a newer version of the SDK, despite your version pinning. * * See more: * - [https://versionsof.net/core/](https://versionsof.net/core/) * - [https://dotnet.microsoft.com/en-us/download/dotnet](https://dotnet.microsoft.com/en-us/download/dotnet) * - [https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#rollforward](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#rollforward) * @summary Your global.json is targeting an outdated SDK version * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class OutdatedSDKVersionRequestedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Your global.json is targeting an outdated SDK version', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0008', status: 422, description: `Snyk supports the latest channels of .NET which is currently [supported by Microsoft](https://dotnet.microsoft.com/en-us/download/dotnet), but does **not** guarantee to support all SDK versions within each currently supported channel. Within the supported channels, Snyk aims to support most, if not all, of the SDK versions currently released under the **newest** of the channels. If the channels currently supported by Microsoft are \`8.0\`, \`7.0\` and \`6.0\`, Snyk **will** support all of the *latest* SDKs released for these channels. If the SDK versions released under \`8.0.3\` are: \`8.0.203\`, \`8.0.202\` and \`8.0.103\`, Snyk **cannot** guarantee to support *all* of them, but makes an effort to do so. Snyk **will** support the latest of the SDK versions currently released by Microsoft. If channel \`8.0\` is the newest channel currently supported, Snyk **cannot** guarantee that multiple, specific SDK versions for older, still supported channels such as .NET 6. ### Example support matrix If: * .NET channels currently supported by Microsoft are \`.NET 8.0\`, \`.NET 7.0\` and \`.NET 6.0\` * Newest SDK version under \`.NET 8.0\` is \`8.0.203\` Then: | Channel | SDK | End-of-Life | Supported | |:-------:|:----------------------------:|:-----------:|:-----------:| | 8.0 | 8.0.203 (latest in channel) | No | Yes | | 8.0 | 8.0.202 | No | Yes | | 8.0 | 8.0.103 | No | Yes | | | (...) | | | | 7.0 | 7.0.407 (latest in channel) | No | Yes | | 7.0 | 7.0.314 | No | No | | | (...) | | | | 6.0 | 6.0.420 | No | Yes | | 6.0 | 6.0.128 | No | No | | | (..) | | | | 5.0 | 5.0.408 (latest in channel) | Yes | No | | 5.0 | 5.0.214 | Yes | No | | | (..) | | | ### Workarounds This limitation can lead to scan failures for customers that are pinning SDK versions in their \`global.json\` files without a [rollForward](https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#rollforward) directive, such as: \`\`\`json { "sdk": { "version": "6.0.101" } } \`\`\` Since as \`6.0\` is not the newest .NET channel. To work around this issue, we recommend that customers employ some flexibility in their \`global.json\` file by employing the \`rollFoward\` directive to be \`latestMajor\`, as such: \`\`\`json { "sdk": { "version": "6.0.101", "rollForward": "latestMajor" } } \`\`\` Which will allow Snyk to scan your code using a newer version of the SDK, despite your version pinning.`, errorCode: 'SNYK-OS-DOTNET-0008', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://versionsof.net/core/', 'https://dotnet.microsoft.com/en-us/download/dotnet', 'https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#rollforward', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.OutdatedSDKVersionRequestedError = OutdatedSDKVersionRequestedError; /** * @class * @name ProjectSkippedAndNotFoundError * @description While attempting to build your solution for scanning, the `dotnet` SDK was unable to restore one or more projects referenced in your manifest files. * * Please note that Snyk runs these builds on a **case-sensitive** filesystem, meaning that `../src/NS.Project.csproj` and `../src/ns.project.csproj` are not referring to the same thing. * * This can present itself as a problem for customers that are using Mac or Windows build pipeline where file systems are not case-sensitive. In this case, verify you're referring to the right manifest files and check the Snyk import logs for more details. * * See more: * - [https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/assembly-references#missing-references](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/assembly-references#missing-references) * @summary Project failed to build due to missing type or namespace references * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class ProjectSkippedAndNotFoundError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Project failed to build due to missing type or namespace references', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-dotnet-0009', status: 422, description: `While attempting to build your solution for scanning, the \`dotnet\` SDK was unable to restore one or more projects referenced in your manifest files. Please note that Snyk runs these builds on a **case-sensitive** filesystem, meaning that \`../src/NS.Project.csproj\` and \`../src/ns.project.csproj\` are not referring to the same thing. This can present itself as a problem for customers that are using Mac or Windows build pipeline where file systems are not case-sensitive. In this case, verify you're referring to the right manifest files and check the Snyk import logs for more details.`, errorCode: 'SNYK-OS-DOTNET-0009', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/assembly-references#missing-references', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.ProjectSkippedAndNotFoundError = ProjectSkippedAndNotFoundError; /** * @class * @name PrivateModuleError * @description Snyk could not access the private modules within your go.mod files. * * See more: * - [https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/go](https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/go) * @summary Failed to access private module * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PrivateModuleError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Failed to access private module', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0001', status: 400, description: `Snyk could not access the private modules within your go.mod files.`, errorCode: 'SNYK-OS-GO-0001', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/go', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PrivateModuleError = PrivateModuleError; /** * @class * @name GoModFileMissingError * @description A go.mod file was not found in the current directory or any parent directory. * * See more: * - [https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/go](https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/go) * @summary Go mod file not found * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class GoModFileMissingError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Go mod file not found', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0002', status: 400, description: `A go.mod file was not found in the current directory or any parent directory.`, errorCode: 'SNYK-OS-GO-0002', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/go', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.GoModFileMissingError = GoModFileMissingError; /** * @class * @name SsoReAuthRequiredError * @description Your code is cloned on an isolated environment using Git as it is required by Snyk to analyze its dependencies. * * Your Organization has enabled or enforced SAML SSO after you authorized Snyk to access your code, and a re-authentication is therefore required. * * The error you're seeing is usually reproducible by attempting to do a `git clone` of your repository with incorrectly configured credentials. * Verify your authentication configuration with your Git cloud provider and try again. * * See more: * - [https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso) * @summary OAuth re-authorization required * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata * @deprecated This error has been moved to a more generalized namespace to avoid repetition. Use SNYK-OS-8004 instead. */ class SsoReAuthRequiredError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'OAuth re-authorization required', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0003', status: 422, description: `Your code is cloned on an isolated environment using Git as it is required by Snyk to analyze its dependencies. Your Organization has enabled or enforced SAML SSO after you authorized Snyk to access your code, and a re-authentication is therefore required. The error you're seeing is usually reproducible by attempting to do a \`git clone\` of your repository with incorrectly configured credentials. Verify your authentication configuration with your Git cloud provider and try again.`, errorCode: 'SNYK-OS-GO-0003', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/about-authentication-with-saml-single-sign-on#about-oauth-apps-github-apps-and-saml-sso', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.SsoReAuthRequiredError = SsoReAuthRequiredError; /** * @class * @name IncompleteProjectError * @description Generating the dependency graph requires Snyk to run go list `go list -deps -json` inside the project. If the operation fails, creating a full dependency graph cannot continue. * * This error means that you need some cleanup, (such as `go mod tidy`) or your project deployment process contains a code generation step such as `protobuf` or similar that is not currently supported by Snyk. * * To verify if this is the case, clone your project in a clean environment, run go list `go list -deps -json` and verify whether the operation fails. * * If Snyk cannot process your code successfully, insert the Snyk CLI as part of your deployment pipeline. * * See more: * - [https://docs.snyk.io/snyk-cli](https://docs.snyk.io/snyk-cli) * - [https://github.com/snyk/snyk-go-plugin](https://github.com/snyk/snyk-go-plugin) * - [https://github.com/golang/go/blob/master/src/cmd/go/internal/list/list.go](https://github.com/golang/go/blob/master/src/cmd/go/internal/list/list.go) * @summary Your project repository is missing required files * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class IncompleteProjectError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Your project repository is missing required files', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0004', status: 422, description: `Generating the dependency graph requires Snyk to run go list \`go list -deps -json\` inside the project. If the operation fails, creating a full dependency graph cannot continue. This error means that you need some cleanup, (such as \`go mod tidy\`) or your project deployment process contains a code generation step such as \`protobuf\` or similar that is not currently supported by Snyk. To verify if this is the case, clone your project in a clean environment, run go list \`go list -deps -json\` and verify whether the operation fails. If Snyk cannot process your code successfully, insert the Snyk CLI as part of your deployment pipeline.`, errorCode: 'SNYK-OS-GO-0004', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/snyk-cli', 'https://github.com/snyk/snyk-go-plugin', 'https://github.com/golang/go/blob/master/src/cmd/go/internal/list/list.go', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.IncompleteProjectError = IncompleteProjectError; /** * @class * @name InconsistentVendoringError * @description Generating the dependency graph requires Snyk to run `go list -deps -json` inside the project. If the operation fails, creating a full dependency graph cannot continue. * * This error means that there is inconsistency between your `vendor/modules.txt` file and your `go.mod` file. To remediate, you need to: * * * `go mod vendor` * * `go mod tidy` * * Next, commit those changes to your repo. Snyk does not manipulate with your code on our end by design, which is why this is not done automatically. * * To verify if this is the case, clone your project in a clean environment, run go list `go list -deps -json` and verify whether the operation fails. * Then try and run the above mentioned commands and see if your SCM system reports changes in files. * * See more: * - [https://go.dev/ref/mod#go-mod-vendor](https://go.dev/ref/mod#go-mod-vendor) * @summary Your project repository has inconsistent vendoring information * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class InconsistentVendoringError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Your project repository has inconsistent vendoring information', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0005', status: 422, description: `Generating the dependency graph requires Snyk to run \`go list -deps -json\` inside the project. If the operation fails, creating a full dependency graph cannot continue. This error means that there is inconsistency between your \`vendor/modules.txt\` file and your \`go.mod\` file. To remediate, you need to: * \`go mod vendor\` * \`go mod tidy\` Next, commit those changes to your repo. Snyk does not manipulate with your code on our end by design, which is why this is not done automatically. To verify if this is the case, clone your project in a clean environment, run go list \`go list -deps -json\` and verify whether the operation fails. Then try and run the above mentioned commands and see if your SCM system reports changes in files.`, errorCode: 'SNYK-OS-GO-0005', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://go.dev/ref/mod#go-mod-vendor', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.InconsistentVendoringError = InconsistentVendoringError; /** * @class * @name UnsupportedExternalFileGenerationSCMError * @description Snyk currently does not support external file generation in your project. This limitation is due to Snyk's lack of visibility into the third-party generator tools you may be using and the specific commands required to generate these files. * * Snyk can only work with the files available in your repository and does not have insight into the generation process for external files. * @summary Unsupported external file generation * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedExternalFileGenerationSCMError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported external file generation', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0006', status: 422, description: `Snyk currently does not support external file generation in your project. This limitation is due to Snyk's lack of visibility into the third-party generator tools you may be using and the specific commands required to generate these files. Snyk can only work with the files available in your repository and does not have insight into the generation process for external files.`, errorCode: 'SNYK-OS-GO-0006', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedExternalFileGenerationSCMError = UnsupportedExternalFileGenerationSCMError; /** * @class * @name UnableToAccessPrivateDepsError * @description The Go tool encountered a `DepsError` while trying to download a private dependency. Private repositories that are not accessible to the public internet and are not available on the official Go proxy mirror are cloned with a version control system and built on demand. * This requires the VCS to have the correct access rights to that repository. * * Snyk supports private repositories that are hosted in the same Organization and on the same Project that is scanned for vulnerabilities. The authentication to the private repository is the same as the authentication used to integrate that repository with Snyk. * * This error appears when the authorization credentials do not allow access to the requested private dependency. * * See more: * - [https://go.dev/ref/mod#vcs](https://go.dev/ref/mod#vcs) * @summary Unable to access private dependencies * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnableToAccessPrivateDepsError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to access private dependencies', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0007', status: 422, description: `The Go tool encountered a \`DepsError\` while trying to download a private dependency. Private repositories that are not accessible to the public internet and are not available on the official Go proxy mirror are cloned with a version control system and built on demand. This requires the VCS to have the correct access rights to that repository. Snyk supports private repositories that are hosted in the same Organization and on the same Project that is scanned for vulnerabilities. The authentication to the private repository is the same as the authentication used to integrate that repository with Snyk. This error appears when the authorization credentials do not allow access to the requested private dependency. `, errorCode: 'SNYK-OS-GO-0007', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [ 'https://go.dev/ref/mod#vcs', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnableToAccessPrivateDepsError = UnableToAccessPrivateDepsError; /** * @class * @name UnableToUseCredentialsError * @description The Go tool encountered a permissions error while fetching one of the private dependencies. Ensure that the integration token you used to sign in to Snyk is properly configured so that Snyk can access the private dependencies. * * The Snyk Go integration only supports private dependencies that are used inside the same Organization as the Project you are scanning. * * This error appears when Snyk is unable to properly access the authorization credentials for the requested private dependency. * @summary Unable to fetch private dependencies * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnableToUseCredentialsError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to fetch private dependencies', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0008', status: 401, description: `The Go tool encountered a permissions error while fetching one of the private dependencies. Ensure that the integration token you used to sign in to Snyk is properly configured so that Snyk can access the private dependencies. The Snyk Go integration only supports private dependencies that are used inside the same Organization as the Project you are scanning. This error appears when Snyk is unable to properly access the authorization credentials for the requested private dependency. `, errorCode: 'SNYK-OS-GO-0008', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnableToUseCredentialsError = UnableToUseCredentialsError; /** * @class * @name ToolchainNotAvailableError * @description Could not download Go toolchain. * @summary Toolchain not available * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class ToolchainNotAvailableError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Toolchain not available', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-go-0009', status: 500, description: `Could not download Go toolchain.`, errorCode: 'SNYK-OS-GO-0009', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.ToolchainNotAvailableError = ToolchainNotAvailableError; /** * @class * @name MissingRequirementFromPomError * @description The required property is missing from the pom object. * @summary Missing property * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingRequirementFromPomError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Missing property', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0001', status: 422, description: `The required property is missing from the pom object.`, errorCode: 'SNYK-OS-MAVEN-0001', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingRequirementFromPomError = MissingRequirementFromPomError; /** * @class * @name UnableToResolveValueForPropertyError * @description The targeted property could not be resolved with a valid value. * @summary Unable to resolve value for property * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnableToResolveValueForPropertyError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to resolve value for property', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0002', status: 422, description: `The targeted property could not be resolved with a valid value.`, errorCode: 'SNYK-OS-MAVEN-0002', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnableToResolveValueForPropertyError = UnableToResolveValueForPropertyError; /** * @class * @name UnableToResolveVersionForPropertyError * @description The targeted property could not be resolved with a valid version. * @summary Unable to resolve version for property * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnableToResolveVersionForPropertyError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to resolve version for property', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0003', status: 500, description: `The targeted property could not be resolved with a valid version.`, errorCode: 'SNYK-OS-MAVEN-0003', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnableToResolveVersionForPropertyError = UnableToResolveVersionForPropertyError; /** * @class * @name CyclicPropertyDetectedInPomFileError * @description There is circular dependency among properties in the Maven project's configuration file (POM), preventing proper resolution and causing an error. * @summary Cyclic property detected in POM file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CyclicPropertyDetectedInPomFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Cyclic property detected in POM file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0004', status: 422, description: `There is circular dependency among properties in the Maven project's configuration file (POM), preventing proper resolution and causing an error.`, errorCode: 'SNYK-OS-MAVEN-0004', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CyclicPropertyDetectedInPomFileError = CyclicPropertyDetectedInPomFileError; /** * @class * @name UnableToParseXMLError * @description There is an error parsing the XML file. This could be referring to either pom.xml or maven-metadata.xml. * @summary Error parsing the XML file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnableToParseXMLError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Error parsing the XML file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0005', status: 422, description: `There is an error parsing the XML file. This could be referring to either pom.xml or maven-metadata.xml.`, errorCode: 'SNYK-OS-MAVEN-0005', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnableToParseXMLError = UnableToParseXMLError; /** * @class * @name InvalidCoordinatesError * @description The coordinates provided for a project were invalid. * @summary Invalid coordinates provided * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class InvalidCoordinatesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Invalid coordinates provided', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0006', status: 422, description: `The coordinates provided for a project were invalid.`, errorCode: 'SNYK-OS-MAVEN-0006', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.InvalidCoordinatesError = InvalidCoordinatesError; /** * @class * @name SkippedGroupError * @description Skipping a specific groupId starting due to remapped coordinates. * @summary Skipping group * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class SkippedGroupError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Skipping group', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0007', status: 422, description: `Skipping a specific groupId starting due to remapped coordinates.`, errorCode: 'SNYK-OS-MAVEN-0007', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.SkippedGroupError = SkippedGroupError; /** * @class * @name PomFileNotFoundError * @description The pom file was not found in Maven repository. * @summary Pom file not found * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PomFileNotFoundError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Pom file not found', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0008', status: 422, description: `The pom file was not found in Maven repository.`, errorCode: 'SNYK-OS-MAVEN-0008', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PomFileNotFoundError = PomFileNotFoundError; /** * @class * @name MissingProjectFromPomError * @description A project element is missing from POM. * @summary Missing project from POM * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingProjectFromPomError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Missing project from POM', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0009', status: 422, description: `A project element is missing from POM.`, errorCode: 'SNYK-OS-MAVEN-0009', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingProjectFromPomError = MissingProjectFromPomError; /** * @class * @name CannotResolveTargetPomFromXmlError * @description Cannot resolve the targeted POM from the input XML. * @summary Cannot resolve the target POM from the input XML * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CannotResolveTargetPomFromXmlError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Cannot resolve the target POM from the input XML', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0010', status: 422, description: `Cannot resolve the targeted POM from the input XML.`, errorCode: 'SNYK-OS-MAVEN-0010', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CannotResolveTargetPomFromXmlError = CannotResolveTargetPomFromXmlError; /** * @class * @name CannotResolveTargetPomFromRepoError * @description Cannot resolve the targeted POM from the repository. * @summary Cannot resolve the target POM from the repository * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CannotResolveTargetPomFromRepoError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Cannot resolve the target POM from the repository', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0011', status: 404, description: `Cannot resolve the targeted POM from the repository.`, errorCode: 'SNYK-OS-MAVEN-0011', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CannotResolveTargetPomFromRepoError = CannotResolveTargetPomFromRepoError; /** * @class * @name CannotGetBuildFileFromRepoError * @description Cannot get the build file repository. * @summary Cannot get the build file repository * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CannotGetBuildFileFromRepoError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Cannot get the build file repository', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0012', status: 404, description: `Cannot get the build file repository.`, errorCode: 'SNYK-OS-MAVEN-0012', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CannotGetBuildFileFromRepoError = CannotGetBuildFileFromRepoError; /** * @class * @name CannotCreateGitHostError * @description Cannot create source URL. * @summary Unable to create hosted git info * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CannotCreateGitHostError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to create hosted git info', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0013', status: 500, description: `Cannot create source URL.`, errorCode: 'SNYK-OS-MAVEN-0013', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CannotCreateGitHostError = CannotCreateGitHostError; /** * @class * @name NoReleasedVersionForVersionsRangeError * @description There was no version released for the specified versions range. * @summary No released version for versions range * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class NoReleasedVersionForVersionsRangeError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No released version for versions range', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0014', status: 422, description: `There was no version released for the specified versions range.`, errorCode: 'SNYK-OS-MAVEN-0014', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.NoReleasedVersionForVersionsRangeError = NoReleasedVersionForVersionsRangeError; /** * @class * @name SourceNotSupportedError * @description The source used is not supported by fetcher. The supported sources are: github, bitbucket, gitlab. * @summary Source is not supported * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class SourceNotSupportedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Source is not supported', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0015', status: 422, description: `The source used is not supported by fetcher. The supported sources are: github, bitbucket, gitlab.`, errorCode: 'SNYK-OS-MAVEN-0015', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.SourceNotSupportedError = SourceNotSupportedError; /** * @class * @name TimeoutWhenProcessingTheDepTreeError * @description There was an timeout when processing the dependency tree. * @summary Timeout when processing the dependency tree * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class TimeoutWhenProcessingTheDepTreeError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Timeout when processing the dependency tree', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0016', status: 422, description: `There was an timeout when processing the dependency tree.`, errorCode: 'SNYK-OS-MAVEN-0016', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.TimeoutWhenProcessingTheDepTreeError = TimeoutWhenProcessingTheDepTreeError; /** * @class * @name CannotReachConfiguredRepositoryError * @description One or more of the Maven repositories configured under your organisations language settings cannot be reached. * * This error can happen for a variety of reasons: * * * If using broker it could be a misconfiguration in your broker client. Double check the username and password. * * It could be network connectivity between the broker client and Snyk or between the broker client and the configured repository, check your firewall rules. * * In order to solve this issue, refer to the specific details of this error message to identify which repository is causing issues. * * See more: * - [https://docs.snyk.io/integrate-with-snyk/package-repository-integrations](https://docs.snyk.io/integrate-with-snyk/package-repository-integrations) * @summary Cannot reach one or more Maven repositories configured under your Snyk organisations language settings * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CannotReachConfiguredRepositoryError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Cannot reach one or more Maven repositories configured under your Snyk organisations language settings', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-maven-0017', status: 404, description: `One or more of the Maven repositories configured under your organisations language settings cannot be reached. This error can happen for a variety of reasons: * If using broker it could be a misconfiguration in your broker client. Double check the username and password. * It could be network connectivity between the broker client and Snyk or between the broker client and the configured repository, check your firewall rules. In order to solve this issue, refer to the specific details of this error message to identify which repository is causing issues. `, errorCode: 'SNYK-OS-MAVEN-0017', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/integrate-with-snyk/package-repository-integrations', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CannotReachConfiguredRepositoryError = CannotReachConfiguredRepositoryError; /** * @class * @name NoRepoFoundForTheNPMPackageError * @description No repository found for the NPM package. * @summary No repository found for A NPM package * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class NoRepoFoundForTheNPMPackageError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No repository found for A NPM package', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0001', status: 422, description: `No repository found for the NPM package.`, errorCode: 'SNYK-OS-NODEJS-0001', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.NoRepoFoundForTheNPMPackageError = NoRepoFoundForTheNPMPackageError; /** * @class * @name CouldNotParseNPMRegistryURLError * @description Could not parse NPM registry URL. * @summary Could not parse NPM registry URL * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CouldNotParseNPMRegistryURLError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Could not parse NPM registry URL', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0002', status: 422, description: `Could not parse NPM registry URL.`, errorCode: 'SNYK-OS-NODEJS-0002', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CouldNotParseNPMRegistryURLError = CouldNotParseNPMRegistryURLError; /** * @class * @name CouldNotFindBrokerURLError * @description Could not find a broker resolved URL. * @summary Could not find a broker resolved URL * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CouldNotFindBrokerURLError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Could not find a broker resolved URL', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0003', status: 422, description: `Could not find a broker resolved URL.`, errorCode: 'SNYK-OS-NODEJS-0003', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CouldNotFindBrokerURLError = CouldNotFindBrokerURLError; /** * @class * @name UnableToReplaceBrokerURLError * @description Unable to replace all broker urls in lock file. * @summary Unable to replace broker URL * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnableToReplaceBrokerURLError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to replace broker URL', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0004', status: 422, description: `Unable to replace all broker urls in lock file.`, errorCode: 'SNYK-OS-NODEJS-0004', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnableToReplaceBrokerURLError = UnableToReplaceBrokerURLError; /** * @class * @name BadNPMVersionError * @description The NPM version is not supported. * @summary Bad NPM version * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class BadNPMVersionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Bad NPM version', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0005', status: 422, description: `The NPM version is not supported.`, errorCode: 'SNYK-OS-NODEJS-0005', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.BadNPMVersionError = BadNPMVersionError; /** * @class * @name UnknownBlobEncodingOnGithubError * @description Unknown blob encoding on Github. * @summary Unknown blob encoding on Github * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnknownBlobEncodingOnGithubError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unknown blob encoding on Github', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0006', status: 422, description: `Unknown blob encoding on Github.`, errorCode: 'SNYK-OS-NODEJS-0006', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnknownBlobEncodingOnGithubError = UnknownBlobEncodingOnGithubError; /** * @class * @name NoResultsFromForkerProcessesError * @description No result from forked process. * @summary No result from forked process * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class NoResultsFromForkerProcessesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No result from forked process', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0007', status: 500, description: `No result from forked process.`, errorCode: 'SNYK-OS-NODEJS-0007', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.NoResultsFromForkerProcessesError = NoResultsFromForkerProcessesError; /** * @class * @name ChildProcessExecutionError * @description The child process encountered an error during execution. * @summary Child Process Execution Error * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class ChildProcessExecutionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Child Process Execution Error', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0008', status: 500, description: `The child process encountered an error during execution.`, errorCode: 'SNYK-OS-NODEJS-0008', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.ChildProcessExecutionError = ChildProcessExecutionError; /** * @class * @name NoValidPackageUpgradesError * @description The system attempted to find valid upgrades for the packages specified in the lock file, but none were available. * @summary No valid package upgrades * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class NoValidPackageUpgradesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No valid package upgrades', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0009', status: 422, description: `The system attempted to find valid upgrades for the packages specified in the lock file, but none were available.`, errorCode: 'SNYK-OS-NODEJS-0009', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.NoValidPackageUpgradesError = NoValidPackageUpgradesError; /** * @class * @name NoDependencyUpdatesError * @description There are no available updates for the dependencies. * @summary No dependency updates * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class NoDependencyUpdatesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No dependency updates', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0010', status: 422, description: `There are no available updates for the dependencies.`, errorCode: 'SNYK-OS-NODEJS-0010', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.NoDependencyUpdatesError = NoDependencyUpdatesError; /** * @class * @name CouldNotParseJSONFileError * @description An error occurred while attempting to parse a JSON file. * @summary Could not parse JSON file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class CouldNotParseJSONFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Could not parse JSON file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0011', status: 422, description: `An error occurred while attempting to parse a JSON file.`, errorCode: 'SNYK-OS-NODEJS-0011', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.CouldNotParseJSONFileError = CouldNotParseJSONFileError; /** * @class * @name Base64EncodeError * @description An error occurred while attempting to perform Base64 encoding. * @summary Could not Base64 encode * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class Base64EncodeError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Could not Base64 encode', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0012', status: 422, description: `An error occurred while attempting to perform Base64 encoding.`, errorCode: 'SNYK-OS-NODEJS-0012', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.Base64EncodeError = Base64EncodeError; /** * @class * @name Base64DecodeError * @description An error occurred while attempting to perform Base64 decoding. * @summary Could not Base64 decode * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class Base64DecodeError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Could not Base64 decode', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0013', status: 422, description: `An error occurred while attempting to perform Base64 decoding.`, errorCode: 'SNYK-OS-NODEJS-0013', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.Base64DecodeError = Base64DecodeError; /** * @class * @name MissingSupportedFileError * @description Could not find supported file. * @summary Missing supported file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class MissingSupportedFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Missing supported file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0014', status: 400, description: `Could not find supported file.`, errorCode: 'SNYK-OS-NODEJS-0014', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.MissingSupportedFileError = MissingSupportedFileError; /** * @class * @name InvalidConfigurationError * @description The configuration parameter does not meet the expected data type. Please ensure the provided value is of the correct data type. * @summary Invalid configuration * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class InvalidConfigurationError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Invalid configuration', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0015', status: 400, description: `The configuration parameter does not meet the expected data type. Please ensure the provided value is of the correct data type.`, errorCode: 'SNYK-OS-NODEJS-0015', level: 'warn', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.InvalidConfigurationError = InvalidConfigurationError; /** * @class * @name PnpmOutOfSyncError * @description Sometimes a project may become out of sync between the lockfile and the manifest file. This might happen if the package.json is modified or updated but the pnpm-lock.yaml is not. * * This can be resolved by ensuring the lockfile and manifest file are correctly synced, by executing pnpm install. * * In some cases, it may be necessary to delete the node_modules folder and the pnpm-lock.yaml and run pnpm install again to force a full reinstall. * * See more: * - [https://support.snyk.io/s/article/Out-of-sync-manifest--lockfile-in-the-project](https://support.snyk.io/s/article/Out-of-sync-manifest--lockfile-in-the-project) * @summary Out of Sync Error * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PnpmOutOfSyncError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Out of Sync Error', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0016', status: 422, description: `Sometimes a project may become out of sync between the lockfile and the manifest file. This might happen if the package.json is modified or updated but the pnpm-lock.yaml is not. This can be resolved by ensuring the lockfile and manifest file are correctly synced, by executing pnpm install. In some cases, it may be necessary to delete the node_modules folder and the pnpm-lock.yaml and run pnpm install again to force a full reinstall. `, errorCode: 'SNYK-OS-NODEJS-0016', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [ 'https://support.snyk.io/s/article/Out-of-sync-manifest--lockfile-in-the-project', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PnpmOutOfSyncError = PnpmOutOfSyncError; /** * @class * @name PnpmUnsupportedLockfileVersionError * @description The lockfile version is not supported. Supported lockfile versions for pnpm include v5 and v6. * @summary Unsupported pnpm lockfile version * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PnpmUnsupportedLockfileVersionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported pnpm lockfile version', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0017', status: 422, description: `The lockfile version is not supported. Supported lockfile versions for pnpm include v5 and v6.`, errorCode: 'SNYK-OS-NODEJS-0017', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PnpmUnsupportedLockfileVersionError = PnpmUnsupportedLockfileVersionError; /** * @class * @name YarnPackageNotFoundError * @description Snyk could not find the package in the Yarn registry. * @summary Yarn package not found * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class YarnPackageNotFoundError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Yarn package not found', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0019', status: 404, description: `Snyk could not find the package in the Yarn registry.`, errorCode: 'SNYK-OS-NODEJS-0019', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.YarnPackageNotFoundError = YarnPackageNotFoundError; /** * @class * @name UnableToReachRegistryError * @description Snyk could not reach the node package registry. * @summary Unable to reach package registry * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnableToReachRegistryError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to reach package registry', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0020', status: 503, description: `Snyk could not reach the node package registry.`, errorCode: 'SNYK-OS-NODEJS-0020', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnableToReachRegistryError = UnableToReachRegistryError; /** * @class * @name OutdatedYarnLockFileError * @description The lock file is outdated. Update the lock file and try again. * @summary Lock file is outdated * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class OutdatedYarnLockFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Lock file is outdated', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0021', status: 409, description: `The lock file is outdated. Update the lock file and try again.`, errorCode: 'SNYK-OS-NODEJS-0021', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.OutdatedYarnLockFileError = OutdatedYarnLockFileError; /** * @class * @name PermissionDeniedError * @description Snyk does not have sufficient permissions to access the repository, or the repository does not exist. * @summary Unable to read from remote repository * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PermissionDeniedError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unable to read from remote repository', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-nodejs-0022', status: 401, description: `Snyk does not have sufficient permissions to access the repository, or the repository does not exist.`, errorCode: 'SNYK-OS-NODEJS-0022', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PermissionDeniedError = PermissionDeniedError; /** * @class * @name UnsupportedRequirementsFileError * @description The provided requirements file is not supported by Snyk for Python. * * See more: * - [https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/python](https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/python) * @summary Unsupported manifest file type for remediation * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class UnsupportedRequirementsFileError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Unsupported manifest file type for remediation', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0001', status: 422, description: `The provided requirements file is not supported by Snyk for Python.`, errorCode: 'SNYK-OS-PYTHON-0001', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/scan-applications/supported-languages-and-frameworks/python', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.UnsupportedRequirementsFileError = UnsupportedRequirementsFileError; /** * @class * @name TooManyManifestFilesError * @description Too many manifest files were provided in the request body. * @summary Received more manifests than expected * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class TooManyManifestFilesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Received more manifests than expected', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0002', status: 422, description: `Too many manifest files were provided in the request body.`, errorCode: 'SNYK-OS-PYTHON-0002', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.TooManyManifestFilesError = TooManyManifestFilesError; /** * @class * @name FailedToApplyDependencyUpdatesError * @description An error occurred while updating dependencies. * @summary Failed to apply dependency updates * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class FailedToApplyDependencyUpdatesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Failed to apply dependency updates', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0003', status: 422, description: `An error occurred while updating dependencies.`, errorCode: 'SNYK-OS-PYTHON-0003', level: 'error', classification: types_1.Classification.UNEXPECTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.FailedToApplyDependencyUpdatesError = FailedToApplyDependencyUpdatesError; /** * @class * @name PythonPackageNotFoundError * @description A package listed in the manifest file cannot be found in the Python Package Index(PyPI). * Make sure all packages included in the manifest file are public existing ones. * @summary Python package not found * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PythonPackageNotFoundError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Python package not found', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0004', status: 422, description: `A package listed in the manifest file cannot be found in the Python Package Index(PyPI). Make sure all packages included in the manifest file are public existing ones.`, errorCode: 'SNYK-OS-PYTHON-0004', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PythonPackageNotFoundError = PythonPackageNotFoundError; /** * @class * @name SyntaxIssuesError * @description The manifest file has syntax issues like incorrect package names or unsupported characters. * Make sure the manifest file follows the syntax stardards and can be installed locally as well. * @summary Syntax errors found in manifest file * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class SyntaxIssuesError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Syntax errors found in manifest file', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0005', status: 422, description: `The manifest file has syntax issues like incorrect package names or unsupported characters. Make sure the manifest file follows the syntax stardards and can be installed locally as well.`, errorCode: 'SNYK-OS-PYTHON-0005', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.SyntaxIssuesError = SyntaxIssuesError; /** * @class * @name PipUnsupportedPythonVersionError * @description At least one of the packages requires a Python version that doesn't match the one used in the project scan. * Make sure to select a suitable Python version from the organization Python language settings. * Alternatively, add a `.snyk` file for Python version selection override. * @summary Python version not supported * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PipUnsupportedPythonVersionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Python version not supported', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0006', status: 422, description: `At least one of the packages requires a Python version that doesn't match the one used in the project scan. Make sure to select a suitable Python version from the organization Python language settings. Alternatively, add a \`.snyk\` file for Python version selection override.`, errorCode: 'SNYK-OS-PYTHON-0006', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PipUnsupportedPythonVersionError = PipUnsupportedPythonVersionError; /** * @class * @name PythonVersionConfictError * @description Two or more packages have conflicting version requirements that cannot be resolved. * Make sure no two packages and their requirements cause conflicts and that the manifest file can be installed locally. * @summary Packages versions caused conflicts * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PythonVersionConfictError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Packages versions caused conflicts', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0007', status: 422, description: `Two or more packages have conflicting version requirements that cannot be resolved. Make sure no two packages and their requirements cause conflicts and that the manifest file can be installed locally.`, errorCode: 'SNYK-OS-PYTHON-0007', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PythonVersionConfictError = PythonVersionConfictError; /** * @class * @name PipNoMatchingPythonDistributionError * @description At least one of the packages requires a Python version that doesn't match the one used in the project scan. * Make sure to select a suitable Python version from the organization Python language settings. * Alternatively, add a `.snyk` file for Python version selection override. * @summary No matching distribution found for one or more of the packages * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PipNoMatchingPythonDistributionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No matching distribution found for one or more of the packages', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0008', status: 422, description: `At least one of the packages requires a Python version that doesn't match the one used in the project scan. Make sure to select a suitable Python version from the organization Python language settings. Alternatively, add a \`.snyk\` file for Python version selection override.`, errorCode: 'SNYK-OS-PYTHON-0008', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PipNoMatchingPythonDistributionError = PipNoMatchingPythonDistributionError; /** * @class * @name InstallationFailureError * @description Some packages failed during installation due to missing system dependencies, compilation errors, or other package-specific issues. * @summary Packages installation failed * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class InstallationFailureError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Packages installation failed', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0009', status: 422, description: `Some packages failed during installation due to missing system dependencies, compilation errors, or other package-specific issues.`, errorCode: 'SNYK-OS-PYTHON-0009', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.InstallationFailureError = InstallationFailureError; /** * @class * @name PipenvUnsupportedPythonVersionError * @description At least one of the packages requires a Python version that doesn't match the one used in the project scan. * Make sure to use the correct python version in the requires section of the Pipfile. * @summary Python version not supported * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PipenvUnsupportedPythonVersionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'Python version not supported', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0010', status: 422, description: `At least one of the packages requires a Python version that doesn't match the one used in the project scan. Make sure to use the correct python version in the requires section of the Pipfile.`, errorCode: 'SNYK-OS-PYTHON-0010', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PipenvUnsupportedPythonVersionError = PipenvUnsupportedPythonVersionError; /** * @class * @name PipenvNoMatchingPythonDistributionError * @description At least one of the packages requires a Python version that doesn't match the one used in the project scan. * Make sure to use the correct python version in the requires section of the Pipfile. * @summary No matching distribution found for one or more of the packages * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PipenvNoMatchingPythonDistributionError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'No matching distribution found for one or more of the packages', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0011', status: 422, description: `At least one of the packages requires a Python version that doesn't match the one used in the project scan. Make sure to use the correct python version in the requires section of the Pipfile.`, errorCode: 'SNYK-OS-PYTHON-0011', level: 'error', classification: types_1.Classification.ACTIONABLE, instance, }, details, Object.assign({ links: [] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PipenvNoMatchingPythonDistributionError = PipenvNoMatchingPythonDistributionError; /** * @class * @name PythonDependenciesSpaceLimitExceededError * @description The total size of the downloaded Python dependencies in the manifest file exceeds the 10GB limit. * This often happens due to the large size of some of the Python dependencies and is usually the case for Python packages that require NVIDIA drivers like PyTorch. * * See more: * - [https://docs.snyk.io/supported-languages-package-managers-and-frameworks/python/git-repositories-and-python#pip-and-git-repositories](https://docs.snyk.io/supported-languages-package-managers-and-frameworks/python/git-repositories-and-python#pip-and-git-repositories) * @summary The 10 GB space limit for downloaded Python dependencies has been exceeded * @category OpenSourceEcosystems * @param {string} details the specific details that causes this error * @param {string} description the general description for this error * @param {Classification} classification the error classification determining if the error is user-actionable or not * @param {Record} [additionalData] a collection of relevant data specific to this error * @param {Error} [cause] the `Error` type that caused this error to be thrown * @param {string} [instance] the instance to use for this error. Overrides 'instance' metadata */ class PythonDependenciesSpaceLimitExceededError extends problem_error_1.ProblemError { constructor(details, additionalData, cause, instance, logs) { super({ title: 'The 10 GB space limit for downloaded Python dependencies has been exceeded', type: 'https://docs.snyk.io/scan-with-snyk/error-catalog#snyk-os-python-0012', status: 422, description: `The total size of the downloaded Python dependencies in the manifest file exceeds the 10GB limit. This often happens due to the large size of some of the Python dependencies and is usually the case for Python packages that require NVIDIA drivers like PyTorch. `, errorCode: 'SNYK-OS-PYTHON-0012', level: 'error', classification: types_1.Classification.UNSUPPORTED, instance, }, details, Object.assign({ links: [ 'https://docs.snyk.io/supported-languages-package-managers-and-frameworks/python/git-repositories-and-python#pip-and-git-repositories', ] }, additionalData), cause, logs); this.name = this.constructor.name; } } exports.PythonDependenciesSpaceLimitExceededError = PythonDependenciesSpaceLimitExceededError; //# sourceMappingURL=OpenSourceEcosystems-error-catalog.js.map