> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# aquasecurity/microscanner

This orb creates a wrapper for the Aqua Security MicroScanner. This tool is freely available on GitHub.


## Commands

### install

Create the runtime scanning

| Parameter | Type | Default | Description |
|---|---|---|---|
| `token` | string | $AQUA_TOKEN | The Aqua MicroScanner token |

### scan

Scan the container image

| Parameter | Type | Default | Description |
|---|---|---|---|
| `token` | string | $AQUA_TOKEN | The Aqua MicroScanner token |
| `microscanner_options` | string | $MICROSCANNER_OPTIONS | This var allows for option flags to be passed to the MicroScanner. |
| `image` | string |  | The image to scan |
| `artifact-type` | string | html | The type of artifact to output; html is default, json is optional. |

## Jobs

### scan-image

| Parameter | Type | Default | Description |
|---|---|---|---|
| `token` | string | $AQUA_TOKEN | The Aqua microscanner token |
| `microscanner_options` | string | $MICROSCANNER_OPTIONS | This var allows for option flags to be passed to the MicroScanner. |
| `image` | string |  | The image to scan |
| `artifact-type` | string | html | The type of artifact to output |
| `dockerfile-path` | string | . | The path to your Dockerfile |

## Executors

### default

A debian-based machine executor.  Note that there is an overhead for provisioning a machine executor as a result of spinning up a private Docker server. Use of the machine key may require additional fees.

## Examples

### simple_build_and_scan

Scan a newly built docker image with the Aqua Security microscanner.

```yaml
version: 2.1
orbs:
  microscanner: aquasecurity/microscanner@dev:0.1.1
jobs:
  docker-build:
    executor: microscanner/default
    steps:
      - checkout
      - run: docker build -t myrepo/myimage:tag .
workflows:
  scan-image:
    jobs:
      - docker-build
      - microscanner/scan-image:
          requires:
            - docker-build
          context: myContext
          image: myrepo/myimage:mytag
```