You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enable repo finder to support more languages via Open Source Insights (#388)
This feature modifies the Repo Finder, so that it can: be usable from anywhere within Macaron; accept PURL strings as input; and, support more languages via Google's Open Source Insights (deps.dev)
This enables Macaron to accept artifact PURLs as input, whereby the Repo Finder will be used to attempt to retrieve the related repository.
Additional languages include those supported by deps.dev: Python, NodeJS, .Net, and Rust. Note that currently these will only work when specifying an artifact PURL as input, or providing an SBOM. Full support for these extra languages will require the addition of new dependency analyzers.
A new config option is also provided to disable API calls to Google's Open Source Insights, if desired.
Signed-off-by: Ben Selwyn-Smith <[email protected]>
For more detailed information on converting a given artifact into a PURL, see `PURL Specification <https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst>`_ and `PURL Types <https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst>`_
166
+
167
+
.. note:: If a repository is not also provided, Macaron will try to discover it based on the artifact purl. For this to work, ``find_repos`` in the configuration file **must be enabled**\. See `Analyzing more dependencies <#more-deps>`_ for more information about the configuration options of the Repository Finding feature.
168
+
136
169
-------------------------------------------------
137
170
Verifying provenance expectations in CUE language
138
171
-------------------------------------------------
@@ -191,6 +224,8 @@ With the example above, the generated output reports can be seen here:
@@ -203,30 +238,38 @@ This feature is enabled by default. To disable, or configure its behaviour in ot
203
238
204
239
See :ref:`dump-defaults <action_dump_defaults>`, the CLI command to dump the default configurations in ``defaults.ini``. After making changes, see :ref:`analyze <analyze-action-cli>` CLI command for the option to pass the modified ``defaults.ini`` file.
205
240
206
-
Within the configuration file under the ``repofinder.java`` header, five options exist: ``find_repos``, ``artifact_repositories``, ``repo_pom_paths``, ``find_parents``, ``artifact_ignore_list``. These options behave as follows:
241
+
Within the configuration file under the ``repofinder.java`` header, three options exist: ``artifact_repositories``, ``repo_pom_paths``, ``find_parents``. These options behave as follows:
207
242
208
-
- ``find_repos`` (Values: True or False) - Enables or disables the Repository Finding feature.
209
243
- ``artifact_repositories`` (Values: List of URLs) - Determines the remote artifact repositories to attempt to retrieve dependency information from.
210
244
- ``repo_pom_paths`` (Values: List of POM tags) - Determines where to search for repository information in the POM files. E.g. scm.url.
211
245
- ``find_parents`` (Values: True or False) - When enabled, the Repository Finding feature will also search for repository URLs in parents POM files of the current dependency.
212
-
- ``artifact_ignore_list`` (Values: List of GAs) - The Repository Finding feature will skip any artifact in this list. Format is "GroupId":"ArtifactId". E.g. org.apache.maven:maven
246
+
247
+
Under the related header ``repofinder``, two more options exist: ``find_repos``, and ``use_open_source_insights``:
248
+
249
+
- ``find_repos`` (Values: True or False) - Enables or disables the Repository Finding feature.
250
+
- ``use_open_source_insights`` (Values: True or False) - Enables or disables use of Google's Open Source Insights API.
213
251
214
252
.. note:: Finding repositories requires at least one remote call, adding some additional overhead to an analysis run.
215
253
254
+
.. note:: Google's Open Source Insights API is currently used to find repositories for: Python, Rust, .Net, NodeJS
255
+
216
256
An example configuration file for utilising this feature:
0 commit comments