-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: fake ignore findings [IDE-176] #8
Conversation
Properties SuppressionProperties `json:"properties"` | ||
} | ||
|
||
type SuppressionProperties struct { |
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 want the response returned by the SARIF to match what's in the designs, since it might also get printed by the CLI: https://www.figma.com/file/hcI2QHUtHfcIjgrpYlMqff/Holistic-Ignores?type=design&node-id=773-49520&mode=design&t=RrNM0S3glyhiAJUT-0
sarif_types.go
Outdated
} | ||
|
||
type SuppressionProperties struct { | ||
Category string `json:"category"` |
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.
What's this? Does it map to reasonType: WONT_FIX|NOT_VULNERABLE|TEMPORARY_IGNORE
?
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.
Yep that's it. I originally had it as reasonType
but I wanted it to match what we're meant to render in the CLI/IDEs. We could also leave it up to the CLI/IDE to translate these fields but I'd rather do it all in one place
369ff3f
to
1a92073
Compare
|
||
type IgnoredBy struct { | ||
Name string `json:"name"` | ||
Email *string `json:"email"` |
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.
Pointer to allow for nullability?
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.
Yep I based it off the Output
in https://snyksec.atlassian.net/wiki/spaces/RD/pages/1898152058/SDK+for+calculating+Code+Ignores+on+Findings. Maybe I ought to make Expiration
a pointer too
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.
Looks good, only minor stuff.
63e99d7
to
a756a5a
Compare
a756a5a
to
2122798
Compare
2122798
to
fcf5ccb
Compare
We have agreed with Analysis and the CLI on what the Analysis API will return.
This PR updates the existing fake SARIF response for scanning to include ignores for one of the results, so that we can do development in the IDEs.
Ticket: https://snyksec.atlassian.net/browse/IDE-176
Tested it with snyk/snyk-ls#464 and snyk/snyk-intellij-plugin#490 and without those changes, to make sure it's still backwards compatible.