Skip to content

Bug: Silent SARIF file merge failure when a text properly is emply/blank #2848

@davewichers

Description

@davewichers

This is related to the situation I ran into in issue #2847, where it reports:

Required property 'text' not found in JSON. Path 'runs[0].results[0].codeFlows[0].threadFlows[0].locations[0].location.physicalLocation.region.snippet.rendered', line 101, position 44.

for a SARIF file I'm dealing with. In my case I have two such SARIF files and I'm trying to merge them together. So, I went in and manually edited both to fix them, by adding a property:

"text": "" where the missing text property was needed.

I then reran validate and they both 'pass' validation.

However, when I try to merge these two SARIF files together, it silently fails by effectively only including most of the 1st SARIF file into the resulting merge file but not the second.

To 'fix' this I had to edit them again with something like this:

"text": "dontcare" where the missing text property was needed.

I then reran the merge and it seemed to work.

So, can you either:

  1. Ideally: make it work properly, even when a property value is empty, or
  2. At least: generate an error, and don't do the merge, because it fails, and describe the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions