Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport: Fix broken global vuln audit view for MSSQL #3701

Merged
merged 1 commit into from
May 14, 2024

Commits on May 13, 2024

  1. Fix broken global vuln audit view for MSSQL

    MSSQL does not support `DISTINCT` for columns of type `TEXT`, which `DESCRIPTION` and `RECOMMENDATION` are.
    
    Because the database schema is controlled by DataNucleus, and DataNucleus doesn't allow us to customize column types for specific RDBMSes, changing the respective columns to `VARCHAR(MAX)` is not possible.
    
    `DISTINCT` was needed because finding rows are joined with the `PROJECT_ACCESS_TEAMS` table, to support portfolio ACLs. If a user is member of multiple teams, the query would yield a duplicate row for each permitted team the user is a member of.
    
    The need for `DISTINCT` is eliminated by converting the ACL check from a `LEFT JOIN` to an `EXISTS` subquery.
    
    Fixes DependencyTrack#3692
    
    Signed-off-by: nscuro <nscuro@protonmail.com>
    nscuro committed May 13, 2024
    Configuration menu
    Copy the full SHA
    6bd2ad7 View commit details
    Browse the repository at this point in the history