Subject: Change draft for #91: run.originalUriBaseIds
I’m trying to push a change draft for Issue #91, “Represent original values for uriBaseId properties”, which we agreed to in TC #9 (the face-to-face meeting). Once I overcome the problem I’m currently facing (I can’t push to GitHub), the change draft will be here:
The change is the addition of the section “originalUriBaseIds property”.
I’ll move to adopt the change at the next TC meeting.
Since I can’t push, and since the change is entirely confined to one new section, I reproduce it here. Please review:
A run object MAY contain a property named originalUriBaseIds whose value is an object, each of whose property names designates a URI base id (§3.3). The value of each property is a valid absolute URI (§3.2) which is the value of that URI base id on the machine where the SARIF producer ran.
This property allows SARIF consumers to resolve any relative URIs which appear in any URI-valued properties in the run, as long as the consumer runs either on the same machine as the producer, or on a machine with an identical file system layout. This is useful for individual developers who wish to run analysis tools and examine the results in a viewer. It is also useful for teams which share a convention for their file system layout.
When a SARIF consumer resolves a relative URI in a SARIF file, if the user has configured the consumer to use a particular value for the URI base id, the consumer SHALL use the configured value. If the file does not exist in that location, then the consumer SHALL use the value specified in the originalBaseIds property, if present. If the file does not exist at that location, the consumer MAY use other information or heuristics to locate the file.
EXAMPLE: In this example, the value of the URI base id "SRCROOT" on the machine where the SARIF producer ran was "file:///C:/src". The producer detected a result in a file whose location relative to that URI base id was "lib/memory.c". A viewer which wished to display that file would first attempt to locate it on the local file system at "C:\src\lib\memory.c". If the file did not exist at that location, the viewer might prompt the user for the location.