snyk 1.1133.0 → 1.1135.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -435,6 +435,12 @@ async function scanFiles(parsedFiles) {
435
435
  const result = policyEngine.scanFile(parsedFile);
436
436
  if (parsedFile.engineType === types_1.EngineType.Custom) {
437
437
  const { validatedResult, invalidIssues } = validateResultFromCustomRules(result);
438
+ validatedResult.violatedPolicies.forEach((policy) => {
439
+ // custom rules will have a remediation field that is a string, so we need to map it to the resolve field.
440
+ if (typeof policy.remediation === 'string') {
441
+ policy.resolve = policy.remediation;
442
+ }
443
+ });
438
444
  scannedFiles.push(validatedResult);
439
445
  failedScans = [...failedScans, ...invalidIssues];
440
446
  }