|
| 1 | +.. _reference_scancodeio_workflow: |
| 2 | + |
| 3 | +ScanCode.io and DejaCode Compliance Workflow |
| 4 | +============================================ |
| 5 | + |
| 6 | +**ScanCode.io detects what is in your code. DejaCode records what you decide about it.** |
| 7 | + |
| 8 | +ScanCode.io analyzes one codebase at a time. DejaCode manages the compliance of all your |
| 9 | +Products over time. |
| 10 | + |
| 11 | +This page covers how the two work together. For everything else that DejaCode does, such |
| 12 | +as the License Library, Workflow Requests, and Reporting, see the |
| 13 | +:doc:`DejaCode documentation index <index>`. |
| 14 | + |
| 15 | +.. image:: images/reference-scancodeio-workflow/workflow.svg |
| 16 | + :width: 100% |
| 17 | + :alt: DejaCode shares the license policies with ScanCode.io (1), imports the Product |
| 18 | + inventory detected by ScanCode.io (2), and requests Package scans (3). DejaCode |
| 19 | + then supports the review (4), delivery (5), and maintenance (6) of the Product. |
| 20 | + |
| 21 | +Each number in the diagram is a step of the workflow, described below. |
| 22 | + |
| 23 | +1. Set Up |
| 24 | +--------- |
| 25 | + |
| 26 | +- Enable the ScanCode.io, VulnerableCode, and PurlDB integrations, see |
| 27 | + :ref:`integrations_aboutcode`. |
| 28 | +- Define your usage policies, see :ref:`how_to_1`. |
| 29 | +- Share your license policies with ScanCode.io, which then flags each detected license |
| 30 | + with your compliance alerts, see :ref:`how_to_1_export_license_policies`. |
| 31 | +- Activate your policy rules, see :ref:`reference_policy_rules`. |
| 32 | +- Create a Product for each version of the software that you distribute, see |
| 33 | + :ref:`user_tutorial_1`. |
| 34 | + |
| 35 | +2. Discover the Inventory |
| 36 | +------------------------- |
| 37 | + |
| 38 | +Choose the import action from the :guilabel:`Actions` dropdown of the Product, according |
| 39 | +to what you have: |
| 40 | + |
| 41 | +.. list-table:: |
| 42 | + :header-rows: 1 |
| 43 | + :widths: 30 35 35 |
| 44 | + |
| 45 | + * - You have |
| 46 | + - Action |
| 47 | + - ScanCode.io pipeline |
| 48 | + * - An SBOM (CycloneDX, SPDX) |
| 49 | + - :guilabel:`Import SBOM` |
| 50 | + - ``load_sbom``, run by DejaCode |
| 51 | + * - Package manifests or lockfiles |
| 52 | + - :guilabel:`Import Package manifests` |
| 53 | + - ``resolve_dependencies``, run by DejaCode |
| 54 | + * - A ScanCode.io project |
| 55 | + - :guilabel:`Import ScanCode.io project` |
| 56 | + - Any pipeline, already run |
| 57 | + * - A ScanCode scan results file |
| 58 | + - :guilabel:`Import ScanCode scan results` |
| 59 | + - None: the file is imported as is |
| 60 | + |
| 61 | +For an in-depth analysis, run the pipelines in ScanCode.io, then import the project: it |
| 62 | +brings the Packages, their dependencies, and their vulnerabilities. With the |
| 63 | +``find_vulnerabilities`` and ``analyze_symbols_reachability`` pipelines, it also brings |
| 64 | +the reachability of each vulnerability. |
| 65 | + |
| 66 | +Imports run in the background, follow them on the :guilabel:`Activity` tab of the |
| 67 | +Product. A Package that already exists in your Dataspace keeps its curated data. |
| 68 | + |
| 69 | +3. Enrich the Packages |
| 70 | +---------------------- |
| 71 | + |
| 72 | +The discovery identifies the Packages and their declared licenses. A scan of each |
| 73 | +Package goes further: it detects the licenses and copyrights in its files. |
| 74 | + |
| 75 | +- :guilabel:`Scan all Packages` sends each Package of the Product with a download URL to |
| 76 | + ScanCode.io. |
| 77 | +- On the :guilabel:`Scan` tab of a Package, apply the detected values to its definition, |
| 78 | + see :ref:`reference_license_clarity`. |
| 79 | +- :guilabel:`Improve Packages from PurlDB` completes the Package metadata. |
| 80 | + |
| 81 | +A Package is scanned and reviewed once, and every Product that uses it benefits. |
| 82 | + |
| 83 | +4. Review |
| 84 | +--------- |
| 85 | + |
| 86 | +- Set the review status and concluded license of each Package in the Product, see |
| 87 | + :ref:`user_tutorial_5_sboms`. |
| 88 | +- Resolve the policy violations, see :ref:`reference_policy_rules`. |
| 89 | +- Triage the vulnerabilities, see :ref:`how_to_4`. The reachability imported from |
| 90 | + ScanCode.io is a starting point. |
| 91 | + |
| 92 | +5. Deliver |
| 93 | +---------- |
| 94 | + |
| 95 | +Export from the reviewed Product. Unlike the ScanCode.io outputs, built from the scan |
| 96 | +results, these documents reflect your review decisions. |
| 97 | + |
| 98 | +- **SBOM** (CycloneDX, SPDX), see :ref:`user_tutorial_5_sboms`. |
| 99 | +- **VEX**, see :ref:`user_tutorial_6_vuln_report`. |
| 100 | +- **Attribution**, see :ref:`user_tutorial_1`. |
| 101 | + |
| 102 | +6. Maintain |
| 103 | +----------- |
| 104 | + |
| 105 | +- **New release**: clone the Product, then import the new release. The clone keeps the |
| 106 | + inventory and its review. Imports only add Packages: remove the ones that are no |
| 107 | + longer in the release. |
| 108 | +- **New vulnerabilities**: DejaCode refreshes them daily by default and can notify you, |
| 109 | + see :ref:`reference_vulnerability_management`. |
| 110 | + |
| 111 | +Automate |
| 112 | +-------- |
| 113 | + |
| 114 | +Each import action is available on the Product endpoint of the REST API: |
| 115 | +``load_sboms``, ``import_manifests``, ``pull_scancodeio_project_data``, and |
| 116 | +``import_from_scan``. See :ref:`integrations_rest_api`. |
| 117 | + |
| 118 | +The ScanCode.io tutorial `Analyze Codebase End to End with DepLock and DejaCode |
| 119 | +<https://scancodeio.readthedocs.io/en/latest/tutorial_cli_end_to_end_scanning_to_dejacode.html>`_ |
| 120 | +shows a complete example. |
0 commit comments