-
Notifications
You must be signed in to change notification settings - Fork 24
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
Undetermined reason for undetermined contextual analysis status #155
Changes from 2 commits
d5c433a
92ed481
6563175
7e21a31
2131ae5
83ecc95
7acda7f
c65d385
58bb739
a443a30
8001482
4d3773f
61962a3
b931f91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,14 +13,16 @@ func CreateRunWithDummyResults(results ...*sarif.Result) *sarif.Run { | |
return run | ||
} | ||
|
||
func CreateRunWithDummyResultAndRuleProperties(property, value string, result *sarif.Result) *sarif.Run { | ||
func CreateRunWithDummyResultAndRuleMultipleProperties(result *sarif.Result, properties, values []string) *sarif.Run { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function name indicates that we have a function for multipleProperties, and a one for single. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok fixed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also - why did you switch the order of the args? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought it was nicer to have the arrays at the end of the function, what do you think? |
||
run := sarif.NewRunWithInformationURI("", "") | ||
if result.RuleID != nil { | ||
run.AddRule(*result.RuleID) | ||
} | ||
run.AddResult(result) | ||
run.Tool.Driver.Rules[0].Properties = make(sarif.Properties) | ||
run.Tool.Driver.Rules[0].Properties[property] = value | ||
run.Tool.Driver.Rules[0].Properties = make(sarif.Properties, len(properties)) | ||
for index, _ := range properties { | ||
barv-jfrog marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run.Tool.Driver.Rules[0].Properties[properties[index]] = values[index] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggest makeing sure that len(values)==len(properties) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. right, fixed |
||
} | ||
return run | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,7 @@ type CveRow struct { | |
type Applicability struct { | ||
Status string `json:"status"` | ||
ScannerDescription string `json:"scannerDescription,omitempty"` | ||
UndeterminedReason string `json:"undeterminedReason,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where do we use it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is only in simple-json, and it is under CveRow (CveRow has Applicability struct as one of its components, it gets printed automatically) |
||
Evidence []Evidence `json:"evidence,omitempty"` | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function split is positive overall - but I don't see any other usage for
GetRuleProperty
, so in that case, I don't see a reason for the dedicated fucntion.Couldn't we use it for the applicability status itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use it for applicability status as it is also received in the Rule property. Do you want me to change applicability fetch to this function ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - otherwise the usage of the this generic function just one misses the point IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please do use the new
GetRuleProperty
when applicable. but theGetRuleUndeterminedReason
does not belong here. please move it tojasutils
package.This files is only for utils to access, create or set values in sarif