Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide log deconstruction mechanism that leverages file names #211

Closed
michaelcfanning opened this issue Aug 2, 2018 · 2 comments
Closed

Comments

@michaelcfanning
Copy link
Contributor

Consider a file named MyOutput.sarif. On opening this file, a consumer could search for MyOutput.files.sarif in order to locate a 'files' table that is associated with MyOutput.sarif.

This approach would prevent the need to have SARIF properties have two types (either a URI or the property itself). We might to consider a mechanism to allow retrieving this content from the web.

Merging this idea with #210, we could also simply consider allowing the 'master' file to include a set of URLs to consult for populating the data rather than inlining the URLs:

indirectSarifDataSources
{
"files" : [ { "file:///e:/MySarif.files.sarif"}
}

@ghost
Copy link

ghost commented Aug 7, 2018

Yes, as we discussed on the phone: We would search for an element such as "run.files" in the following order:

  1. If the element is present in the SARIF file, use it.
    OTHERWISE
  2. If the SARIF file specifies a URL (or an array of URLs, if we decide to allow that) for the element, get the element from there.
    OTHERWISE
  3. If there is a resource available at a conventionally named URL, use that.
    OTHERWISE
  4. The element is missing -- and if the element is required, that's an error.

@ghost
Copy link

ghost commented Aug 25, 2018

@michaelcfanning As we discussed on the phone, this "configuration by convention" is an unnecessary complication. It also burdens consumers to probe for a conventionally named file -- which frequently won't be there -- whenever an optional, "externalizable" property is missing from a log file.

Without the configuration by convention feature, the lookup is the same as in my comment above, but without Step 3.

Closing this issue.

@ghost ghost closed this as completed Aug 25, 2018
ghost pushed a commit that referenced this issue Aug 25, 2018
ghost pushed a commit that referenced this issue Aug 25, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant