Created
June 12, 2025 09:16
-
-
Save binaryoverload/a87d243a41eab0749f64adfea964d1ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "type":"message", | |
| "attachments":[ | |
| { | |
| "contentType":"application/vnd.microsoft.card.adaptive", | |
| "contentUrl":"{{ baseUrl }}/projects/{{ subject.project.uuid | escape(strategy='json') }}", | |
| "content":{ | |
| "type": "AdaptiveCard", | |
| "body": [ | |
| { | |
| "type": "TextBlock", | |
| "size": "Medium", | |
| "weight": "Bolder", | |
| "text": "{{ notification.title | escape(strategy="json") }}", | |
| "wrap": true | |
| }, | |
| { | |
| "type": "ColumnSet", | |
| "columns": [ | |
| { | |
| "type": "Column", | |
| "items": [ | |
| { | |
| "type": "Image", | |
| "style": "Person", | |
| "url": "https://raw.githubusercontent.com/DependencyTrack/branding/master/dt-logo-symbol-blue-background.png", | |
| "altText": "DependencyTrack", | |
| "size": "Small" | |
| } | |
| ], | |
| "width": "auto" | |
| }, | |
| { | |
| "type": "Column", | |
| "items": [ | |
| { | |
| "type": "TextBlock", | |
| "weight": "Bolder", | |
| "text": "DependencyTrack", | |
| "wrap": true | |
| }, | |
| { | |
| "type": "TextBlock", | |
| "spacing": "None", | |
| "text": "{{ timestamp }}", | |
| "isSubtle": true, | |
| "wrap": true | |
| } | |
| ], | |
| "width": "stretch" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "TextBlock", | |
| "text": "{{ notification.content | escape(strategy="json") }}", | |
| "wrap": true | |
| }, | |
| {% if notification.group == "NEW_VULNERABILITY" %} | |
| { | |
| "type": "FactSet", | |
| "facts": [ | |
| { | |
| "title": "Project:", | |
| "value": "{{ subject.component.project.toString | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Component:", | |
| "value": "{{ subject.component.name | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Version:", | |
| "value": "{{ subject.component.version | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Severity:", | |
| "value": "{{ subject.vulnerability.severity | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "VulnId:", | |
| "value": "{{ subject.vulnerability.vulnId | escape(strategy="json") }}" | |
| } | |
| ] | |
| } | |
| {% elseif notification.group == "NEW_VULNERABLE_DEPENDENCY" %} | |
| { | |
| "type": "FactSet", | |
| "facts": [ | |
| { | |
| "title": "Project:", | |
| "value": "{{ subject.component.project.toString | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Component:", | |
| "value": "{{ subject.component.name | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Version:", | |
| "value": "{{ subject.component.version | escape(strategy="json") }}" | |
| } | |
| ] | |
| } | |
| {% elseif notification.group == "POLICY_VIOLATION" %} | |
| { | |
| "type": "FactSet", | |
| "facts": [ | |
| { | |
| "title": "Project:", | |
| "value": "{{ subject.component.project.toString | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Component:", | |
| "value": "{{ subject.component.name | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Version:", | |
| "value": "{{ subject.component.version | escape(strategy="json") }}" | |
| } | |
| ] | |
| } | |
| {% elseif notification.group == "BOM_PROCESSING_FAILED" %} | |
| { | |
| "type": "FactSet", | |
| "facts": [ | |
| { | |
| "title": "Project:", | |
| "value": "{{ subject.component.project.toString | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Component:", | |
| "value": "{{ subject.component.toString | escape(strategy="json") }}" | |
| }, | |
| { | |
| "title": "Version:", | |
| "value": "{{ subject.component.version | escape(strategy="json") }}" | |
| } | |
| ] | |
| } | |
| {% endif %} | |
| ], | |
| "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", | |
| "version": "1.4" | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment