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

Clarify consumer responsibility when result.ruleIndex is absent #455

Open
ghost opened this issue Apr 2, 2020 · 4 comments
Open

Clarify consumer responsibility when result.ruleIndex is absent #455

ghost opened this issue Apr 2, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 2, 2020

Clarify that when result.ruleIndex is absent, the consumer is not expected to look up the rule metadata by means of the rule's id or its GUID (although we shouldn't prevent them from doing it).

@michaelcfanning
Copy link
Contributor

@eddynaka, do we have a validation rule that checks whether rules exist for results that do not have a ruleIndex? I think this is really the appropriate focus here.

@eddynaka
Copy link
Contributor

Hi @michaelcfanning ,

we have the rule SARIF2012, which is 'IndexPropertiesMustBeConsistentWithArrays':
https://github.com/microsoft/sarif-sdk/blob/main/src/Sarif.Multitool.Library/Rules/SARIF1009.IndexPropertiesMustBeConsistentWithArrays.cs

which would try to verify if you have a valid index.

@michaelcfanning
Copy link
Contributor

Thanks, Eddy! What's critical here is that we're clear that producers should provide this linkage between results and rules, when possible. If this is clear, we don't need to invest in providing comments/thoughts on how consumers workaround this failure.

@michaelcfanning
Copy link
Contributor

@eddynaka, I don't think the rule you mentioned is what we want. The specific condition for this issue is that there is, in fact, a rule in the rules table that matches either the rule id of the rule guid (of the reporting descriptor reference) of a result, but the result doesn't have a ruleIndex pointer to it. i.e., the producer failed to properly emit ruleIndex. Does that make sense?

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

2 participants