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
refactor: accept provenance data in artifact pipeline check (#872)
This PR renames `mcn_infer_artifact_pipeline_1` to `mcn_find_artifact_pipeline_1`. This check can support all the package registries now. When a verifiable provenance is found for an artifact, we use it to obtain the pipeline trigger. Otherwise, we use heuristics to find the triggering pipeline.
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
Copy file name to clipboardExpand all lines: docs/source/index.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ the requirements that are currently supported by Macaron.
77
77
* - ``mcn_build_as_code_1``
78
78
- **Build as code** - If a trusted builder is not present, this requirement determines that the build definition and configuration executed by the build service is verifiably derived from text file definitions stored in a version control system.
79
79
- Identify and validate the CI service(s) used to build and deploy/publish an artifact.
80
-
* - ``mcn_infer_artifact_pipeline_1``
80
+
* - ``mcn_find_artifact_pipeline_1``
81
81
- **Infer artifact publish pipeline** - When a provenance is not available, checks whether a CI workflow run has automatically published the artifact.
82
82
- Identify a workflow run that has triggered the deploy step determined by the ``Build as code`` check.
.. note:: By default, Macaron clones the repositories and creates output files under the ``output`` directory. To understand the structure of this directory please see :ref:`Output Files Guide <output_files_guide>`.
76
76
@@ -96,7 +96,7 @@ As you can see, some of the checks are passing and some are failing. In summary,
96
96
* is not producing any :term:`SLSA` or :term:`Witness` provenances (``mcn_provenance_available_1``)
97
97
* is using GitHub Actions to build and test using ``mvnw`` (``mcn_build_service_1``)
98
98
* but it is not deploying any artifacts automatically (``mcn_build_as_code_1``)
99
-
* and no CI workflow runs are detected that automatically publish artifacts (``mcn_infer_artifact_pipeline_1``)
99
+
* and no CI workflow runs are detected that automatically publish artifacts (``mcn_find_artifact_pipeline_1``)
100
100
101
101
As you scroll down in the HTML report, you will see a section for the dependencies that were automatically identified:
102
102
@@ -110,25 +110,25 @@ As you scroll down in the HTML report, you will see a section for the dependenci
110
110
|Macaron has found the two dependencies as expected:
When we open the reports for each dependency, we see that ``mcn_infer_artifact_pipeline_1`` is passed for ``com.google.guava:guava:32.1.2-jre``
116
-
and a GitHub Actions workflow run is found for publishing version ``32.1.2-jre``. However, this check is failing for ``io.github.behnazh-w.demo:jackson-databind:1.0``.
115
+
When we open the reports for each dependency, we see that ``mcn_find_artifact_pipeline_1`` is passed for ``org.apache.logging.log4j:log4j-core:3.0.0-beta2``
116
+
and a GitHub Actions workflow run is found for publishing version ``3.0.0-beta2``. However, this check is failing for ``io.github.behnazh-w.demo:jackson-databind:1.0``.
117
117
This means that ``io.github.behnazh-w.demo:jackson-databind:1.0`` could have been built and published manually to Maven Central
@@ -176,8 +176,8 @@ we are interested in the ``mcn_infer_artifact_pipeline_1`` and ``mcn_provenance_
176
176
177
177
This policy requires that all the dependencies
178
178
of repository ``github.com/behnazh-w/example-maven-app`` either pass the ``mcn_provenance_level_three_1`` (have non-forgeable
179
-
:term:`SLSA` provenances) or ``mcn_infer_artifact_pipeline_1`` check. Note that if an artifact already has a non-forgeable provenance, it means it is produced
180
-
by a hosted build platform, such as GitHub Actions CI workflows. So, the ``mcn_infer_artifact_pipeline_1`` needs to pass
179
+
:term:`SLSA` provenances) or ``mcn_find_artifact_pipeline_1`` check. Note that if an artifact already has a non-forgeable provenance, it means it is produced
180
+
by a hosted build platform, such as GitHub Actions CI workflows. So, the ``mcn_find_artifact_pipeline_1`` needs to pass
181
181
only if ``mcn_provenance_level_three_1`` fails.
182
182
183
183
Let's take a closer look at this policy to understand what each line means.
@@ -219,12 +219,12 @@ This rule populates the ``Policy`` relation if ``component_id`` exists in the da
Copy file name to clipboardExpand all lines: docs/source/pages/tutorials/exclude_include_checks.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ This tutorial will show how you can configure Macaron to:
24
24
Prerequisites
25
25
-------------
26
26
27
-
* You are expected to have gone through :ref:`this tutorial <detect-malicious-java-dep>`.
27
+
* You are expected to have gone through :ref:`this tutorial <detect-manual-upload-java-dep>`.
28
28
* This tutorial requires a high-level understanding of checks in Macaron and how they depend on each other. Please see this :ref:`page <macaron-developer-guide>` for more information.
0 commit comments