feat(sarif): add fix object in generated reports #1184
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Add the fix object in Kubescape generated SARIF reports to reflect the available fixes generated by Kubescape.
The fix object represents a proposed fix for the problem indicated by the Result. It specifies a set of artifacts to modify. For each artifact, it specifies regions to remove, and provides new content to insert.
Additional Information
Although there maybe no instant benefit for this addition, hopefully there will be some in the future, as I have submitted a feature request at GitHub for supporting the fix object for their Code Scanning Tool: https://github.com/orgs/community/discussions/52156
How to Test
Example yaml file and generated sarif file packed in the zip file:
test.zip
Related issues/PRs:
Here you add related issues and PRs.
If this resolved an issue, write "Resolved #
e.g. If this PR resolves issues 1 and 2, it should look as follows: