Skip to content

Commit

Permalink
feat: Add severity arg (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Pacak <[email protected]>
  • Loading branch information
danielpacak authored Jun 2, 2020
1 parent 7453809 commit 1c67427
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ jobs:
run: |
docker build -t docker.io/my-organization/my-app:${{ github.sha }}
- name: Run vulnerability scanner
uses: aquasecurity/[email protected].4
uses: aquasecurity/[email protected].5
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'table'
exit-code: '1'
severity: 'CRITICAL,HIGH'
```
## Customizing
Expand All @@ -48,8 +49,9 @@ jobs:
Following inputs can be used as `step.with` keys:

| Name | Type | Default | Description |
|-------------|--------|---------|-------------------------------------------|
| `image-ref` | String | | Image reference, e.g. `alpine:3.10.2` |
| `format` | String | `table` | Output format (`table`, `json`) |
| `exit-code` | String | `0` | exit code when vulnerabilities were found |
| Name | Type | Default | Description |
|-------------|--------|------------------------------------|-----------------------------------------------|
| `image-ref` | String | | Image reference, e.g. `alpine:3.10.2` |
| `format` | String | `table` | Output format (`table`, `json`) |
| `exit-code` | String | `0` | exit code when vulnerabilities were found |
| `severity` | String | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | severities of vulnerabilities to be displayed |
5 changes: 5 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'exit code when vulnerabilities were found'
required: false
default: '0'
severity:
description: 'severities of vulnerabilities to be displayed'
required: false
default: 'UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL'
format:
description: 'output format (table, json)'
required: false
Expand All @@ -24,4 +28,5 @@ runs:
- 'image'
- '--format=${{ inputs.format }}'
- '--exit-code=${{ inputs.exit-code }}'
- '--severity=${{ inputs.severity }}'
- '${{ inputs.image-ref }}'

0 comments on commit 1c67427

Please sign in to comment.