jfrog / jfrog-vscode-extension

JFrog VS-Code Extension
https://jfrog.github.io/jfrog-vscode-extension
Apache License 2.0
189 stars 32 forks source link

Fix - character must be non-negative in JAS issues with a location value of 0 #472

Closed attiasas closed 2 months ago

attiasas commented 3 months ago
[ERR - 18:12:36] Error: Illegal argument: character must be non-negative

There is a different mapping that vscode expects as positions at file. For vscode the minimum value (i.e first row/col) is 0 while the results mapped to it is 1 from the scanners.

Fixing a bug that occurs when issues discovered at JAS scans (CA and secrets) have a location with row/col 0:

"region": {
      "snippet": {
             "text": "*******"
      },
      "endColumn": 0,
      "endLine": 3,
      "startColumn": 0,
      "startLine": 3
},