Skip to content

Commit 712cc5c

Browse files
committed
docs: update README to reflect the Docker-based action
Signed-off-by: tdruez <tdruez@aboutcode.org>
1 parent 76777db commit 712cc5c

1 file changed

Lines changed: 28 additions & 34 deletions

File tree

README.md

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Run [ScanCode.io](https://github.com/aboutcode-org/scancode.io) pipelines direct
44
from your **GitHub Workflows**.
55

66
> [!IMPORTANT]
7-
> The scancode-action is currently in the **beta stage**, and we invite you to
8-
> contribute to its improvement. Please feel free to submit bug reports or share
9-
> your ideas by creating new entries in the "Issues" section.
10-
> Your collaboration helps us enhance the action and ensures a more stable and
11-
> effective tool for the community.
7+
> The scancode-action is currently in the **beta stage**, and we invite you to
8+
> contribute to its improvement. Please feel free to submit bug reports or share
9+
> your ideas by creating new entries in the "Issues" section.
10+
> Your collaboration helps us enhance the action and ensures a more stable and
11+
> effective tool for the community.
1212
> Thank you for your support!
1313
1414
- [Usage](#usage)
@@ -24,8 +24,7 @@ from your **GitHub Workflows**.
2424
- [Fetch pipelines inputs](#fetch-pipelines-inputs)
2525
- [Check for compliance issues](#check-for-compliance-issues)
2626
- [Define a custom project name](#define-a-custom-project-name)
27-
- [Install ScanCode.io from a repository branch](#install-scancodeio-from-a-repository-branch)
28-
- [Install ScanCode.io with optional dependencies](#install-scancodeio-with-optional-dependencies)
27+
- [Use a specific ScanCode.io Docker image](#use-a-specific-scancodeio-docker-image)
2928
- [Run source to binary mapping](#run-source-to-binary-mapping)
3029
- [Where does the scan results go?](#where-are-the-scan-results)
3130

@@ -86,14 +85,13 @@ steps:
8685
# Default is false
8786
compliance-fail-on-vulnerabilities:
8887

89-
# Python version that will be installed to run ScanCode.io
90-
# Default is '3.13'
91-
python-version:
88+
# ScanCode.io Docker image to use.
89+
scancodeio-image:
9290
```
9391
9492
## Examples
9593
96-
See https://github.com/aboutcode-org/scancode-action/tree/main/.github/workflows for
94+
See https://github.com/aboutcode-org/scancode-action/tree/main/.github/workflows for
9795
Workflows examples.
9896
9997
### Scan repo codebase
@@ -128,7 +126,7 @@ steps:
128126
129127
### Specify pipeline options
130128
131-
Use the `pipeline_name:option1,option2` syntax to select optional steps for the
129+
Use the `pipeline_name:option1,option2` syntax to select optional steps for the
132130
`map_deploy_to_develop` pipeline
133131

134132
```yaml
@@ -139,19 +137,19 @@ Use the `pipeline_name:option1,option2` syntax to select optional steps for the
139137

140138
#### Configuring `find_vulnerabilities` Pipeline
141139

142-
The `find_vulnerabilities` pipeline requires access to a VulnerableCode instance,
140+
The `find_vulnerabilities` pipeline requires access to a VulnerableCode instance,
143141
which can be defined using the `VULNERABLECODE_URL` environment variable.
144142

145-
In the example provided, a public instance is referenced.
146-
However, you also have the option to run your own VulnerableCode instance.
147-
For details on setting up and configuring your own instance, please refer to the
143+
In the example provided, a public instance is referenced.
144+
However, you also have the option to run your own VulnerableCode instance.
145+
For details on setting up and configuring your own instance, please refer to the
148146
[VulnerableCode documentation](https://vulnerablecode.readthedocs.io/en/latest/index.html).
149147

150148
#### Fail on known vulnerabilities
151149

152-
When enabled, the workflow will fail if any known vulnerabilities are found in the
150+
When enabled, the workflow will fail if any known vulnerabilities are found in the
153151
project's discovered packages or dependencies.
154-
Activate this behavior by enabling `check-compliance` and setting
152+
Activate this behavior by enabling `check-compliance` and setting
155153
`compliance-fail-on-vulnerabilities` to true.
156154

157155
```yaml
@@ -208,8 +206,8 @@ Activate this behavior by enabling `check-compliance` and setting
208206
```
209207

210208
> [!NOTE]
211-
> This feature requires to provide Project policies.
212-
> For details on setting up and configuring your own instance, please refer to the
209+
> This feature requires to provide Project policies.
210+
> For details on setting up and configuring your own instance, please refer to the
213211
> [ScanCode.io Policies documentation](https://scancodeio.readthedocs.io/en/latest/policies.html).
214212

215213
### Define a custom project name
@@ -220,30 +218,27 @@ Activate this behavior by enabling `check-compliance` and setting
220218
project-name: "my-project-name"
221219
```
222220

223-
### Install ScanCode.io from a repository branch
221+
### Use a specific ScanCode.io Docker image
224222

225-
```yaml
226-
- uses: aboutcode-org/scancode-action@beta
227-
with:
228-
scancodeio-repo-branch: "main"
229-
```
230-
231-
### Install ScanCode.io with optional dependencies
223+
The action runs ScanCode.io from a pre-built Docker image. By default, it uses a
224+
pinned release, but you can point it to another image or tag, for example to run
225+
against the latest `main` build:
232226

233227
```yaml
234228
- uses: aboutcode-org/scancode-action@beta
235229
with:
236-
scancodeio-extras: "android_analysis,mining"
230+
scancodeio-image: "ghcr.io/aboutcode-org/scancode.io:main"
237231
```
238232

239233
### Run source to binary mapping
240234

241235
Use this [workflow template](.github/workflows/map-deploy-to-develop-template.yml) for validating the integrity of open-source binary. It compares a project’s binary to its source code. Workflow will generate mapping between compiled binary and its original source code, which helps in spotting any malicious, unexpected, or otherwise undesirable code that may have made its way into the final binary.
242236

243-
#### To use follow these steps:
237+
#### To use follow these steps
244238

245239
1. In your workflow add job to build binary and upload it as a GitHub actions artifact.
246240
2. Now add a second job to run source binary mapping using [template](.github/workflows/map-deploy-to-develop-template.yml).
241+
247242
```yaml
248243
map-source-binary:
249244
needs: # Job id from step 1
@@ -255,10 +250,9 @@ Use this [workflow template](.github/workflows/map-deploy-to-develop-template.ym
255250

256251
See an end-to-end working example for a python project [here](.github/workflows/map-source-binary-boolean-py.yml)
257252

258-
259253
## Where are the Scan Results?
260254

261-
Upon completion of the workflow, you can **find the scan results** in the dedicated
262-
**artifacts section** at the bottom of the workflow summary page.
263-
Look for a file named `scancode-outputs` in that section.
255+
Upon completion of the workflow, you can **find the scan results** in the dedicated
256+
**artifacts section** at the bottom of the workflow summary page.
257+
Look for a file named `scancode-outputs` in that section.
264258
This file contains the outputs generated by the `scancode-action`.

0 commit comments

Comments
 (0)