Skip to content

Commit

Permalink
added test cases and report upload module
Browse files Browse the repository at this point in the history
  • Loading branch information
anandtiwarics committed Aug 12, 2021
1 parent a8d906f commit 1b63e07
Show file tree
Hide file tree
Showing 41 changed files with 2,248 additions and 1,382 deletions.
57 changes: 34 additions & 23 deletions archeryapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
from lxml import etree
from rest_framework import status
from rest_framework.parsers import FormParser, MultiPartParser
from rest_framework.permissions import (AllowAny, BasePermission,
IsAuthenticated)
from rest_framework.permissions import AllowAny, BasePermission, IsAuthenticated
from rest_framework.renderers import TemplateHTMLRenderer
from rest_framework.response import Response
from rest_framework.views import APIView
Expand All @@ -36,29 +35,41 @@
from compliance.models import DockleScanDb, InspecScanDb
from networkscanners.models import NetworkScanDb, NetworkScanResultsDb
from projects.models import MonthDb, ProjectDb
from projects.serializers import (ProjectCreateSerializers,
ProjectDataSerializers)
from scanners.scanner_parser.compliance_parser import (dockle_json_parser,
inspec_json_parser)
from scanners.scanner_parser.network_scanner import (Nessus_Parser,
OpenVas_Parser)
from projects.serializers import ProjectCreateSerializers, ProjectDataSerializers
from scanners.scanner_parser.compliance_parser import (
dockle_json_parser,
inspec_json_parser,
)
from scanners.scanner_parser.network_scanner import Nessus_Parser, OpenVas_Parser
from scanners.scanner_parser.staticscanner_parser import (
brakeman_json_report_parser, checkmarx_xml_report_parser,
clair_json_report_parser, dependencycheck_report_parser,
findbugs_report_parser, gitlab_container_json_report_parser,
gitlab_sast_json_report_parser, gitlab_sca_json_report_parser,
nodejsscan_report_json, npm_audit_report_json, semgrep_json_report_parser,
tfsec_report_parser, trivy_json_report_parser,
twistlock_json_report_parser, whitesource_json_report_parser)
from scanners.scanner_parser.staticscanner_parser.bandit_report_parser import \
bandit_report_json
brakeman_json_report_parser,
checkmarx_xml_report_parser,
clair_json_report_parser,
dependencycheck_report_parser,
findbugs_report_parser,
gitlab_container_json_report_parser,
gitlab_sast_json_report_parser,
gitlab_sca_json_report_parser,
nodejsscan_report_json,
npm_audit_report_json,
semgrep_json_report_parser,
tfsec_report_parser,
trivy_json_report_parser,
twistlock_json_report_parser,
whitesource_json_report_parser,
)
from scanners.scanner_parser.staticscanner_parser.bandit_report_parser import (
bandit_report_json,
)
from scanners.scanner_parser.tools.nikto_htm_parser import nikto_html_parser
from scanners.scanner_parser.web_scanner import (acunetix_xml_parser,
arachni_xml_parser,
burp_xml_parser,
netsparker_xml_parser,
webinspect_xml_parser,
zap_xml_parser)
from scanners.scanner_parser.web_scanner import (
acunetix_xml_parser,
arachni_xml_parser,
burp_xml_parser,
netsparker_xml_parser,
webinspect_xml_parser,
zap_xml_parser,
)
from staticscanners.models import StaticScanResultsDb, StaticScansDb
from tools.models import NiktoResultDb
from user_management import permissions
Expand Down
1 change: 1 addition & 0 deletions archerysecurity/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"jiraticketing",
"tools",
"pentest",
"report_upload",
"django.contrib.admin",
"stronghold",
"django.contrib.auth",
Expand Down
8 changes: 6 additions & 2 deletions archerysecurity/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from rest_framework_jwt.views import (obtain_jwt_token, refresh_jwt_token,
verify_jwt_token)
from rest_framework_jwt.views import (
obtain_jwt_token,
refresh_jwt_token,
verify_jwt_token,
)

urlpatterns = [
path("admin/", admin.site.urls),
Expand Down Expand Up @@ -59,6 +62,7 @@
path("archerysec/api/v1/auth/", include("authentication.urls")),
path("auth/", include("authentication.urls")),
path("users/", include("user_management.urls")),
path("report-upload/", include("report_upload.urls")),
]

urlpatterns = urlpatterns + static(
Expand Down
8 changes: 6 additions & 2 deletions archerysettings/load_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@

from django.core import signing

from archerysettings.models import (BurpSettingDb, NmapVulnersSettingDb,
OpenvasSettingDb, ZapSettingsDb)
from archerysettings.models import (
BurpSettingDb,
NmapVulnersSettingDb,
OpenvasSettingDb,
ZapSettingsDb,
)


class ArcherySettings:
Expand Down
11 changes: 8 additions & 3 deletions archerysettings/save_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@

from django.core import signing

from archerysettings.models import (ArachniSettingsDb, BurpSettingDb, EmailDb,
NmapVulnersSettingDb, OpenvasSettingDb,
ZapSettingsDb)
from archerysettings.models import (
ArachniSettingsDb,
BurpSettingDb,
EmailDb,
NmapVulnersSettingDb,
OpenvasSettingDb,
ZapSettingsDb,
)


class SaveSettings:
Expand Down
36 changes: 21 additions & 15 deletions archerysettings/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,34 @@

import PyArachniapi
from archerysettings import load_settings
from archerysettings.models import (ArachniSettingsDb, EmailDb,
NmapVulnersSettingDb, SettingsDb,
ZapSettingsDb)
from archerysettings.models import (
ArachniSettingsDb,
EmailDb,
NmapVulnersSettingDb,
SettingsDb,
ZapSettingsDb,
)
from jiraticketing.models import jirasetting
from projects.models import ProjectDb
from scanners.scanner_parser.staticscanner_parser import (
checkmarx_xml_report_parser, dependencycheck_report_parser,
findbugs_report_parser)
checkmarx_xml_report_parser,
dependencycheck_report_parser,
findbugs_report_parser,
)
from scanners.scanner_parser.tools.nikto_htm_parser import nikto_html_parser
from scanners.scanner_parser.web_scanner import (acunetix_xml_parser,
arachni_xml_parser,
burp_xml_parser,
netsparker_xml_parser,
webinspect_xml_parser,
zap_xml_parser)
from scanners.scanner_plugin.network_scanner.openvas_plugin import \
OpenVAS_Plugin
from scanners.scanner_parser.web_scanner import (
acunetix_xml_parser,
arachni_xml_parser,
burp_xml_parser,
netsparker_xml_parser,
webinspect_xml_parser,
zap_xml_parser,
)
from scanners.scanner_plugin.network_scanner.openvas_plugin import OpenVAS_Plugin
from scanners.scanner_plugin.web_scanner import burp_plugin, zap_plugin
from staticscanners.models import StaticScansDb
from tools.models import NiktoResultDb
from webscanners.models import (WebScansDb, cookie_db, excluded_db,
task_schedule_db)
from webscanners.models import WebScansDb, cookie_db, excluded_db, task_schedule_db
from webscanners.zapscanner.views import launch_schudle_zap_scan

setting_file = os.getcwd() + "/" + "apidata.json"
Expand Down
Loading

0 comments on commit 1b63e07

Please sign in to comment.