class AnalyzerDjango
- AnalyzerDjango
- AnalyzerPython
- Analyzer
- Reference
- Object
Defined in:
analyzer/analyzers/analyzer_django.crConstant Summary
-
REGEX_INCLUDE_URLS =
/include\s*\(\s*r?['"]([^'"\\]*)['"]/
-
REGEX_ROOT_URLCONF =
/\s*ROOT_URLCONF\s*=\s*r?['"]([^'"\\]*)['"]/
-
REGEX_ROUTE_MAPPING =
/(?:url|path|register)\s*\(\s*r?['"]([^"']*)['"][^,]*,\s*([^),]*)/
-
REQUEST_PARAM_FIELD_MAP =
{"GET" => {["GET"], "query"}, "POST" => {["POST"], "form"}, "COOKIES" => {nil, "cookie"}, "META" => {nil, "header"}, "data" => {["POST", "PUT", "PATCH"], "form"}}
-
REQUEST_PARAM_TYPE_MAP =
{"query" => nil, "form" => ["GET", "POST", "PUT", "PATCH"], "cookie" => nil, "header" => nil}
Instance Method Summary
- #analyze
- #get_endpoint_from_files(url : String, filepath : String, function_or_class_name : String)
- #get_endpoints(django_urls : DjangoUrls) : Array(Endpoint)
- #get_filtered_params(method : String, params : Array(Param))
- #parse_params_in_codeline(line : String, endpoint_methods : Array(String))
- #search_root_django_urls_list : Array(DjangoUrls)