1- # ` @nexB /scancode-action `
1+ # ` @aboutcode-org /scancode-action `
22
3- Run [ ScanCode.io] ( https://github.com/nexB/scancode.io ) pipelines from your Workflows.
3+ Run [ ScanCode.io] ( https://github.com/aboutcode-org/scancode.io ) pipelines from your
4+ Workflows.
45
56> [ !IMPORTANT]
6- > The scancode-action is currently in the ** alpha stage** , and we invite you to
7+ > The scancode-action is currently in the ** beta stage** , and we invite you to
78> contribute to its improvement. Please feel free to submit bug reports or share
89> your ideas by creating new entries in the "Issues" section.
910> Your collaboration helps us enhance the action and ensures a more stable and
@@ -20,7 +21,9 @@ Run [ScanCode.io](https://github.com/nexB/scancode.io) pipelines from your Workf
2021 - [ Choose the output formats] ( #choose-the-output-formats )
2122 - [ Provide download URLs inputs] ( #provide-download-urls-inputs )
2223 - [ Fetch pipelines inputs] ( #fetch-pipelines-inputs )
24+ - [ Check for compliance issues] ( #check-for-compliance-issues )
2325 - [ Define a custom project name] ( #define-a-custom-project-name )
26+ - [ Install ScanCode.io from a repository branch] ( #install-scancodeio-from-a-repository-branch )
2427- [ Where does the scan results go?] ( #where-does-the-scan-results-go )
2528
2629## Usage
3235- uses : actions/checkout@v4
3336 with :
3437 path : scancode-inputs
35- - uses : nexB /scancode-action@alpha
38+ - uses : aboutcode-org /scancode-action@beta
3639 with :
3740 pipelines : " scan_codebase"
3841 output-formats : " json xlsx spdx cyclonedx"
4144### Inputs
4245
4346` ` ` yaml
44- - uses : nexB /scancode-action@alpha
47+ - uses : aboutcode-org /scancode-action@beta
4548 with :
4649 # Names of the pipelines (comma-separated) and in order.
4750 # Default is 'scan_codebase'
@@ -66,15 +69,29 @@ steps:
6669 # Default is 'scancode-outputs'
6770 outputs-archive-name :
6871
72+ # Check for compliance issues in the project.
73+ # Exits with a non-zero status if compliance issues are detected.
74+ # Default is false
75+ check-compliance :
76+
77+ # Failure level for compliance check. Options: ERROR, WARNING, MISSING.
78+ # Default is 'ERROR'
79+ compliance-fail-level :
80+
81+ # Exit with a non-zero status if known vulnerabilities are detected in discovered
82+ # packages and dependencies.
83+ # Default is false
84+ compliance-fail-on-vulnerabilities :
85+
6986 # Python version that will be installed to run ScanCode.io
70- # Default is '3.11 '
87+ # Default is '3.12 '
7188 python-version :
7289` ` `
7390
7491## Examples
7592
76- See https://github.com/nexB /scancode-action/tree/main/.github/workflows for Workflows
77- examples.
93+ See https://github.com/aboutcode-org /scancode-action/tree/main/.github/workflows for
94+ Workflows examples.
7895
7996### Scan repo codebase
8097
@@ -83,23 +100,23 @@ steps:
83100- uses : actions/checkout@v4
84101 with :
85102 path : scancode-inputs
86- - uses : nexB /scancode-action@alpha
103+ - uses : aboutcode-org /scancode-action@beta
87104` ` `
88105
89106### Run a specific pipeline
90107
91108[Built-in pipelines list](https://scancodeio.readthedocs.io/en/latest/built-in-pipelines.html)
92109
93110` ` ` yaml
94- - uses : nexB /scancode-action@alpha
111+ - uses : aboutcode-org /scancode-action@beta
95112 with :
96113 pipelines : " scan_codebase"
97114` ` `
98115
99116### Run multiple pipelines
100117
101118` ` ` yaml
102- - uses : nexB /scancode-action@alpha
119+ - uses : aboutcode-org /scancode-action@beta
103120 with :
104121 pipelines : " scan_codebase,find_vulnerabilities"
105122 env :
@@ -116,18 +133,39 @@ However, you also have the option to run your own VulnerableCode instance.
116133For details on setting up and configuring your own instance, please refer to the
117134[VulnerableCode documentation](https://vulnerablecode.readthedocs.io/en/latest/index.html).
118135
136+ # ### Fail on known vulnerabilities
137+
138+ When enabled, the workflow will fail if any known vulnerabilities are found in the
139+ project's discovered packages or dependencies.
140+ Activate this behavior by enabling `check-compliance` and setting
141+ ` compliance-fail-on-vulnerabilities` to true.
142+
143+ ` ` ` yaml
144+ - uses: aboutcode-org/scancode-action@beta
145+ with:
146+ pipelines: "scan_codebase,find_vulnerabilities"
147+ check-compliance: true
148+ compliance-fail-on-vulnerabilities: true
149+ env:
150+ VULNERABLECODE_URL: https://public.vulnerablecode.io/
151+ ` ` `
152+
119153# ## Choose the output formats
120154
121155` ` ` yaml
122- - uses: nexB /scancode-action@alpha
156+ - uses: aboutcode-org /scancode-action@beta
123157 with:
124158 output-formats: "json xlsx spdx cyclonedx"
125159` ` `
126160
161+ > [!NOTE]
162+ > To specify a CycloneDX spec version (default to latest), use the syntax
163+ ``cyclonedx:VERSION`` as format value. For example : ` ` cyclonedx:1.5``.
164+
127165# ## Provide download URLs inputs
128166
129167` ` ` yaml
130- - uses: nexB /scancode-action@alpha
168+ - uses: aboutcode-org /scancode-action@beta
131169 with:
132170 pipelines: "map_deploy_to_develop"
133171 input-urls:
@@ -141,19 +179,41 @@ For details on setting up and configuring your own instance, please refer to the
141179- name: Download repository archive to scancode-inputs/ directory
142180 run: |
143181 wget --directory-prefix=scancode-inputs https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_REF}.zip
144- - uses: nexB /scancode-action@alpha
182+ - uses: aboutcode-org /scancode-action@beta
145183 with:
146184 pipelines: "scan_single_package"
147185` ` `
148186
187+ # ## Check for compliance issues
188+
189+ ` ` ` yaml
190+ - uses: aboutcode-org/scancode-action@beta
191+ with:
192+ check-compliance: true
193+ compliance-fail-level: "WARNING"
194+ ` ` `
195+
196+ > [!NOTE]
197+ > This feature requires to provide Project policies.
198+ > For details on setting up and configuring your own instance, please refer to the
199+ > [ScanCode.io Policies documentation](https://scancodeio.readthedocs.io/en/latest/policies.html).
200+
149201# ## Define a custom project name
150202
151203` ` ` yaml
152- - uses: nexB /scancode-action@alpha
204+ - uses: aboutcode-org /scancode-action@beta
153205 with:
154206 project-name: "my-project-name"
155207` ` `
156208
209+ # ## Install ScanCode.io from a repository branch
210+
211+ ` ` ` yaml
212+ - uses: aboutcode-org/scancode-action@beta
213+ with:
214+ scancodeio-repo-branch: "main"
215+ ` ` `
216+
157217# # Where are the Scan Results?
158218
159219Upon completion of the workflow, you can **find the scan results** in the dedicated
0 commit comments