Add Conan packages to the `list project dependencies` API
Context
The List Project Dependencies API call has an optional attribute for package_manager
. I.e. calling GET /projects/:id/dependencies?package_manager=npm
will only show results for npm
packages.
Conan dependency management has been supported since #225218 (closed), and Conan packages do show up in the full results if the package_manager
attribute is not used, however there is still no package_manager
option to show only conan
results.
Proposal
Update the API to allow passing conan
as a package_manager
attribute, so that I can quickly filter my dependencies list on my C/C++ dependencies.
Implementation Plan
-
Add
conan
to the FILTER_PACKAGE_MANAGERS_VALUES variable:- FILTER_PACKAGE_MANAGERS_VALUES = %w(bundler yarn npm maven composer pip).freeze + FILTER_PACKAGE_MANAGERS_VALUES = %w(bundler yarn npm maven composer pip conan).freeze
-
Add a test to Security::DependencyListService to verify that the above change works as expected
Edited by Adam Cohen