File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
src/main/kotlin/com/cycode/plugin Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 44
55## [ Unreleased]
66
7+ - Fix empty IaC scan results on Windows
8+
79## [ 2.0.0] - 2024-08-20
810
911- Add support for IDEs 2024.2
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import com.cycode.plugin.cli.models.scanResult.secret.SecretScanResult
1414import com.cycode.plugin.components.toolWindow.updateToolWindowState
1515import com.cycode.plugin.sentry.SentryInit
1616import com.cycode.plugin.utils.CycodeNotifier
17+ import com.cycode.plugin.utils.isValidExistedFilePath
1718import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
1819import com.intellij.openapi.components.Service
1920import com.intellij.openapi.diagnostic.thisLogger
@@ -268,7 +269,7 @@ class CliService(private val project: Project) {
268269 // TF plans are virtual files what is not exist in the file system
269270 // "file_name": "1711298252-/Users/ilyasiamionau/projects/cycode/ilya-siamionau-payloads/tfplan.tf",
270271 // skip such detections
271- return @filter filePath.startsWith( " / " )
272+ return @filter isValidExistedFilePath(filePath )
272273 }
273274 }
274275
Original file line number Diff line number Diff line change 1+ package com.cycode.plugin.utils
2+
3+ import java.io.File
4+ import java.io.IOException
5+
6+ fun isValidExistedFilePath (path : String ): Boolean {
7+ val file = File (path)
8+ return try {
9+ file.canonicalPath
10+ file.exists()
11+ } catch (e: IOException ) {
12+ false
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments