Skip to content

Commit 204ed31

Browse files
committed
feat: include finding id in slack message
1 parent d2fb852 commit 204ed31

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

internal/events/finding.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ func (shf *SecurityHubV2Finding) SlackMessage(consoleURL, accessPortalURL, acces
161161
details := slack.NewSectionBlock(nil, detailFields, nil)
162162
blocks = append(blocks, details)
163163

164+
findingIDSection := slack.NewSectionBlock(
165+
slack.NewTextBlockObject("mrkdwn", fmt.Sprintf("*Finding ID*\n`%s`", shf.Metadata.UID), false, false),
166+
nil, nil,
167+
)
168+
blocks = append(blocks, findingIDSection)
169+
164170
if len(shf.Resources) > 0 {
165171
resource := shf.Resources[0]
166172
var resourceFields []*slack.TextBlockObject

0 commit comments

Comments
 (0)