Skip to content

Commit

Permalink
add component path as file_path
Browse files Browse the repository at this point in the history
This is mainly for SCA anyways - SAST contains a different set of vulns and I can write that parser to differentiate SAST vs SCA.
  • Loading branch information
testaccount90009 committed Nov 14, 2024
1 parent 4cd5bb3 commit 6faf27f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dojo/tools/mend-sca-platform-api3/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def _build_common_output(node, lib_name=None):
component_name = None
component_version = None
impact = None
file_path = None

if 'component' in node:

Check failure on line 44 in dojo/tools/mend-sca-platform-api3/parser.py

View workflow job for this annotation

GitHub Actions / ruff-linting

Ruff (Q000)

dojo/tools/mend-sca-platform-api3/parser.py:44:16: Q000 Single quotes found but double quotes preferred
description = (
Expand Down Expand Up @@ -68,6 +69,7 @@ def _build_common_output(node, lib_name=None):
component_name = node['component'].get('artifactId')
component_version = node['component'].get('version')
impact = node['component'].get('dependencyType')
file_path = node['component'].get('path')
else:
description = node['vulnerability'].get('description', "")

Expand Down

0 comments on commit 6faf27f

Please sign in to comment.