-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add a notice for scan was incomplete #8
Add a notice for scan was incomplete #8
Conversation
src/vaddy/vaddy.go
Outdated
os.Exit(ERROR_EXIT) | ||
} else if scan_result.IsIncomplete() { | ||
fmt.Println("Warning! Scan timed out. \nNo vulnerabilities.") | ||
postSlackIncompleteWarning(fqdn, scan_id, scan_result.ScanResultUrl) | ||
os.Exit(ERROR_EXIT) |
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.
@shin1x1 スキャン時間が足りない場合ではありますが、脆弱性は0件であるため、この場合は SUCCESS_EXIT
にしてもらえますか
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.
@ichikaway 脆弱性がある場合もメッセージが Warning
となっており、同じ Warning
でも理由によって、exit code が変わるのは混乱するように思いました。
例えば、スキャン未完了時はメッセージを Warning
ではなく、Notice
にするのはどうでしょうか。
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.
@shin1x1 確かにWarningとは違いますね。Notice
でお願いします。
src/vaddy/vaddy.go
Outdated
postSlackVulnerabilitiesWarning(scan_result.AlertCount, fqdn, scan_id, scan_result.ScanResultUrl) | ||
os.Exit(ERROR_EXIT) | ||
} else if scan_result.IsIncomplete() { | ||
fmt.Println("Warning! Scan timed out. \nNo vulnerabilities.") |
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.
@shin1x1 "Warning! Scan was NOT complete (95%). \nNo vulnerabilities."
にしてもらえますか。95%の箇所はレスポンスのJSONにあるCompleteを表示。
src/vaddy/vaddy.go
Outdated
} | ||
|
||
func postSlackIncompleteWarning(fqdn string, scanID string, scanResultURL string) { | ||
title := "VAddy Scan was incomplete Warning!!!\n" |
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.
@shin1x1 "VAddy Scan was NOT complete (95%). Warning!!!\n"
にしてもらえますか。95%の箇所はレスポンスのJSONにあるCompleteを表示。
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.
@shin1x1 "Notice: VAddy Scan was NOT complete (95%). \n"
でお願いします
No description provided.