sbom4files


Namesbom4files JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/anthonyharrison/sbom4files
SummarySBOM generator for files in a directory
upload_time2023-11-26 17:19:46
maintainerAnthony Harrison
docs_urlNone
authorAnthony Harrison
requires_python>=3.7
licenseApache-2.0
keywords security tools sbom devsecops spdx cyclonedx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SBOM4Files

SBOM4Files generates a SBOM (Software Bill of Materials) for a directory in a number of formats including
[SPDX](https://www.spdx.org) and [CycloneDX](https://www.cyclonedx.org).
It identifies all files within a directory and includes license and copyright information, where possible, for each file.

It is intended to be used as part of a continuous integration system to enable accurate records of SBOMs to be maintained, typically through the
build development phase, and also to support subsequent audit needs to determine if a particular component has been used.

## Installation

To install use the following command:

`pip install sbom4files`

Alternatively, just clone the repo and install dependencies using the following command:

`pip install -U -r requirements.txt`

The tool requires Python 3 (3.7+). It is recommended to use a virtual python environment especially
if you are using different versions of python. `virtualenv` is a tool for setting up virtual python environments which
allows you to have all the dependencies for the tool set up in a single environment, or have different environments set
up for testing using different versions of Python.

### Issues with Windows Installation

When running on Windows, if you get the following error

`ImportError: failed to find libmagic.  Check your installation`

This is because of a mismatch with the installation of the magic library. To resolve, please issue the following commands

```bash
pip uninstall python-magic
pip uninstall python-magic-bin

pip install python-magic
pip install python-magic-bin
```

## Usage

```
usage: sbom4files [-h] [-d DIRECTORY] [-p PROJECT] [-r] 
                  [-i IGNORE] [--debug] [--sbom {spdx,cyclonedx}] 
                  [--format {tag,json,yaml}] [-o OUTPUT_FILE] [-V]

SBOM4Files generates a Software Bill of Materials for the files within a directory.

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit

Input:
  -d DIRECTORY, --directory DIRECTORY
                        Directory to be scanned
  -p PROJECT, --project PROJECT
                        Name of project
  -r, --recurse         Recurse directories
  -i IGNORE, --ignore IGNORE
                        Comma separated list of extensions to ignore

Output:
  --debug               add debug information
  --sbom {spdx,cyclonedx}
                        specify type of sbom to generate (default: spdx)
  --format {tag,json,yaml}
                        format for SPDX software bill of materials (sbom) (default: tag)
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        output filename (default: output to stdout)
```
					
## Operation

The `--directory` option is used to identify the directory to be scanned. If this option is not specified, the current directory is assumed.
Specifying the `--recurse` option will result in the files in subdirectories being included in the generation of the SBOM.

The `--project` option is used to specify the name of a project to be referenced in the generated SBOM. This option must be specified.

The `--ignore` option is used to specify the file extensions which are to be ignored. This option is optional.

The `--sbom` option is used to specify the format of the generated SBOM (the default is SPDX). The `--format` option
can be used to specify the formatting of the SPDX SBOM (the default is Tag Value format but JSON and YAML format is also supported).
All CycloneDX SBOMs are generated in JSON format.

The `--output-file` option is used to control the destination of the output generated by the tool. The
default is to report to the console but can be stored in a file (specified using `--output-file` option).

The application will attempt to extract the license and copyright information for each file. 

Checksums in SHA1, SHA256 and SHA512 formats are generated for each file.

## Licence

Licenced under the Apache 2.0 Licence.

## Limitations

This tool is meant to support software development and security audit functions. The usefulness of the tool is dependent on the SBOM data
which is provided to the tool. Unfortunately, the tool is unable to determine the validity or completeness of such a SBOM file; users of the tool
are therefore reminded that they should assert the quality of any data which is provided to the tool.

When processing and validating licenses, the application will use a set of synonyms to attempt to map some license identifiers to the correct [SPDX License Identifiers](https://spdx.org/licenses/). However, the
user of the tool is reminded that they should assert the quality of any data which is provided by the tool particularly where the license identifier has been modified.

## Feedback and Contributions

Bugs and feature requests can be made via GitHub Issues.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/anthonyharrison/sbom4files",
    "name": "sbom4files",
    "maintainer": "Anthony Harrison",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "anthony.p.harrison@gmail.com",
    "keywords": "security,tools,SBOM,DevSecOps,SPDX,CycloneDX",
    "author": "Anthony Harrison",
    "author_email": "anthony.p.harrison@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# SBOM4Files\n\nSBOM4Files generates a SBOM (Software Bill of Materials) for a directory in a number of formats including\n[SPDX](https://www.spdx.org) and [CycloneDX](https://www.cyclonedx.org).\nIt identifies all files within a directory and includes license and copyright information, where possible, for each file.\n\nIt is intended to be used as part of a continuous integration system to enable accurate records of SBOMs to be maintained, typically through the\nbuild development phase, and also to support subsequent audit needs to determine if a particular component has been used.\n\n## Installation\n\nTo install use the following command:\n\n`pip install sbom4files`\n\nAlternatively, just clone the repo and install dependencies using the following command:\n\n`pip install -U -r requirements.txt`\n\nThe tool requires Python 3 (3.7+). It is recommended to use a virtual python environment especially\nif you are using different versions of python. `virtualenv` is a tool for setting up virtual python environments which\nallows you to have all the dependencies for the tool set up in a single environment, or have different environments set\nup for testing using different versions of Python.\n\n### Issues with Windows Installation\n\nWhen running on Windows, if you get the following error\n\n`ImportError: failed to find libmagic.  Check your installation`\n\nThis is because of a mismatch with the installation of the magic library. To resolve, please issue the following commands\n\n```bash\npip uninstall python-magic\npip uninstall python-magic-bin\n\npip install python-magic\npip install python-magic-bin\n```\n\n## Usage\n\n```\nusage: sbom4files [-h] [-d DIRECTORY] [-p PROJECT] [-r] \n                  [-i IGNORE] [--debug] [--sbom {spdx,cyclonedx}] \n                  [--format {tag,json,yaml}] [-o OUTPUT_FILE] [-V]\n\nSBOM4Files generates a Software Bill of Materials for the files within a directory.\n\noptions:\n  -h, --help            show this help message and exit\n  -V, --version         show program's version number and exit\n\nInput:\n  -d DIRECTORY, --directory DIRECTORY\n                        Directory to be scanned\n  -p PROJECT, --project PROJECT\n                        Name of project\n  -r, --recurse         Recurse directories\n  -i IGNORE, --ignore IGNORE\n                        Comma separated list of extensions to ignore\n\nOutput:\n  --debug               add debug information\n  --sbom {spdx,cyclonedx}\n                        specify type of sbom to generate (default: spdx)\n  --format {tag,json,yaml}\n                        format for SPDX software bill of materials (sbom) (default: tag)\n  -o OUTPUT_FILE, --output-file OUTPUT_FILE\n                        output filename (default: output to stdout)\n```\n\t\t\t\t\t\n## Operation\n\nThe `--directory` option is used to identify the directory to be scanned. If this option is not specified, the current directory is assumed.\nSpecifying the `--recurse` option will result in the files in subdirectories being included in the generation of the SBOM.\n\nThe `--project` option is used to specify the name of a project to be referenced in the generated SBOM. This option must be specified.\n\nThe `--ignore` option is used to specify the file extensions which are to be ignored. This option is optional.\n\nThe `--sbom` option is used to specify the format of the generated SBOM (the default is SPDX). The `--format` option\ncan be used to specify the formatting of the SPDX SBOM (the default is Tag Value format but JSON and YAML format is also supported).\nAll CycloneDX SBOMs are generated in JSON format.\n\nThe `--output-file` option is used to control the destination of the output generated by the tool. The\ndefault is to report to the console but can be stored in a file (specified using `--output-file` option).\n\nThe application will attempt to extract the license and copyright information for each file. \n\nChecksums in SHA1, SHA256 and SHA512 formats are generated for each file.\n\n## Licence\n\nLicenced under the Apache 2.0 Licence.\n\n## Limitations\n\nThis tool is meant to support software development and security audit functions. The usefulness of the tool is dependent on the SBOM data\nwhich is provided to the tool. Unfortunately, the tool is unable to determine the validity or completeness of such a SBOM file; users of the tool\nare therefore reminded that they should assert the quality of any data which is provided to the tool.\n\nWhen processing and validating licenses, the application will use a set of synonyms to attempt to map some license identifiers to the correct [SPDX License Identifiers](https://spdx.org/licenses/). However, the\nuser of the tool is reminded that they should assert the quality of any data which is provided by the tool particularly where the license identifier has been modified.\n\n## Feedback and Contributions\n\nBugs and feature requests can be made via GitHub Issues.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "SBOM generator for files in a directory",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/anthonyharrison/sbom4files"
    },
    "split_keywords": [
        "security",
        "tools",
        "sbom",
        "devsecops",
        "spdx",
        "cyclonedx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fea65895df26be58577daf42085822d607d30949fb7adff988aae943e0ec8188",
                "md5": "b1788a45d54288283dd84f811944b90b",
                "sha256": "dfdb3e88ac20272703e78137ba0035095a4b6d19f6f00b24ce2619126fa2d47d"
            },
            "downloads": -1,
            "filename": "sbom4files-0.4.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b1788a45d54288283dd84f811944b90b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 12757,
            "upload_time": "2023-11-26T17:19:46",
            "upload_time_iso_8601": "2023-11-26T17:19:46.369008Z",
            "url": "https://files.pythonhosted.org/packages/fe/a6/5895df26be58577daf42085822d607d30949fb7adff988aae943e0ec8188/sbom4files-0.4.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-26 17:19:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "anthonyharrison",
    "github_project": "sbom4files",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "sbom4files"
}
        
Elapsed time: 0.14454s