Skip to content

Commit

Permalink
Fix scanning wrong directory in CA for venv (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas authored Aug 27, 2023
1 parent 6c2925a commit 43adf28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/treeDataProviders/utils/analyzerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -287,6 +288,9 @@ export class AnalyzerUtils {
let descriptorIssues: DependencyScanResults = <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<FileScanBundle, Set<string>>());
}
Expand Down

0 comments on commit 43adf28

Please sign in to comment.