Skip to content

Commit 9cf22e0

Browse files
authored
Refine the XLSX documentation and add SPDX/CycloneDX entries #1589 (#1610)
* Refine the XLSX documentation and add SPDX/CycloneDX entries #1589 Signed-off-by: tdruez <[email protected]> * Add FAQ entry wrt. containers #1575 Signed-off-by: tdruez <[email protected]> --------- Signed-off-by: tdruez <[email protected]>
1 parent 9d05c92 commit 9cf22e0

File tree

5 files changed

+119
-15
lines changed

5 files changed

+119
-15
lines changed

docs/data-models.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,44 @@ Project
1414
:undoc-members:
1515
:member-order: groupwise
1616

17+
.. _data_models_codebase_resource:
18+
1719
CodebaseResource
1820
----------------
1921
.. autoclass:: scanpipe.models.CodebaseResource()
2022
:members:
2123
:undoc-members:
2224
:member-order: groupwise
2325

26+
.. _data_models_discovered_package:
27+
2428
DiscoveredPackage
2529
-----------------
2630
.. autoclass:: scanpipe.models.DiscoveredPackage()
2731
:members:
2832
:undoc-members:
2933
:member-order: groupwise
3034

35+
.. _data_models_discovered_dependency:
36+
3137
DiscoveredDependency
3238
--------------------
3339
.. autoclass:: scanpipe.models.DiscoveredDependency()
3440
:members:
3541
:undoc-members:
3642
:member-order: groupwise
3743

44+
.. _data_models_codebase_relation:
45+
3846
CodebaseRelation
3947
----------------
4048
.. autoclass:: scanpipe.models.CodebaseRelation()
4149
:members:
4250
:undoc-members:
4351
:member-order: groupwise
4452

53+
.. _data_models_project_message:
54+
4555
ProjectMessage
4656
--------------
4757
.. autoclass:: scanpipe.models.ProjectMessage()

docs/faq.rst

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,39 @@ data older than 7 days::
322322
command.
323323

324324
How can I provide my license policies?
325-
---------------------------------------
325+
--------------------------------------
326326

327327
For detailed information about the policies system, refer to :ref:`policies`.
328+
329+
Can you analyze Dockerfiles?
330+
----------------------------
331+
332+
We have code in https://github.com/aboutcode-org/container-inspector/blob/main/src/container_inspector/dockerfile.py
333+
for this ... but this may not be wired in other tools at the moment.
334+
It can for instance map dockerfile instructions to actual docker image history,
335+
https://github.com/aboutcode-org/container-inspector/blob/main/src/container_inspector/dockerfile.py#L204
336+
337+
Can you analyze a built image? (Build Docker Image Analysis)
338+
------------------------------------------------------------
339+
340+
Yes, we do this in ScanCode.io. We have one fairly unique feature to actually account
341+
for all files used in all layers.
342+
343+
Can you analyze all layers of a running container?
344+
--------------------------------------------------
345+
346+
ScanCode.io scans all layers of images. We can scan all layers of a running container
347+
if you save the running container as an image first.
348+
We can also fetch images from registries, local files and technically also from a
349+
running container, say in a local docker ... but this has not yet been tested so far.
350+
We do not introspect k8s clusters to analyze the deployed and running images
351+
there (yet) and that would be a nice future addition.
352+
For now we can instead work on the many images there, save and analyze them.
353+
354+
Can you analyze Docker in Docker?
355+
---------------------------------
356+
357+
The input to ScanCode is a local saved image: Docker or OCI.
358+
Docker in Docker support will demand to have access to the saved images
359+
(either extracted from the Docker images in Docker, or mounted in a volume or saved
360+
from the Docker in the Docker image). Once saved we can analyze these alright.
-57.6 KB
Binary file not shown.
-55.3 KB
Binary file not shown.

docs/output-files.rst

Lines changed: 75 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ ScanCode.io home screen.
6464

6565
.. image:: images/output-files-projects-list.png
6666

67-
Understanding Output Files
68-
--------------------------
69-
As previously mentioned, the output file format is set using the ``–-format``
70-
option to either JSON or XLSX data files. Regardless of the format, the
71-
data included in either output file remains almost the same.
67+
Supported formats
68+
-----------------
69+
70+
.. _output_files_json:
7271

