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

Add a notice for scan was incomplete #8

Merged
merged 2 commits into from
May 28, 2019

Conversation

shin1x1
Copy link
Contributor

@shin1x1 shin1x1 commented May 24, 2019

No description provided.

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)
Copy link
Member

Choose a reason for hiding this comment

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

@shin1x1 スキャン時間が足りない場合ではありますが、脆弱性は0件であるため、この場合は SUCCESS_EXIT にしてもらえますか

Copy link
Contributor Author

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 にするのはどうでしょうか。

Copy link
Member

Choose a reason for hiding this comment

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

@shin1x1 確かにWarningとは違いますね。Noticeでお願いします。

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.")
Copy link
Member

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を表示。

}

func postSlackIncompleteWarning(fqdn string, scanID string, scanResultURL string) {
title := "VAddy Scan was incomplete Warning!!!\n"
Copy link
Member

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を表示。

Copy link
Member

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" でお願いします

@shin1x1 shin1x1 marked this pull request as ready for review May 27, 2019 09:43
@shin1x1 shin1x1 changed the title Add a warning when scan was incomplete Add a notice for scan was incomplete May 27, 2019
@ichikaway ichikaway merged commit 9ca3d33 into vaddy:master May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants