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

Add "Show in Dependency-Graph" Button in "Affected Projects" List [improved version] #667

Conversation

rkg-mm
Copy link
Contributor

@rkg-mm rkg-mm commented Dec 9, 2023

Description

This PR adds the Show in Dependency-Graph button to the every project in the Affected Projects tab of a vulnerability, but only if the affected project has a dependency graph.
Clicking the button redirects the user to the projects dependency graph and highlights the affected component.

Clicking on the project link in a vulnerabilities Affected Projects tab opens the project's Audit Vulnerabilities tab, showing only the expanded finding.

Improved version, replaces #573 :

  • The button now supports opening all affected components if vulnerability affects more than one component. The backend is adapted to return all affected components.
  • Additionally, refactored and simplified some code
  • Additionally fixed a bug, which prevented outdated versions to be displayed in graph when opening it for searched components

Addressed Issue

#533

Additional Details

Backend PR: DependencyTrack/dependency-track#3285

257805393-c33d4636-b330-4510-a4e1-4ee63b770d92

The redirect to a project's Audit Vulnerabilities tab works by opening a specific URL and searching for the matrix of a finding.
By adding a hidden Matrix column to the table, the wanted finding can be filtered and expanded by searching for it's matrix.

  • URL Format: .../projects/<projectUUID>/findings/<affectedComponentUUID>/<vulnerabilityUUID>
  • Matrix Format: <projectUUID>:<affectedComponentUUID>:<vulnerabilityUUID>

Checklist

rbt-mm and others added 7 commits August 2, 2023 13:56
Adds a `Show in Dependency-Graph` button to the every project in the
`Affected Projects` tab of a vulnerability that highlights the affected
component in the project's dependency graph

Signed-off-by: RBickert <[email protected]>
Clicking on a project from the "Affected Projects"-tab of a
vulnerability now opens the project's "Findings"-tab, showing only
the expanded vulnerability

Signed-off-by: RBickert <[email protected]>
…-graph-from-affected-projects

Add "Show in Dependency-Graph" Button in "Affected Projects" List
Adds a `Show in Dependency-Graph` button to the every project in the
`Affected Projects` tab of a vulnerability that highlights the affected
component in the project's dependency graph

Signed-off-by: RBickert <[email protected]>
Clicking on a project from the "Affected Projects"-tab of a
vulnerability now opens the project's "Findings"-tab, showing only
the expanded vulnerability

Signed-off-by: RBickert <[email protected]>
* Fix bug: If opening graph for component, showing outdated versions did no longer work
* Dependency graph now supports multiple UUIDs of components to be searched for
* Affected components list now opens graph with all affected components

Signed-off-by: Ralf King <[email protected]>
…-from-affected-projects' into master-open-dependency-graph-from-affected-projects

# Conflicts:
#	src/views/portfolio/vulnerabilities/AffectedProjects.vue
@rkg-mm
Copy link
Contributor Author

rkg-mm commented Dec 10, 2023

@nscuro Could you consider removing the code analysis rule triggering on things like
formatter(value, row, index) {
with
'index' is defined but never used.

I fixed the one in this PR but I see this failing other PRs, too. and I find it better you define all given parameters even if you do not use them right now, cause it makes it clear that they are available when you work on this part later.

@nscuro
Copy link
Member

nscuro commented Dec 10, 2023

@rkg-mm Codacy appears to be using ESLint behind the scenes, so you can just add // eslint-disable-line no-unused-vars to the offending line.

But yeah I think Codacy in general needs some tweaking to be a better fit for the project in general.

@nscuro nscuro added this to the 4.11 milestone Dec 10, 2023
@nscuro nscuro merged commit 7779934 into DependencyTrack:master Dec 10, 2023
9 checks passed
@nscuro nscuro added the enhancement New feature or request label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants