microsoft/sarif-sdk

[RULE REQUEST] Check that non-empty strings are non-empty

alexet opened this issue · 0 comments

Various parts of the spec specify non-empty strings but the validator accepts them. For example paragraphs 3.11.8, 3.11.9 and 3.11.10 (and more)

I am not sure about the metadata.

Rule metadata

  • [Id] : [Should be formatted as SARIF1nnn, leave blank if unsure]

  • Name : [Provide a friendly symbolic name for the rule in PascalCase.]

  • Level : [Possible values are: error, warning, or note.]

  • Full description : [Provide atleast two sentences. The first sentence should be a short description of the rule.
    This will appear as Short Description in rules metadata. The other sentence(s) should
    describe usage of the rule and any other relevant information.]

  • User-facing strings:
    [Each rule has one or more result message strings, each with symbolic name in PascalCase.]

    • FirstMessage : [Default user facing string.]
    • [SecondMessage] : [Optional, Any conditional user facing string(s).]
    • [ThirdMessage] : [Optional, Any conditional user facing string(s).]

Links/Additional Information

oasis-tcs/sarif-spec#543 suggests adding them to the schema so a separate rule may not be necessary if that happens.

How to resolve

Ensure that the string is non-empty