OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sarif message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: Change draft for #91: run.originalUriBaseIds


Ok, problem solved. I pushed the change draft to:

 

                Documents/ChangeDrafts/sarif-v2.0-issue-91-originalUriBaseIds.docx

 

Thanks!

Larry

 

From: Larry Golding (Comcast) [mailto:larrygolding@comcast.net]
Sent: Thursday, February 22, 2018 5:28 PM
To: 'sarif@lists.oasis-open.org' <sarif@lists.oasis-open.org>
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:

 

Documents/ChangeDrafts/sarif-v2.0-issues-91-original-uriBaseIds.docx

 

The change is the addition of the section “originalUriBaseIds property”.

 

I’ll move to adopt the change at the next TC meeting.

 

Thanks,

Larry                                                             

 

Since I can’t push, and since the change is entirely confined to one new section, I reproduce it here. Please review:

 

3.2.10                originalUriBaseIds property

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.

{

  "runs": [

    {

      "originalBaseIds": {

        "SRCROOT": "file:///C:/src"

      },

 

      "results": [

        {

          "ruleId": "CA1001",

          "locations": [

            {

              "analysisTarget": {

                "uri": "lib/memory.c",

                "uriBaseId": "SRCROOT"

              }

            }

          ]

        }

      ]

    }

  ]

}

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]