7372
JSON
7473
^^^^
@@ -252,23 +251,85 @@ The results will also include all of the or files (codebase resources) found.
252251
"is_archive": false
253252
}]
254253
254+
.. _output_files_xlsx:
255+
255256
Excel (XLSX)
256257
^^^^^^^^^^^^
257-
ScanCode.io can produce the scan results in a .xlsx file format, which will
258-
include two Excel sheets for the Discovered Packages and the Codebase Resources.
258+
ScanCode.io can generate scan results in **Excel (.xlsx)** format. The exported file
259+
contains multiple sheets, categorized by data type. The following sheets are
260+
**always included**:
261+
262+
- **PACKAGES**: :ref:`data_models_discovered_package`
263+
- **DEPENDENCIES**: :ref:`data_models_discovered_dependency`
264+
- **RESOURCES**: :ref:`data_models_codebase_resource`
265+
- **RELATIONS**: :ref:`data_models_codebase_relation`
266+
- **MESSAGES**: :ref:`data_models_project_message`
267+
268+
Additional sheets are included **only when relevant** (i.e., when data is available):
269+
270+
- **LAYERS**: Included when scanning **container images** using the
271+
:ref:`pipeline_analyze_docker_image` pipeline.
272+
- **TODOS**: Contains resources flagged as **"REQUIRES_REVIEW"**.
273+
- **VULNERABILITIES**: Lists vulnerabilities detected in project **packages** and
274+
**dependencies**, typically when using the :ref:`pipeline_find_vulnerabilities`
275+
pipeline. This sheet is omitted if no vulnerabilities are found.
276+
277+
.. warning::
278+
Unlike JSON exports, the **XLSX output** does not include general scan metadata,
279+
such as tool version, execution date, or scan parameters.
280+
281+
Since it contains only a subset of the project data, it **cannot** be used to
282+
recreate the project. For this purpose, prefer the :ref:`output_files_json` output.
283+
284+
.. _output_files_spdx:
285+
286+
SPDX
287+
^^^^
288+
289+
ScanCode.io can generate Software Bill of Materials (SBOM) in the **SPDX** format,
290+
which is an open standard for communicating software component information.
291+
SPDX is widely used for license compliance, security analysis, and software supply
292+
chain transparency.
293+
294+
For more details, visit: https://spdx.dev/
295+
296+
The SPDX output includes:
297+
298+
- **Packages:** Information about detected software packages, including name, version,
299+
licensing, and supplier details.
300+
- **Files:** A list of scanned files with associated metadata, including licenses and
301+
copyright notices.
302+
- **Relationships:** Dependencies and associations between packages and files.
303+
- **Licenses:** License expressions for detected components.
259304

260305
.. note::
261-
Unlike the JSON file, the XLSX output file does not include any general
262-
information about the scan process, tool, date, etc.
306+
ScanCode.io produces SPDX documents in **SPDX JSON and Tag/Value formats**.
263307

264-
The **Discovered Packages** data sheet includes details about all packages found:
308+
.. _output_files_cyclonedx:
265309

266-
.. image:: images/output-files-xlsx-packages.png
310+
CycloneDX
311+
^^^^^^^^^
267312

268-
while the **Codebase Resources** sheet includes information about each
269-
individual file:
313+
ScanCode.io can generate **CycloneDX** SBOMs, a lightweight standard designed for
314+
security and dependency management. CycloneDX is optimized for vulnerability analysis
315+
and software supply chain risk assessment.
316+
317+
For more details, visit: https://cyclonedx.org/
318+
319+
The CycloneDX output includes:
320+
321+
- **Components:** A list of identified software components, including their
322+
versions and licensing information.
323+
- **Dependencies:** Relationships between software components, useful for analyzing
324+
supply chain risks.
325+
- **Vulnerabilities (when available):** If vulnerability scanning is enabled,
326+
detected vulnerabilities will be included in the CycloneDX output.
327+
- **Metadata:** Information about the scan, including tool details and execution data.
328+
329+
.. note::
330+
ScanCode.io produces CycloneDX SBOMs in **JSON format**.
270331

271-
.. image:: images/output-files-xlsx-resources.png
332+
.. _output_files_attribution:
272333

273334
Attribution
274335
^^^^^^^^^^^

0 commit comments

Comments
 (0)