Skip to content

Add capability to group similar results #684

Open
@aeisenberg

Description

@aeisenberg

This query https://github.com/github/securitylab/blob/main/CodeQL_Queries/cpp/XNU_DTrace_CVE-2017-13782/DTraceUnsafeIndex.ql when run on the database linked here https://github.com/github/securitylab/tree/main/CodeQL_Queries/cpp/XNU_DTrace_CVE-2017-13782 will produce results like the following:

Banners_and_Alerts_and__Extension_Development_Host__-_dtrace_c_—_vscode-codeql-starter__Workspace_

You can see that many of the paths are duplicates. It's likely that in QL4E, the results were grouped together based on the comment in the ql file:

This query has 16 results. The 16th result is the vulnerability: dtrace_isa.c:817

The suggestion is the following:

  1. Add a toggle to group similar results in the results view. Similar results are defined by:
    • For Path queries
      • message is the same
      • All path elements are the same ast node
    • For alerts queries
      • message is the same
      • alert node is the same
    • For other query types
      • All elements are equal
  2. For the "Display in problems view", always group similar results. The calculation of what is similar would be slightly different since we only show the final element of a path query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions