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
feat(report): CERT notification to slack #767
feat(report): CERT notification to slack #767
Conversation
@kazuminn Please paste the test result. |
@kotakanbe I tested it with the following pattern in the test.
|
report/slack.go
Outdated
if len(jpalert) != 0 && len(usalert) == 0 { | ||
certAlert = fmt.Sprintf("<%s|JPCERT>", jpalert) | ||
} else if len(usalert) != 0 && len(jpalert) == 0 { | ||
certAlert = fmt.Sprintf("<%s|USCERT", usalert) |
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.
return fmt.Sprintf("*%4.1f (%s)* %s %s\n%s\n```\n%s\n```%s\n%s\n", | ||
certAlert := "" | ||
var jpalert string | ||
for _, ja := range vinfo.AlertDict.Ja { |
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.
Sometimes, one CVE has multiple alerts.
Your code overwrites the alert, so your code can not show multiple alerts.
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.
Fixes #742
What did you implement:
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Checklist:
You don't have to satisfy all of the following.
make fmt
make test
***Is this ready for review?:***YES
Reference