Skip to content

Commit 72d4ea9

Browse files
committed
docs: add default policies table
Signed-off-by: Parth Govale <[email protected]>
1 parent 181bdb8 commit 72d4ea9

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
Use Macaron as a GitHub Action
1313

14-
To use the Macaron GitHub Action, add the following step to your workflow:
14+
To use the Macaron GitHub Action, add the following step to your workflow (adjust the version as needed). In this example, we use an example policy. For detailed instructions and a comprehensive list of available options, please refer to the [Macaron GitHub Action documentation](https://oracle.github.io/macaron/pages/macaron_action.html).
15+
1516
```yaml
1617
- uses: oracle/[email protected]
1718
with:

docs/source/pages/macaron_action.rst

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Inputs
4848
The action exposes a number of inputs which map directly to Macaron CLI
4949
options. Key inputs are listed below (see ``action.yaml`` for the full list):
5050

51-
.. list-table:: Action inputs
51+
.. list-table::
5252
:header-rows: 1
5353
:widths: 20 60 20
5454

@@ -81,10 +81,19 @@ options. Key inputs are listed below (see ``action.yaml`` for the full list):
8181
- Checkout options when analyzing a repository (branch name or commit
8282
digest).
8383
-
84+
* - ``provenance_expectation``
85+
- The path to provenance expectation file or directory.
86+
-
87+
* - ``provenance_file``
88+
- The path to the provenance file in in-toto format.
89+
-
8490
* - ``deps_depth``
8591
- Dependency resolution depth (how many levels of transitive dependencies
8692
to resolve).
8793
- ``0``
94+
* - ``show_prelude``
95+
- Shows the Datalog prelude for the database.
96+
-
8897
* - ``github_token``
8998
- Token used by Macaron to access GitHub (for cloning, API access,
9099
etc.).
@@ -96,14 +105,17 @@ options. Key inputs are listed below (see ``action.yaml`` for the full list):
96105
- When ``true``, the action will attempt to upload a generated
97106
verification attestation (VSA) after policy verification.
98107
- ``false``
108+
* - ``subject_path``
109+
- Path to the artifact serving as the subject of the attestation.
110+
- ``${{ github.workspace }}``
99111

100112
Outputs
101113
-------
102114

103115
The composite action exposes the following outputs (set by the
104116
``run_macaron_policy_verification.sh`` script when applicable):
105117

106-
.. list-table:: Action outputs
118+
.. list-table::
107119
:header-rows: 1
108120
:widths: 20 70
109121

@@ -119,6 +131,35 @@ The composite action exposes the following outputs (set by the
119131
during verification, the action emits the string ``"VSA Not Generated."``
120132
instead of a path.
121133

134+
Default Policies
135+
----------------
136+
137+
Macaron provides policy templates to run pre-defined policies:
138+
139+
.. list-table::
140+
:header-rows: 1
141+
:widths: 20 60 20
142+
143+
* - Policy name
144+
- Description
145+
- Template
146+
* - ``check-github-actions``
147+
- Detects whether a component was built using GitHub Actions that
148+
are known to be vulnerable or otherwise unsafe. The policy
149+
evaluates a check named `mcn_githubactions_vulnerabilities_1` and
150+
reports a passed/failed result for the component when applied.
151+
- `check-github-actions template <https://github.com/oracle/macaron/blob/main/src/macaron/resources/policies/datalog/check-github-actions.dl.template>`_
152+
* - ``malware-detection``
153+
- Checks a component for indicators of malicious or suspicious content.
154+
The policy evaluates a check named mcn_detect_malicious_metadata_1
155+
and reports a passed/failed result for the component when applied.
156+
- `malware-detection template <https://github.com/oracle/macaron/blob/main/src/macaron/resources/policies/datalog/malware-detection.dl.template>`_
157+
* - ``malware-detection-dependencies``
158+
- Checks the component and its transitive dependencies for indicators
159+
of malicious or suspicious content. The policy ensures the component
160+
and each dependency pass the `mcn_detect_malicious_metadata_1` check.
161+
- `malware-detection-dependencies template <https://github.com/oracle/macaron/blob/main/src/macaron/resources/policies/datalog/malware-detection-dependencies.dl.template>`_
162+
122163
How the action works
123164
--------------------
124165

0 commit comments

Comments
 (0)