Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Provide a format for links embedded in our plain text messages #61

Copy link
Copy link
@michaelcfanning

Description

@michaelcfanning
Issue body actions

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.