Skip to content

Add option to configure notifications based on severity level #1235

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Level",
"notifications": "Benachrichtigungen",
"notification_severity": "Benachrichtigung bei Schweregrad auslösen",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "OSV-Basis-URL",
"welcome_message": "Willkommensnachricht",
"welcome_message_desc": "Passen Sie die Willkommensnachricht an, die auf der Startseite von Dependency-Track angezeigt wird, bevor sich Benutzer anmelden.",
"welcome_message_enable": "Willkommensnachricht aktivieren"
"welcome_message_enable": "Willkommensnachricht aktivieren",
"trigger_notifications_on_severities": "Auslöserbenachrichtigungen über die Schweregrad auslösen"
},
"condition": {
"forbidden": "Verboten (403)",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@
"templates": "Templates",
"test_notification_queued": "A test notification has been queued",
"token": "Token",
"trigger_notifications_on_severities": "Trigger notifications on CVE-severities",
"trivy": "Trivy",
"url": "URL",
"user_created": "User created",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Nivel de notificación",
"notifications": "Notificaciones",
"notification_severity": "Activar notificación según la gravedad",
"npm": "MNP",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "URL base de OSV",
"welcome_message": "Mensaje de bienvenida",
"welcome_message_desc": "Personalice el mensaje de bienvenida que aparece en la página de inicio de Dependency-Track antes de que los usuarios inicien sesión.",
"welcome_message_enable": "Habilitar mensaje de bienvenida"
"welcome_message_enable": "Habilitar mensaje de bienvenida",
"trigger_notifications_on_severities": "Notificaciones de activación sobre gravedades"
},
"condition": {
"forbidden": "Prohibido (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Niveau d'alerte",
"notifications": "Notifications",
"notification_severity": "déclencher une notification sur la gravité",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "URL de base OSV",
"welcome_message": "Message de bienvenue",
"welcome_message_desc": "Personnalisez le message de bienvenue qui apparaît sur la page de démarrage de Dependency-Track avant que les utilisateurs ne se connectent.",
"welcome_message_enable": "Activer le message de bienvenue"
"welcome_message_enable": "Activer le message de bienvenue",
"trigger_notifications_on_severities": "Déclencher des notifications sur les graves"
},
"condition": {
"forbidden": "Interdit (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "अधिसूचना स्तर",
"notifications": "सूचनाएं",
"notification_severity": "गंभीरता के आधार पर अधिसूचना ट्रिगर करें",
"npm": "NPM",
"nuget": "नुगेट",
"nvd": "एनवीडी",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "OSV बेस यूआरएल",
"welcome_message": "स्वागत संदेश",
"welcome_message_desc": "उपयोगकर्ताओं के साइन इन करने से पहले डिपेंडेंसी-ट्रैक के आरंभ पृष्ठ पर दिखाई देने वाले स्वागत संदेश को अनुकूलित करें।",
"welcome_message_enable": "स्वागत संदेश सक्षम करें"
"welcome_message_enable": "स्वागत संदेश सक्षम करें",
"trigger_notifications_on_severities": "गंभीरता पर सूचनाएं ट्रिगर करें"
},
"condition": {
"forbidden": "निषिद्ध (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Livello di notifica",
"notifications": "Notifiche",
"notification_severity": "Attiva notifica in base alla gravità",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "URL di base OSV",
"welcome_message": "Messaggio di benvenuto",
"welcome_message_desc": "Personalizza il messaggio di benvenuto che appare nella pagina iniziale di Dependency-Track prima che gli utenti accedano.",
"welcome_message_enable": "Abilita il messaggio di benvenuto"
"welcome_message_enable": "Abilita il messaggio di benvenuto",
"trigger_notifications_on_severities": "Innescare notifiche sulle gravità"
},
"condition": {
"forbidden": "Proibito (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "通知レベル",
"notifications": "通知",
"notification_severity": "重大度に応じて通知をトリガーする",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "OSV ベース URL",
"welcome_message": "ウェルカムメッセージ",
"welcome_message_desc": "ユーザーがサインインする前に、Dependency-Track の開始ページに表示されるウェルカム メッセージをカスタマイズします。",
"welcome_message_enable": "ウェルカムメッセージを有効にする"
"welcome_message_enable": "ウェルカムメッセージを有効にする",
"trigger_notifications_on_severities": "重大度に関するトリガー通知"
},
"condition": {
"forbidden": "禁止 (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Poziom powiadomień",
"notifications": "Powiadomienia",
"notification_severity": "Wyzwól powiadomienie w zależności od poziomu zagrożenia",
"npm": "NPM",
"nuget": "NuGeta",
"nvd": "NWD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "Podstawowy adres URL OSV",
"welcome_message": "Wiadomość powitalna",
"welcome_message_desc": "Dostosuj wiadomość powitalną wyświetlaną na stronie początkowej funkcji Depency-Track przed zalogowaniem się użytkownika.",
"welcome_message_enable": "Włącz wiadomość powitalną"
"welcome_message_enable": "Włącz wiadomość powitalną",
"trigger_notifications_on_severities": "Powiadomienia o wyzwalaniu o surowościach"
},
"condition": {
"forbidden": "Zabronione (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Nível de notificação",
"notifications": "Notificações",
"notification_severity": "Acionar notificação com base na gravidade",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "URL base do OSV",
"welcome_message": "Mensagem de boas-vindas",
"welcome_message_desc": "Personalize a mensagem de boas-vindas que aparece na página inicial do Dependency-Track antes dos usuários fazerem login.",
"welcome_message_enable": "Ativar mensagem de boas-vindas"
"welcome_message_enable": "Ativar mensagem de boas-vindas",
"trigger_notifications_on_severities": "Acionar notificações sobre severidades"
},
"condition": {
"forbidden": "Proibido (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Nível de notificação",
"notifications": "Notificações",
"notification_severity": "Acionar notificação com base na gravidade",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "URL base do OSV",
"welcome_message": "Mensagem de boas-vindas",
"welcome_message_desc": "Personalize a mensagem de boas-vindas que aparece na página inicial do Dependency-Track antes dos usuários fazerem login.",
"welcome_message_enable": "Ativar mensagem de boas-vindas"
"welcome_message_enable": "Ativar mensagem de boas-vindas",
"trigger_notifications_on_severities": "Acionar notificações sobre severidades"
},
"condition": {
"forbidden": "Proibido (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Уровень уведомления",
"notifications": "Уведомления",
"notification_severity": "Запуск уведомления в зависимости от степени тяжести",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "Базовый URL OSV",
"welcome_message": "Приветственное сообщение",
"welcome_message_desc": "Настройте приветственное сообщение, которое отображается на стартовой странице Dependency-Track перед входом пользователей.",
"welcome_message_enable": "Включить приветственное сообщение"
"welcome_message_enable": "Включить приветственное сообщение",
"trigger_notifications_on_severities": "Запустить уведомления о тяжести"
},
"condition": {
"forbidden": "Запрещено (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/uk-UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "Рівень сповіщення",
"notifications": "Сповіщення",
"notification_severity": "Запустити сповіщення залежно від ступеня серйозності",
"npm": "НПМ",
"nuget": "NuGet",
"nvd": "НВД",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "Базовий URL OSV",
"welcome_message": "Вітальне повідомлення",
"welcome_message_desc": "Налаштуйте вітальне повідомлення, яке з’являється на початковій сторінці Dependency-Track перед входом користувачів.",
"welcome_message_enable": "Увімкнути вітальне повідомлення"
"welcome_message_enable": "Увімкнути вітальне повідомлення",
"trigger_notifications_on_severities": "Тригерні сповіщення про суворість"
},
"condition": {
"forbidden": "Заборонено (403)",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"nixpkgs": "Nixpkgs",
"notification_level": "通知级别",
"notifications": "通知",
"notification_severity": "根据严重性触发通知",
"npm": "NPM",
"nuget": "NuGet",
"nvd": "NVD",
Expand Down Expand Up @@ -303,7 +304,8 @@
"vulnsource_osv_base_url": "OSV 基本 URL",
"welcome_message": "欢迎辞",
"welcome_message_desc": "自定义用户登录前 Dependency-Track 起始页上显示的欢迎消息。",
"welcome_message_enable": "启用欢迎消息"
"welcome_message_enable": "启用欢迎消息",
"trigger_notifications_on_severities": "触发严重性通知"
},
"condition": {
"forbidden": "禁止 (403)",
Expand Down
17 changes: 17 additions & 0 deletions src/views/administration/notifications/Alerts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,21 @@ export default {
<div class="list-group-item"><b-form-checkbox value="USER_DELETED">USER_DELETED</b-form-checkbox></div>
</b-form-checkbox-group>
</div>
<div style="text-align:left">
<b-form-group v-if="this.scope === 'PORTFOLIO' && (notifyOn.includes('NEW_VULNERABILITY') || notifyOn.includes('NEW_VULNERABLE_DEPENDENCY'))"
id="fieldset-7" :label="this.$t('admin.trigger_notifications_on_severities')" label-for="input-7">
<div class="list-group">
<b-form-checkbox-group id="checkbox-group-severities" v-model="notifySeverities">
<div class="list-group-item"><b-form-checkbox value="LOW">LOW_SEVERITY</b-form-checkbox></div>
<div class="list-group-item"><b-form-checkbox value="MEDIUM">MEDIUM_SEVERITY</b-form-checkbox></div>
<div class="list-group-item"><b-form-checkbox value="HIGH">HIGH_SEVERITY</b-form-checkbox></div>
<div class="list-group-item"><b-form-checkbox value="CRITICAL">CRITICAL_SEVERITY</b-form-checkbox></div>
<div class="list-group-item"><b-form-checkbox value="INFO">INFO_SEVERITY</b-form-checkbox></div>
<div class="list-group-item"><b-form-checkbox value="UNASSIGNED">UNASSIGNED_SEVERITY</b-form-checkbox></div>
</b-form-checkbox-group>
</div>
</b-form-group>
</div>
</b-form-group>
<p v-show="isScheduled && (notifyOn.includes('NEW_POLICY_VIOLATIONS_SUMMARY') || notifyOn.includes('NEW_VULNERABILITIES_SUMMARY'))" class="font-sm text-warning">
<span class="fa fa-warning"></span> {{ $t('admin.alert_schedule_summary_warning') }}
Expand Down Expand Up @@ -280,6 +295,7 @@ export default {
jiraTicketType: this.parseJiraTicketType(row),
scope: row.scope,
notifyOn: row.notifyOn,
notifySeverities: row.notifySeverities,
projects: row.projects,
teams: row.teams,
scheduleLastTriggeredAt: common.formatTimestamp(
Expand Down Expand Up @@ -407,6 +423,7 @@ export default {
tokenHeader: this.tokenHeader,
}),
notifyOn: this.notifyOn,
notifySeverities: this.notifySeverities,
tags: this.tags.map((tag) => {
return { name: tag.text };
}),
Expand Down