Skip to content

Commit

Permalink
feat(sca): Using alias data from assets.json for giving Package Used …
Browse files Browse the repository at this point in the history
…indication for aliased packages (#5808)

use the aliases

Co-authored-by: ipeleg <[email protected]>
  • Loading branch information
itai1357 and ipeleg authored Nov 29, 2023
1 parent 58e5098 commit a0b9c94
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ def create_file_by_package_map(self, filtered_entries: List[Tuple[Any, Any]]) ->
for code_file_path, sast_data in filtered_entries:
for package_name in sast_data['all']:
clean_package_name = package_name.strip("'")

# in case it is alias-name, getting the real one
if package_name in sast_data.get('aliases', {}):
clean_package_name = sast_data['aliases'][package_name]

# Normalize package name
normalize_package_name = self.normalize_package_name(clean_package_name)

Expand Down

0 comments on commit a0b9c94

Please sign in to comment.