From 43adf283c9b84ebf8cc70766846de6b43ea4b742 Mon Sep 17 00:00:00 2001 From: Assaf Attias <49212512+attiasas@users.noreply.github.com> Date: Sun, 27 Aug 2023 10:44:35 +0300 Subject: [PATCH] Fix scanning wrong directory in CA for venv (#400) --- src/main/treeDataProviders/utils/analyzerUtils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/treeDataProviders/utils/analyzerUtils.ts b/src/main/treeDataProviders/utils/analyzerUtils.ts index 51eeb00d2..a9160d905 100644 --- a/src/main/treeDataProviders/utils/analyzerUtils.ts +++ b/src/main/treeDataProviders/utils/analyzerUtils.ts @@ -24,6 +24,7 @@ import { Translators } from '../../utils/translators'; import { ProjectDependencyTreeNode } from '../issuesTree/descriptorTree/projectDependencyTreeNode'; import { LogManager } from '../../log/logManager'; import { Utils } from '../../utils/utils'; +import { EnvironmentTreeNode } from '../issuesTree/descriptorTree/environmentTreeNode'; export interface FileWithSecurityIssues { full_path: string; @@ -287,6 +288,9 @@ export class AnalyzerUtils { let descriptorIssues: DependencyScanResults = fileScanBundle.data; // Map information to similar directory space let spacePath: string = path.dirname(descriptorIssues.fullPath); + if (fileScanBundle instanceof EnvironmentTreeNode) { + spacePath = descriptorIssues.fullPath; + } if (!workspaceToScanBundles.has(spacePath)) { workspaceToScanBundles.set(spacePath, new Map>()); }