-
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
Fix bugs when converting results to SARIF #234
Conversation
@@ -110,8 +110,13 @@ func (sc *CmdResultsSarifConverter) ParseNewTargetResults(target results.ScanTar | |||
func (sc *CmdResultsSarifConverter) createScaRun(target results.ScanTarget, errorCount int) *sarif.Run { | |||
run := sarif.NewRunWithInformationURI(ScaScannerToolName, utils.BaseDocumentationURL+"sca") | |||
run.Tool.Driver.Version = &sc.xrayVersion | |||
wd := target.Target |
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.
Just my take - not crucial - but I'd keep the name close to target (t, actualTarget, etc)
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.
Code is fine - please add an explanation to the PR desc to explain the change in the satif copy mechanism
dev
branch.go vet ./...
.go fmt ./...
.Fixing the following bugs when parsing the results to SARIF format
Duplicate [Secret in Binary found]
Uri attribute is empty on binary scan
Docker
targets (and some binaries), thetarget.Target
is a file and not a directory and we set it as thewd
of the SCA Sarig run, when we are translating the results location to relative paths it haduri=wd
which resulted in leaving empty value