https://github.com/trustsource/ts-docker
Allows to scan docker images and transfer the data to TrustSource https://app.trustsource.io
https://github.com/trustsource/ts-docker
Last synced: 3 months ago
JSON representation
Allows to scan docker images and transfer the data to TrustSource https://app.trustsource.io
- Host: GitHub
- URL: https://github.com/trustsource/ts-docker
- Owner: TrustSource
- License: apache-2.0
- Created: 2022-04-04T17:23:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-26T13:38:33.000Z (about 1 year ago)
- Last Synced: 2025-05-30T15:19:02.203Z (about 1 year ago)
- Language: Python
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# TrustSource Docker scanner
[](https://gitter.im/TrustSource/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

This is a wrapper for Syft, allowing to decompose a docker image - pulled from default
registry - and transferring the results to TrustSource or writing it into a local JSON.
# Prerequisites
**Syft** - a tool for generating a Software Bill of Materials (SBOM) from container images
and filesystems.
For the installation instruction, refer to [anchore:syft](https://github.com/anchore/syft).
ts-docker will use the default path set during the installation to find syft and handle it.
You may specify a path, in case this is required. See below for more information.
# Installation
To install, please clone the repo and install from there:
- Clone repository
```shell
git clone https://github.com/TrustSource/ts-docker.git
```
- Install using PIP from the base directory (where you have cloned the repo in)
```shell
pip3 install ./ts-docker
```
# Usage
You may execute the utility without any further connection to TrustSource. However, to
transfer data into TrustSource, you require a valid API key and a projectname to associate
transfered data with. To retrieve a valid API key, please contact your project manager or see
our [knowledgebase](https://support.trustsource.io/hc/en-us/search?utf8=✓&query=api+key)
## Execute Help
ts-docker has a CLI. To learn more, run `--help`
```shell
ts-docker --help
```
This will display the different options available:
```shell
Usage: ts-docker [OPTIONS] IMAGE
Options:
--syft-path TEXT Path to the Syft executable.
--apiKey TEXT API Key for data transfer to TrustSource.
--projectName TEXT Project name to associate data with.
--skipTransfer Skip transfer of results to TrustSource (local use only).
--settingsFile TEXT Path to a settings file, e.g. containing the API key
--outputFile TEXT Path to an output file, to store upload data locally (will be JSON).
--help Show this message and exit.
```
## Examples
### Prepare data without transfering
```shell
ts-docker --skipTransfer
```
Will execute the scan and write scan result to stdout.
### Prepare data and transfer to TrustSource
```shell
ts-docker --apiKey --projectName
```
Will execute the scan, upload data to TrustSource and associate it with project *NAME*.
# Questions & Support
Please find further information at our [knowledgebase](https://support.trustsource.io) or
contact [TrustSource Support](mailto:support@trustsource.io) for more questions.
Feel free to star, fork and improve. We are looking forward to get your feedback!