Skip to content

Add Severity to deduplicate index #445

@lucatruf

Description

@lucatruf

What's the problem this feature will solve?
If a vulnerability from a save scanner change severity (I'm interesed in when it became higher) the change is lost.

Describe the solution you'd like
Might be quite simple, add Severity to the uix_vulnerability index:

vulnerability_uniqueness = DDL(
    "CREATE UNIQUE INDEX uix_vulnerability ON %(fullname)s "
    "(md5(name), md5(description), type, COALESCE(host_id, -1), COALESCE(service_id, -1), "
    "COALESCE(md5(method), ''), COALESCE(md5(parameter_name), ''), COALESCE(md5(path), ''), "
    "COALESCE(md5(website), ''), workspace_id, COALESCE(source_code_id, -1), severity);"
)

We faced a situation where we missed a High severity vulnerability because in a previous scan that same vuln had a Medium severity. Importing the new report deduplicated the vuln and it didn't show up.
We changed the index and imported the report again, this time the vuln showed up.

Alternative Solutions
I don't think there's one

Additional context
I don't have any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions