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

fix(report): corrected report directory generation #3201

Merged
merged 3 commits into from
May 11, 2021

Conversation

felipe-avelar
Copy link
Contributor

@felipe-avelar felipe-avelar commented May 10, 2021

Signed-off-by: Felipe Avelar [email protected]

Closes #3158

Proposed Changes

  • If an output flag is used, now KICS creates destination folder before executing scan, so, if any problem happens, it throws error instead running scan

I submit this contribution under the Apache-2.0 license.

@felipe-avelar felipe-avelar added the bug Something isn't working label May 10, 2021
@felipe-avelar felipe-avelar added this to the Reporting milestone May 10, 2021
@felipe-avelar felipe-avelar self-assigned this May 10, 2021
@kicsbot
Copy link
Contributor

kicsbot commented May 10, 2021

Scan submitted to Checkmarx

@kicsbot
Copy link
Contributor

kicsbot commented May 10, 2021

Logo
Checkmarx SAST - Scan Summary & Details

Cx-SAST Summary

Total of 0 vulnerabilities
High 0 High
Medium 0 Medium
Low 0 Low
Info 0 Info

Violation Summary

No policy violation found

Copy link
Contributor

@rogeriopeixotocx rogeriopeixotocx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a little touch

formats = []string{filepath.Ext(outputPath)[1:]}
err := consoleHelpers.ValidateReportFormats([]string{filepath.Ext(outputPath)[1:]})
if err != nil {
log.Trace().Msgf("Not supported extension %s, will create directory instead", filepath.Ext(outputPath)[1:])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.Trace().Msgf("Not supported extension %s, will create directory instead", filepath.Ext(outputPath)[1:])
log.Trace().Msgf("Extension not supported %s, will create directory instead", filepath.Ext(outputPath)[1:])

Signed-off-by: Felipe Avelar <[email protected]>
Copy link
Contributor

@rogeriopeixotocx rogeriopeixotocx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rogeriopeixotocx rogeriopeixotocx merged commit b698b70 into master May 11, 2021
@rogeriopeixotocx rogeriopeixotocx deleted the bugfix/correct-report-directory-creation branch May 11, 2021 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid character in -o flag executes the program and then throws error
3 participants