-
Bug
-
Resolution: Unresolved
-
Major
-
plugin version 11.3.0 and jenkins 2.452.3
Sarif files are defining 2 tag uriBaseId and originalUriBaseIds to precise file path to access it.
File path = originalUriBaseIds[uriBaseId].uri + / + location.uri
uriBaseId is provided for each file location.
The recordIssues today consider the location.uri of a file from beeing relative to the root of the sarif file itself.
So that if the sarif file is not in the top folder of the source file... file are not found.
Base uri are defined that way:
"originalUriBaseIds": { "SRCROOT0": { "uri": "file:///C:/Jenkins/workspace/_Module_PCS18Z_SmartReceivers_io/CODE/SOURCE/" } },
Used and referenced by such tag:
{ "location": { "uri": "Application/Classes/ControlPanel/ControlPanel/ControlPanelListener/ControlPanelListener.c", "uriBaseId": "SRCROOT0" }, "mimeType": "text/x-c", "hashes": { "LOOKUP3-FILENAME+CONTENT": "6cf7a47a86aadbe3" } }
Today the plug is loading Application/Classes/ControlPanel/ControlPanel/ControlPanelListener/ControlPanelListener.c and does not find the file as it is not a path from the folder containing the sarif file. (sarif file is put in the build folder in our company).