Showing 195 of 515 total issues
Avoid too many return
statements within this function. Open
return ["X-Content-Type-Options Header", INFORMATIONAL];
Avoid too many return
statements within this function. Open
return ["Identified Software", INFORMATIONAL];
Avoid too many return
statements within this function. Open
return ["Path Traversal", HIGH];
Avoid too many return
statements within this function. Open
return createAutomountedServiceAccountTokenFinding(finding);
Avoid too many return
statements within this function. Open
return "traditional-md"
Avoid too many return
statements within this function. Open
return createMissingNetworkPolicyFinding(finding);
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
return ["Nikto Finding", INFORMATIONAL];
Avoid too many return
statements within this function. Open
return "traditional-html-plus"
Avoid too many return
statements within this function. Open
return ["Identified Software", INFORMATIONAL];
Avoid too many return
statements within this function. Open
return ["Potential Vulnerability", HIGH];
Avoid too many return
statements within this function. Open
return "traditional-html"
Avoid too many return
statements within this function. Open
return ["Outdated Software", MEDIUM];
Avoid too many return
statements within this function. Open
return 3
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return None
Avoid too many return
statements within this function. Open
return configuration
Function parse
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async function parse(scanResults) {
if (typeof (scanResults) === "string") // empty file
return [];
const wpscanVersion = scanResults.banner.version;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function configure_contexts
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def configure_contexts(self):
"""Configures the ZAP instance with the given list of contexts."""
if self.get_config.has_configurations:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method ScanSpec.DeepCopyInto
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
func (in *ScanSpec) DeepCopyInto(out *ScanSpec) {
*out = *in
if in.ResourceMode != nil {
in, out := &in.ResourceMode, &out.ResourceMode
*out = new(ResourceMode)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"