From 82ecfeeed9013404a821b55a455c2f2bf0a92dcb Mon Sep 17 00:00:00 2001 From: Ankush Jain <91221068+ankush-jain-akto@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:47:33 +0530 Subject: [PATCH 1/9] Remove dep --- .../akto/dto/testing/info/NucleiTestInfo.java | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/libs/dao/src/main/java/com/akto/dto/testing/info/NucleiTestInfo.java b/libs/dao/src/main/java/com/akto/dto/testing/info/NucleiTestInfo.java index da0f3b69d2..8b13789179 100644 --- a/libs/dao/src/main/java/com/akto/dto/testing/info/NucleiTestInfo.java +++ b/libs/dao/src/main/java/com/akto/dto/testing/info/NucleiTestInfo.java @@ -1,43 +1 @@ -package com.akto.dto.testing.info; -public class NucleiTestInfo extends TestInfo { - - private String subcategory; - private String templatePath; - - public NucleiTestInfo() { - super(); - } - - public NucleiTestInfo(String subcategory, String templatePath) { - super(); - this.subcategory = subcategory; - this.templatePath = templatePath; - } - - public String getSubcategory() { - return this.subcategory; - } - - public void setSubcategory(String subcategory) { - this.subcategory = subcategory; - } - - public String getTemplatePath() { - return this.templatePath; - } - - public void setTemplatePath(String templatePath) { - this.templatePath = templatePath; - } - - @Override - public String toString() { - return "{" + - " subcategory='" + getSubcategory() + "'" + - ", templatePath='" + getTemplatePath() + "'" + - "}"; - } - - -} \ No newline at end of file From 13ed810a77eeae5e4ef89f1626bfcb1899004063 Mon Sep 17 00:00:00 2001 From: Ankush Jain <91221068+ankush-jain-akto@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:48:09 +0530 Subject: [PATCH 2/9] remove --- libs/dao/src/main/java/com/akto/DaoInit.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/dao/src/main/java/com/akto/DaoInit.java b/libs/dao/src/main/java/com/akto/DaoInit.java index aca7c4362d..738d8a606b 100644 --- a/libs/dao/src/main/java/com/akto/DaoInit.java +++ b/libs/dao/src/main/java/com/akto/DaoInit.java @@ -30,7 +30,6 @@ import com.akto.dto.test_run_findings.TestingRunIssues; import com.akto.dto.testing.*; import com.akto.dto.testing.info.BFLATestInfo; -import com.akto.dto.testing.info.NucleiTestInfo; import com.akto.dto.testing.info.TestInfo; import com.akto.dto.testing.sources.TestSourceConfig; import com.akto.dto.third_party_access.Credential; @@ -204,7 +203,6 @@ public static CodecRegistry createCodecRegistry(){ ClassModel AktoDataTypeClassModel = ClassModel.builder(AktoDataType.class).enableDiscriminator(true).build(); ClassModel testInfoClassModel = ClassModel.builder(TestInfo.class).enableDiscriminator(true).build(); ClassModel bflaTestInfoClassModel = ClassModel.builder(BFLATestInfo.class).enableDiscriminator(true).build(); - ClassModel nucleiTestInfoClassModel = ClassModel.builder(NucleiTestInfo.class).enableDiscriminator(true).build(); ClassModel accessMatrixUrlToRoleClassModel = ClassModel.builder(AccessMatrixUrlToRole.class).enableDiscriminator(true).build(); ClassModel accessMatrixTaskInfoClassModel = ClassModel.builder(AccessMatrixTaskInfo.class).enableDiscriminator(true).build(); ClassModel loaderClassModel = ClassModel.builder(Loader.class).enableDiscriminator(true).build(); @@ -255,7 +253,7 @@ public static CodecRegistry createCodecRegistry(){ cappedSetClassModel, CustomWebhookClassModel, WorkflowNodeDetailsClassModel, CustomWebhookResultClassModel, nodeResultClassModel, awsResourcesModel, AktoDataTypeClassModel, testingRunIssuesClassModel, testingIssuesIdClassModel, testSourceConfigClassModel, endpointLogicalGroupClassModel, testRolesClassModel, - logicalGroupTestingEndpointClassModel, testInfoClassModel, bflaTestInfoClassModel, nucleiTestInfoClassModel, customAuthTypeModel, + logicalGroupTestingEndpointClassModel, testInfoClassModel, bflaTestInfoClassModel, customAuthTypeModel, containsPredicateClassModel, notBelongsToPredicateClassModel, belongsToPredicateClassModel, loginFlowStepsData, accessMatrixUrlToRoleClassModel, accessMatrixTaskInfoClassModel, loaderClassModel, normalLoaderClassModel, postmanUploadLoaderClassModel, aktoGptConfigClassModel, From 9573c25f45acad98e98d7fe8165e097c35d4d72f Mon Sep 17 00:00:00 2001 From: Ankush Jain <91221068+ankush-jain-akto@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:49:05 +0530 Subject: [PATCH 3/9] remove dep --- libs/dao/src/main/java/com/akto/dto/testing/TestResult.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/libs/dao/src/main/java/com/akto/dto/testing/TestResult.java b/libs/dao/src/main/java/com/akto/dto/testing/TestResult.java index c780d721ad..39686713e9 100644 --- a/libs/dao/src/main/java/com/akto/dto/testing/TestResult.java +++ b/libs/dao/src/main/java/com/akto/dto/testing/TestResult.java @@ -27,10 +27,8 @@ public enum TestError { FAILED_TO_CONVERT_TEST_REQUEST_TO_STRING("Failed to store test", false), INSUFFICIENT_MESSAGES("Insufficient messages", false), NO_AUTH_TOKEN_FOUND("No authentication token found", false), - FAILED_DOWNLOADING_NUCLEI_TEMPLATE("Failed downloading nuclei template", false), FAILED_DOWNLOADING_PAYLOAD_FILES("Failed downloading payload files", false), FAILED_BUILDING_URL_WITH_DOMAIN("Failed building URL with domain", false), - FAILED_REPLACING_VARIABLES_IN_NUCLEI_TEMPLATE("Failed replacing variables in nuclei template", false), EXECUTION_FAILED("Test execution failed", false), INVALID_EXECUTION_BLOCK("Invalid test execution block in template", true), NO_API_REQUEST("No test requests created", false), From 7088b31d9b8ebe750c9bdae449c26e3bfd2c0042 Mon Sep 17 00:00:00 2001 From: Ankush Jain <91221068+ankush-jain-akto@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:49:43 +0530 Subject: [PATCH 4/9] remove --- .devcontainer/devcontainer.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 830832d1fe..208e2bde09 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -49,7 +49,6 @@ "commands": [ "export AKTO_MONGO_CONN=\"mongodb://localhost:27017\"", "export DASHBOARD_MODE=\"local_deploy\"", - "export NUCLEI_EXECUTABLE_PATH=apps/testing/src/main/resources/nuclei_linux", "java -jar apps/testing/target/testing-1.0-SNAPSHOT-jar-with-dependencies.jar" ] } @@ -106,7 +105,6 @@ "commands": [ "export AKTO_MONGO_CONN=\"mongodb://localhost:27017\"", "export DASHBOARD_MODE=\"local_deploy\"", - "export NUCLEI_EXECUTABLE_PATH=apps/testing/src/main/resources/nuclei_linux", "java -jar apps/testing/target/testing-1.0-SNAPSHOT-jar-with-dependencies.jar" ] } From 7d2f9e48c17e61170b2d5528828915d1f8dabeff Mon Sep 17 00:00:00 2001 From: Ankush Jain <91221068+ankush-jain-akto@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:50:26 +0530 Subject: [PATCH 5/9] remove --- .../utils/src/main/java/com/akto/testing_utils/TestingUtils.java | 1 - 1 file changed, 1 deletion(-) diff --git a/libs/utils/src/main/java/com/akto/testing_utils/TestingUtils.java b/libs/utils/src/main/java/com/akto/testing_utils/TestingUtils.java index ac38a9e8ad..4a4b2df311 100644 --- a/libs/utils/src/main/java/com/akto/testing_utils/TestingUtils.java +++ b/libs/utils/src/main/java/com/akto/testing_utils/TestingUtils.java @@ -37,7 +37,6 @@ public static Map listOfIssuesIdsFromTestingR TestSourceConfig config = null; // name = subtype String subCategory = subType; - // string comparison (nuclei test) if (subCategory.startsWith("http")) {//Issue came from custom template config = TestSourceConfigsDao.instance.getTestSourceConfig(subType); } From 29723b753710501a210eaa7c479c2873ac70f2e2 Mon Sep 17 00:00:00 2001 From: Ankush Jain <91221068+ankush-jain-akto@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:51:39 +0530 Subject: [PATCH 6/9] remove --- .../main/java/com/akto/action/testing_issues/IssuesAction.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java index dd46b8a48f..8ddc6b06a3 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing_issues/IssuesAction.java @@ -114,7 +114,6 @@ public String fetchAllIssues() { issues = TestingRunIssuesDao.instance.findAll(filters, skip,limit, sort); for (TestingRunIssues runIssue : issues) { - // string comparison (nuclei test) if (runIssue.getId().getTestSubCategory().startsWith("http")) {//TestSourceConfig case TestSourceConfig config = TestSourceConfigsDao.instance.getTestSourceConfig(runIssue.getId().getTestCategoryFromSourceConfig()); runIssue.getId().setTestSourceConfig(config); @@ -172,7 +171,6 @@ public String fetchTestingRunResult() { String testSubType = null; // ?? enum stored in db String subCategory = issue.getId().getTestSubCategory(); - // string comparison (nuclei test) if (subCategory.startsWith("http")) { testSubType = issue.getId().getTestCategoryFromSourceConfig(); } else { From 475cd9825967f275087b457a8c4cec85a8cc3eb3 Mon Sep 17 00:00:00 2001 From: Ankush Jain <91221068+ankush-jain-akto@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:52:20 +0530 Subject: [PATCH 7/9] remove --- .../views/testing/components/TestResultsDialog.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/dashboard/web/src/apps/dashboard/views/testing/components/TestResultsDialog.vue b/apps/dashboard/web/src/apps/dashboard/views/testing/components/TestResultsDialog.vue index 1d0f401f01..08f4f5ef17 100644 --- a/apps/dashboard/web/src/apps/dashboard/views/testing/components/TestResultsDialog.vue +++ b/apps/dashboard/web/src/apps/dashboard/views/testing/components/TestResultsDialog.vue @@ -100,10 +100,7 @@