Reconmap/web-client

View on GitHub

Showing 450 of 450 total issues

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

                        <ButtonGroup>
                            <TargetModalDialog
                                project={project}
                                isOpen={isAddTargetDialogOpen}
                                onSubmit={onTargetFormSaved}
Severity: Major
Found in src/components/projects/Targets.jsx and 1 other location - About 1 hr to fix
src/components/reports/Revisions.jsx on lines 22..25

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 58.

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

        <div className="flex justify-end">
            <ReportVersionModalDialog projectId={projectId} isOpen={isAddDialogOpen} onSubmit={onDialogOk} onCancel={closeAddDialog} />
            <CreateButton onClick={openAddDialog}>Add report version...</CreateButton>
        </div>
Severity: Major
Found in src/components/reports/Revisions.jsx and 1 other location - About 1 hr to fix
src/components/projects/Targets.jsx on lines 82..92

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 58.

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

                                        {task.due_date && (
                                            <dl>
                                                <dt>Due date</dt>
                                                <dd>
                                                    <RelativeDateFormatter
Severity: Major
Found in src/components/tasks/Details.jsx and 1 other location - About 1 hr to fix
src/components/projects/DetailsTab.jsx on lines 131..138

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 58.

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

Function onUploadButtonClick has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const onUploadButtonClick = ev => {
        const formData = new FormData();
        formData.append('parentType', parentType);
        formData.append('parentId', parentId);
        acceptedFiles.forEach(file => {
Severity: Minor
Found in src/components/attachments/ImageDropzone.jsx - About 1 hr to fix

Function onFormChange has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const onFormChange = (ev) => {
        const target = ev.target;
        const name = target.name;
        let value = target.type === "checkbox" ? target.checked : target.value;

Severity: Minor
Found in src/components/vulnerabilities/Form.jsx - About 1 hr to fix

Function onFormSubmit has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const onFormSubmit = (ev) => {
        ev.preventDefault();

        const params = {
            projectId: projectId,
Severity: Minor
Found in src/components/reports/ModalDialog.jsx - About 1 hr to fix

Function AttachmentsDropzone has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

const AttachmentsDropzone = ({ parentType, parentId, onUploadFinished = null, attachmentId = null }) => {
    const onFileDrop = (newFiles) => {
        setAcceptedFiles(newFiles);
    };

Severity: Minor
Found in src/components/attachments/Dropzone.jsx - About 1 hr 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 AttachmentsImageDropzone has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

const AttachmentsImageDropzone = ({ parentType, parentId, onUploadFinished = null, uploadFinishedParameter = null, attachmentId = null, maxFileCount = Infinity }) => {
    const onFileDrop = (newFiles) => {
        setAcceptedFiles(newFiles);
    };

Severity: Minor
Found in src/components/attachments/ImageDropzone.jsx - About 1 hr 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 CreateUserPage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const CreateUserPage = () => {
    const navigate = useNavigate();
    const [userData, setUserData] = useState(User);

    const handleCreate = async (ev) => {
Severity: Minor
Found in src/components/users/Create.jsx - About 1 hr to fix

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 4 locations. Consider refactoring.
Open

                    <h2>
                        <AccordionButton>
                            <Box flex="1" textAlign="left">
                                Remediation
                            </Box>
Severity: Major
Found in src/components/vulnerabilities/Form.jsx and 3 other locations - About 1 hr to fix
src/components/vulnerabilities/Form.jsx on lines 196..203
src/components/vulnerabilities/Form.jsx on lines 365..372
src/components/vulnerabilities/Form.jsx on lines 432..439

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 4 locations. Consider refactoring.
Open

                    <h2>
                        <AccordionButton>
                            <Box flex="1" textAlign="left">
                                Basic information
                            </Box>
Severity: Major
Found in src/components/vulnerabilities/Form.jsx and 3 other locations - About 1 hr to fix
src/components/vulnerabilities/Form.jsx on lines 365..372
src/components/vulnerabilities/Form.jsx on lines 380..387
src/components/vulnerabilities/Form.jsx on lines 432..439

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 4 locations. Consider refactoring.
Open

                        <h2>
                            <AccordionButton>
                                <Box flex="1" textAlign="left">
                                    Owasp Risk Rating calculator
                                </Box>
Severity: Major
Found in src/components/vulnerabilities/Form.jsx and 3 other locations - About 1 hr to fix
src/components/vulnerabilities/Form.jsx on lines 196..203
src/components/vulnerabilities/Form.jsx on lines 380..387
src/components/vulnerabilities/Form.jsx on lines 432..439

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

Severity
Category
Status
Source
Language