Skip to content

Commit

Permalink
fix empty vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
madflow committed Nov 14, 2024
1 parent 26702dd commit 2e37eab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions providers/slack/slack.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@
}
},
{{- end }}
{{- if (gt (len .Vulnerabilities) 40) }}
{{- if kindIs "invalid" .Vulnerabilities }}
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "_No vulnerabilities found_"
}
},
{{- else if (gt (len .Vulnerabilities) 40) }}
{
"type": "section",
"text": {
Expand Down Expand Up @@ -64,7 +72,7 @@
{
"type": "link",
"url": "{{ .PrimaryURL }}",
"text": "{{ .VulnerabilityID }}"
"text": "{{ .VulnerabilityID }} "
},
{
"type": "text",
Expand Down

0 comments on commit 2e37eab

Please sign in to comment.