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: [sarif] recommendedArtifactDisplayBase


An even simpler change requiring no schema change would be to simply 
document that a originalUriBaseId named DISPLAYBASE (or some other name) 
is used for this purpose.  If the value is set consumers SHOULD 
interpret it as a hint to display URIs relative to to the DISPLAYBASE 
uriBaseId.  Checking if the path is contained in DISPLAYBASE should be 
done after resolving the DISPLAYBASE uri and the uri to display using 
the algorithm in 3.14.14.  If the URI to display's scheme, authority and 
the initial prefix of path segments matches the DISPLAYBASE, only 
display the remaining path segments (or '.' if there are no remaining 
segments).  If there is not a match, display the URI as an absolute URI 
(or some other appropriate method).

Producers should not use DISPLAYBASE as a uriBaseId in artifactLocations 
as this allows a result management system, or translator to set or 
change the value after the fact without having to change all uses of 
DISPLAYBASE.

Jim



On 4/24/19 4:24 PM, James Kupsch wrote:
> Sorry for the late small proposal, but I've been thinking about a
> generic SARIF viewer and how to display paths to a human.  In a viewer
> it is nice to normalize the display for paths to be relative to a single
> location, or to be absolute for location not contained within the single
> location.
> 
> Without the viewer and the producer agreeing out of band on a uri, or a
> baseUriId name to use, the viewer does not know how to base the results
> for result display.
> 
> I propose adding a property name something like
> recommendedArtifactDisplayBase to the run object with a value of type
> artifactLocation.  Producers MAY set this to an appropriate value if
> possible.  If set, consumers that display relative paths, SHOULD display
> paths to relative to the recommendedArtifactDisplayBase if the path is
> contained in the recommendedArtifactDisplayBase.  If it is not contained
> in recommendedArtifactDisplayBase, viewer may display it as an absolute
> path (or by some other appropriate mechanism).
> 
> Jim
> 


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