Reconmap/web-client

View on GitHub
src/components/vulnerabilities/OwaspRR.jsx

Summary

Maintainability
F
1 wk
Test Coverage

File OwaspRR.jsx has 460 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { Input } from '@chakra-ui/react';
import { useState } from 'react';
import Select from "react-select";
import { PolarAngleAxis, PolarGrid, PolarRadiusAxis, Radar, RadarChart } from 'recharts';

Severity: Minor
Found in src/components/vulnerabilities/OwaspRR.jsx - About 7 hrs to fix

Function OwaspRR has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

const OwaspRR = ({
    vulnerability,
    vulnerabilitySetter: setVulnerability
}) => {

Severity: Minor
Found in src/components/vulnerabilities/OwaspRR.jsx - About 4 hrs to fix

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 updateSelectedValue has 52 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const updateSelectedValue = (event, id) => {
        switch (id) {
            case 'SL':
                setSkillLevelValue(event);
                break;
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx - About 2 hrs to fix

Consider simplifying this complex logical expression.
Open

            if ((key === 'LC') || (key === 'LI') || (key === 'LAV') || (key === 'LAC')
                || (key === 'FD') || (key === 'RD') || (key === 'NC') || (key === 'PV')) {
                sum += parseInt(value);
            }
Severity: Critical
Found in src/components/vulnerabilities/OwaspRR.jsx - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

            if ((key === 'SL') || (key === 'M') || (key === 'O') || (key === 'S')
                || (key === 'ED') || (key === 'EE') || (key === 'A') || (key === 'ID')) {
                sum += parseInt(value);
            }
Severity: Critical
Found in src/components/vulnerabilities/OwaspRR.jsx - About 1 hr to fix

Avoid too many return statements within this function.
Open

            return 'critical';
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx - About 30 mins to fix

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const VulnerabilityFactors = () => (
        <div>
            <h6>Vulnerability factors</h6>
            <label>Ease of discovery
                <Select options={easeOfDiscoveryOptions} onChange={e => updateValues(e, "ED")}
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 3 other locations - About 1 day to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 302..322
src/components/vulnerabilities/OwaspRR.jsx on lines 354..374
src/components/vulnerabilities/OwaspRR.jsx on lines 453..473

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 274.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const ThreatAgentFactors = () => (
        <div>
            <h6>Threat agent factors</h6>
            <label>Skill level
                <Select options={skillLevelOptions} onChange={e => updateValues(e, "SL")}
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 3 other locations - About 1 day to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 354..374
src/components/vulnerabilities/OwaspRR.jsx on lines 404..424
src/components/vulnerabilities/OwaspRR.jsx on lines 453..473

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 274.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const TechnicalImpactFactors = () => (
        <div>
            <h6>Technical impact factors</h6>
            <label>Loss of confidentiality
                <Select options={lossOfConfidentialityOptions} onChange={e => updateValues(e, "LC")}
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 3 other locations - About 1 day to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 302..322
src/components/vulnerabilities/OwaspRR.jsx on lines 404..424
src/components/vulnerabilities/OwaspRR.jsx on lines 453..473

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 274.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    const BusinessImpactFactors = () => (
        <div>
            <h6>Business impact factors</h6>
            <label>Financial damage
                <Select options={financialDamageOptions} onChange={e => updateValues(e, "FD")}
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 3 other locations - About 1 day to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 302..322
src/components/vulnerabilities/OwaspRR.jsx on lines 354..374
src/components/vulnerabilities/OwaspRR.jsx on lines 404..424

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 274.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    const computeLikehood = (fields) => {
        let sum = 0;
        fields.map(([key, value]) => {
            if ((key === 'SL') || (key === 'M') || (key === 'O') || (key === 'S')
                || (key === 'ED') || (key === 'EE') || (key === 'A') || (key === 'ID')) {
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 1 other location - About 4 hrs to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 84..94

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    const computeImpact = (fields) => {
        let sum = 0;
        fields.map(([key, value]) => {
            if ((key === 'LC') || (key === 'LI') || (key === 'LAV') || (key === 'LAC')
                || (key === 'FD') || (key === 'RD') || (key === 'NC') || (key === 'PV')) {
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 1 other location - About 4 hrs to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 72..82

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 128.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    const risk_colors = {
        'note': { label: 'Note', color: 'var(--blue)' },
        'low': { label: 'Low', color: 'var(--green)' },
        'medium': { label: 'Medium', color: '#FF8C00' },
        'high': { label: 'High', color: 'var(--red)' },
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 1 other location - About 2 hrs to fix
src/components/layout/dashboard/widgets/VulnerabilitiesByRiskStatsWidget.jsx on lines 9..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 88.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

    const skillLevelOptions = [
        { value: 1, label: '1 - No technical skills' },
        { value: 3, label: '3 - Some technical skills' },
        { value: 5, label: '5 - Advanced computer user' },
        { value: 6, label: '6 - Network and programming skills' },
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 4 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 162..168
src/components/vulnerabilities/OwaspRR.jsx on lines 324..330
src/components/vulnerabilities/OwaspRR.jsx on lines 332..338
src/components/vulnerabilities/OwaspRR.jsx on lines 340..346

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

    const lossOfConfidentialityOptions = [
        { value: 2, label: '2 - Minimal non-sensitive data disclosed' },
        { value: 6, label: '6 - Minimal critical data disclosed' },
        { value: 6, label: '6 - Extensive non-sensitive data disclosed' },
        { value: 7, label: '7 - Extensive critical data disclosed' },
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 4 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 141..147
src/components/vulnerabilities/OwaspRR.jsx on lines 162..168
src/components/vulnerabilities/OwaspRR.jsx on lines 332..338
src/components/vulnerabilities/OwaspRR.jsx on lines 340..346

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

    const lossOfIntegrityOptions = [
        { value: 1, label: '1 - Minimal slightly corrupt data' },
        { value: 3, label: '3 - Minimal seriously corrupt data' },
        { value: 5, label: '5 - Extensive slightly corrupt data' },
        { value: 7, label: '7 - Extensive seriously corrupt data ' },
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 4 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 141..147
src/components/vulnerabilities/OwaspRR.jsx on lines 162..168
src/components/vulnerabilities/OwaspRR.jsx on lines 324..330
src/components/vulnerabilities/OwaspRR.jsx on lines 340..346

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

    const sizeOptions = [
        { value: 2, label: '2 - Developers, System administrators' },
        { value: 4, label: '4 - Intranet users' },
        { value: 5, label: '5 - Partners' },
        { value: 6, label: '6 - Authenticated users' },
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 4 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 141..147
src/components/vulnerabilities/OwaspRR.jsx on lines 324..330
src/components/vulnerabilities/OwaspRR.jsx on lines 332..338
src/components/vulnerabilities/OwaspRR.jsx on lines 340..346

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

    const lossOfAvailabilityOptions = [
        { value: 1, label: '1 - Minimal secondary services interrupted' },
        { value: 5, label: '5 - Minimal primary services interrupted' },
        { value: 5, label: '5 - Extensive secondary services interrupted' },
        { value: 7, label: '7 - Extensive primary services interrupted' },
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 4 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 141..147
src/components/vulnerabilities/OwaspRR.jsx on lines 162..168
src/components/vulnerabilities/OwaspRR.jsx on lines 324..330
src/components/vulnerabilities/OwaspRR.jsx on lines 332..338

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            <label>OWASP Impact score
                <input type="number" step="0.1" min="0" max="10" name="owasp_impact" value={vulnerability.owasp_impact || 0.0}
                    disabled />
            </label>
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 1 other location - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 482..485

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            <label>OWASP Likehoood score
                <input type="number" step="0.1" min="0" max="10" name="owasp_likehood" value={vulnerability.owasp_likehood || 0.0}
                    disabled />
            </label>
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 1 other location - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 486..489

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 63.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const awarenessOptions = [
        { value: 1, label: '1 - Unknown' },
        { value: 4, label: '4 - Hidden' },
        { value: 6, label: '6 - Obvious' },
        { value: 9, label: '9 - Public knowledge' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 155..160
src/components/vulnerabilities/OwaspRR.jsx on lines 376..381
src/components/vulnerabilities/OwaspRR.jsx on lines 383..388
src/components/vulnerabilities/OwaspRR.jsx on lines 397..402
src/components/vulnerabilities/OwaspRR.jsx on lines 426..431
src/components/vulnerabilities/OwaspRR.jsx on lines 433..438
src/components/vulnerabilities/OwaspRR.jsx on lines 446..451

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const financialDamageOptions = [
        { value: 1, label: '1 - Less than the cost to fix the vulnerability' },
        { value: 3, label: '3 - Minor effect on annual profit' },
        { value: 7, label: '7 - Significant effect on annual profit' },
        { value: 9, label: '9 - Bankruptcy' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 155..160
src/components/vulnerabilities/OwaspRR.jsx on lines 376..381
src/components/vulnerabilities/OwaspRR.jsx on lines 383..388
src/components/vulnerabilities/OwaspRR.jsx on lines 390..395
src/components/vulnerabilities/OwaspRR.jsx on lines 397..402
src/components/vulnerabilities/OwaspRR.jsx on lines 433..438
src/components/vulnerabilities/OwaspRR.jsx on lines 446..451

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const opportunityOptions = [
        { value: 0, label: '0 - Full access or expensive resources required ' },
        { value: 4, label: '4 - Special access or resources required' },
        { value: 7, label: '7 - Some access or resources required' },
        { value: 9, label: '9 - No access or resources required' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 376..381
src/components/vulnerabilities/OwaspRR.jsx on lines 383..388
src/components/vulnerabilities/OwaspRR.jsx on lines 390..395
src/components/vulnerabilities/OwaspRR.jsx on lines 397..402
src/components/vulnerabilities/OwaspRR.jsx on lines 426..431
src/components/vulnerabilities/OwaspRR.jsx on lines 433..438
src/components/vulnerabilities/OwaspRR.jsx on lines 446..451

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const easeOfExploitOptions = [
        { value: 1, label: '1 - Theoretical' },
        { value: 3, label: '3 - Difficult' },
        { value: 5, label: '5 - Easy' },
        { value: 9, label: '9 - Automated tools available' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 155..160
src/components/vulnerabilities/OwaspRR.jsx on lines 376..381
src/components/vulnerabilities/OwaspRR.jsx on lines 390..395
src/components/vulnerabilities/OwaspRR.jsx on lines 397..402
src/components/vulnerabilities/OwaspRR.jsx on lines 426..431
src/components/vulnerabilities/OwaspRR.jsx on lines 433..438
src/components/vulnerabilities/OwaspRR.jsx on lines 446..451

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const easeOfDiscoveryOptions = [
        { value: 1, label: '1 - Practically impossible ' },
        { value: 3, label: '3 - Difficult' },
        { value: 7, label: '7 - Easy' },
        { value: 9, label: '9 - Automated tools available' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 155..160
src/components/vulnerabilities/OwaspRR.jsx on lines 383..388
src/components/vulnerabilities/OwaspRR.jsx on lines 390..395
src/components/vulnerabilities/OwaspRR.jsx on lines 397..402
src/components/vulnerabilities/OwaspRR.jsx on lines 426..431
src/components/vulnerabilities/OwaspRR.jsx on lines 433..438
src/components/vulnerabilities/OwaspRR.jsx on lines 446..451

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const reputationDamageOptions = [
        { value: 1, label: '1 - Minimal damage' },
        { value: 4, label: '4 - Loss of major accounts' },
        { value: 5, label: '5 - Loss of goodwill' },
        { value: 9, label: '9 - Brand damage' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 155..160
src/components/vulnerabilities/OwaspRR.jsx on lines 376..381
src/components/vulnerabilities/OwaspRR.jsx on lines 383..388
src/components/vulnerabilities/OwaspRR.jsx on lines 390..395
src/components/vulnerabilities/OwaspRR.jsx on lines 397..402
src/components/vulnerabilities/OwaspRR.jsx on lines 426..431
src/components/vulnerabilities/OwaspRR.jsx on lines 446..451

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const privacyViolationOptions = [
        { value: 3, label: '3 - One individual' },
        { value: 5, label: '5 - Hundreds of people' },
        { value: 7, label: '7 - Thousands of people' },
        { value: 9, label: '9 - Millions of people' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 155..160
src/components/vulnerabilities/OwaspRR.jsx on lines 376..381
src/components/vulnerabilities/OwaspRR.jsx on lines 383..388
src/components/vulnerabilities/OwaspRR.jsx on lines 390..395
src/components/vulnerabilities/OwaspRR.jsx on lines 397..402
src/components/vulnerabilities/OwaspRR.jsx on lines 426..431
src/components/vulnerabilities/OwaspRR.jsx on lines 433..438

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

    const intrusionDetectionOptions = [
        { value: 1, label: '1 - Active detection in application' },
        { value: 3, label: '3 - Logged and reviewed' },
        { value: 8, label: '8 - Logged without review' },
        { value: 9, label: '9 - Not logged' }
Severity: Major
Found in src/components/vulnerabilities/OwaspRR.jsx and 7 other locations - About 1 hr to fix
src/components/vulnerabilities/OwaspRR.jsx on lines 155..160
src/components/vulnerabilities/OwaspRR.jsx on lines 376..381
src/components/vulnerabilities/OwaspRR.jsx on lines 383..388
src/components/vulnerabilities/OwaspRR.jsx on lines 390..395
src/components/vulnerabilities/OwaspRR.jsx on lines 426..431
src/components/vulnerabilities/OwaspRR.jsx on lines 433..438
src/components/vulnerabilities/OwaspRR.jsx on lines 446..451

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 56.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status