From 5d769865fabebd4ffc138a7c27831fd908c71f1b Mon Sep 17 00:00:00 2001 From: Abdelrahman Shawki Hassan Date: Wed, 21 Aug 2024 09:29:04 +0200 Subject: [PATCH] feat: base branch selection for OSS and IaC (#513) * feat: add base branch selection for other products * chore: update changelog --- CHANGELOG.md | 3 +++ src/snyk/common/views/issueTreeProvider.ts | 6 +----- src/snyk/snykOss/providers/ossVulnerabilityTreeProvider.ts | 7 +++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7f4d5cb4..2e9502887 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Snyk Security Changelog +## [2.18.0] +- Added base branch selection for IaC and OSS + ## [2.17.0] - render IaC via Language Server diff --git a/src/snyk/common/views/issueTreeProvider.ts b/src/snyk/common/views/issueTreeProvider.ts index c5db8e10f..d16ff42df 100644 --- a/src/snyk/common/views/issueTreeProvider.ts +++ b/src/snyk/common/views/issueTreeProvider.ts @@ -180,10 +180,6 @@ export abstract class ProductIssueTreeProvider extends AnalysisTreeNodeProvid } getBaseBranch(folderPath: string): TreeNode | undefined { - const isSnykCodeProduct = (this.productService as ProductService).getSnykProductType() === ScanProduct.Code; - if (!isSnykCodeProduct) { - return; - } const deltaFindingsEnabled = this.configuration.getDeltaFindingsEnabled(); const config = this.folderConfigs.getFolderConfig(this.configuration, folderPath); @@ -318,7 +314,7 @@ export abstract class ProductIssueTreeProvider extends AnalysisTreeNodeProvid return nodes; } - private addBaseBranchNode(baseBranchNode: TreeNode | undefined, nodes: TreeNode[]) { + addBaseBranchNode(baseBranchNode: TreeNode | undefined, nodes: TreeNode[]) { if (!baseBranchNode) { return; } diff --git a/src/snyk/snykOss/providers/ossVulnerabilityTreeProvider.ts b/src/snyk/snykOss/providers/ossVulnerabilityTreeProvider.ts index 5a56acb0e..40be1cdb1 100644 --- a/src/snyk/snykOss/providers/ossVulnerabilityTreeProvider.ts +++ b/src/snyk/snykOss/providers/ossVulnerabilityTreeProvider.ts @@ -124,8 +124,14 @@ export default class OssIssueTreeProvider extends ProductIssueTreeProvider