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 a format for links embedded in our plain text messages #61
Comments
|
If the URI in the link is referencing a SARIF file object, is it useful to show it to users? Would it be more user friendly to parse the URI and transform it into a human readable description equivalent?
|
|
I like this. For an internal SARIF file reference, this could be a preferable recommendation, I agree. For standard URLs (there's no reason someone couldn't choose to link to an external web site in the message, for example), viewers could stick with the standard URL. |
|
Here are some other URL formats that exist along these lines: BitBucket: Notes:
|
|
Fixed in c443e9a. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

We have discussed preferring/permitting markdown for representing SARIF messages. In part, we have considered this in order to support embedding links in output. As an alternate, we could simply permit embedded links in plain text messages (which could themselves follow the markdown format). This has the downside of introducing a 'mini-language' into the format. That mini-language can follow an existing standard, however (markdown). By restricting markdown use to this narrow scenario, we can also describe a way for SARIF message consumers that can't support an actual inlined link to display the content in a reasonable way. Issue #33 refers to the broad problem of formatting in messages. This issue also relates to #57, as an embedded link typically references a region in the file that is linked to.
Markdown support for links is relatively rich. For simplicity we should likely pick the smallest useful subset. One proposal would be to support the standard link text + link + link title syntax:
link text here
An example SARIF message:
A call to 'Start' may result in arbitrary code execution. The untrusted data that flows into this call site originated [here](http://somefile.cpp#startLine=10 SomeFile.cpp)
A link consumer would convert this into a clickable link. A pure plain-text viewer would parse this, trim the hover link text and render as so:
A call to 'Start' may result in arbitrary code execution. The untrusted data that flows into this call site originated here (http://somefile.cpp#startLine=10)
Additional complexities: if we define a protocol for referencing files that are stored in the object, consumers will need to potentially go locate the actual URI for the file (SARIF allows for files to be referenced by arbitrary key, to accommodate situations where there may be file name collisions)
The text was updated successfully, but these errors were encountered: