From db1d109044bdddfbdb0d34cb57dc91a6779c03a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Bokvad=20Engar=C3=A5s?= Date: Thu, 7 Sep 2023 17:33:23 +0200 Subject: [PATCH] Added error handeling for pentest and threatmodeling --- src/Pentest/PentestService.ts | 2 +- src/threatmodelingdate/ThreatModelingDate.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pentest/PentestService.ts b/src/Pentest/PentestService.ts index c17df521..4e63b7df 100644 --- a/src/Pentest/PentestService.ts +++ b/src/Pentest/PentestService.ts @@ -8,7 +8,7 @@ export class PentestService { }): Promise { console.log('Running Pentest Controls'); - if(!pentestDate.date){ + if(!pentestDate.date || pentestDate.date != "date-of-pentest"){ core.warning("Pentest Date is not set!"); return; } diff --git a/src/threatmodelingdate/ThreatModelingDate.ts b/src/threatmodelingdate/ThreatModelingDate.ts index 1849efb0..49f08c11 100644 --- a/src/threatmodelingdate/ThreatModelingDate.ts +++ b/src/threatmodelingdate/ThreatModelingDate.ts @@ -8,7 +8,7 @@ export class ThreatModelingDate{ }): Promise { console.log('Running Threat Modeling Controls'); - if(!threatModelingDate.date){ + if(!threatModelingDate.date || threatModelingDate.date != "date-of-threat-modeling"){ core.warning("Threat Modeling Date is not set!"); return; }