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
Copy file name to clipboardExpand all lines: docs/source/pages/using.rst
+40-2Lines changed: 40 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,15 @@ Using Macaron
11
11
12
12
.. _analyze-action:
13
13
14
-
------------------------------------
14
+
.. contents:: :local:
15
+
16
+
----------------------------------
17
+
Analyzing a source code repository
18
+
----------------------------------
19
+
20
+
''''''''''''''''''''''''''''''''''''
15
21
Analyzing a public Github repository
16
-
------------------------------------
22
+
''''''''''''''''''''''''''''''''''''
17
23
18
24
Macaron can analyze a Github public repository (and potentially the repositories of it dependencies) to determine its SLSA posture following the specification of `SLSA v0.1 <https://slsa.dev/spec/v0.1/>`_.
19
25
@@ -52,6 +58,38 @@ With the example above, the generated output reports can be seen here:
Macaron supports analyzing GitLab repositories, whether they are hosted on `gitlab.com <https://gitlab.com>`_ or on your self-hosted GitLab instance. The set up in these two cases are a little bit different.
Analyzing a public repository on `gitlab.com <https://gitlab.com>`_ is quite similar to analyzing a public GitHub repository -- you just need to pass a proper GitLab repository URL to ``macaron analyze``.
72
+
73
+
To analyze a private repository hosted on ``gitlab.com``, you need to obtain a GitLab access token having at least the ``read_repository`` permission and store it into the ``MCN_GITLAB_TOKEN`` environment variable. For more detailed instructions, see `GitLab documentation <https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token>`_.
To analyze a repository on a self-hosted GitLab instance, you need to do the following:
80
+
81
+
- Add the following ``[git_service.gitlab.self_hosted]`` section into your ``.ini`` config. In the default .ini configuration (generated using ``macaron dump-default`` -- :ref:`see instructions <action_dump_defaults>`), there is already this section commented out. You can start by un-commenting this section and modifying the ``domain`` value with the domain of your self-hosted GitLab instance.
82
+
83
+
.. code-block:: ini
84
+
85
+
# Access to a self-hosted GitLab instance (e.g. your organization's self-hosted GitLab instance).
86
+
# If this section is enabled, an access token must be provided through the ``MCN_SELF_HOSTED_GITLAB_TOKEN`` environment variable.
87
+
# The `read_repository` permission is required for this token.
88
+
[git_service.gitlab.self_hosted]
89
+
domain = internal.gitlab.org
90
+
91
+
- Obtain a GitLab access token having at least the ``read_repository`` permission and store it into the ``MCN_SELF_HOSTED_GITLAB_TOKEN`` environment variable. For more detailed instructions, see `GitLab documentation <https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#create-a-personal-access-token>`_.
0 commit comments