# inspector-sbomgen

## Overview

Docker image for the [Amazon Inspector SBOM Generator](https://docs.aws.amazon.com/inspector/latest/user/sbom-generator.html).

This is used to produce SBOMs (Software Bill of Materials) for Docker images, which are in turn used to scan for vulnerabilities.

## Usage

### Create SBOM for a Docker image tarball

First a Docker image tarball using the `docker save` command

```
docker save 086679231553.dkr.ecr.us-east-1.amazonaws.com/docker-parent-images:debian12 -o image.tar
```

Generate an SBOM as follows:

```
docker run \
  -v $(pwd):/var/app/output \
  -v $(pwd)/image.tar:/var/app/image.tar \
  inspector-sbomgen container --image image.tar -o output/sbom.json
```
