Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature: Add support for --ignore-unfixed #10

Merged
merged 1 commit into from
Jun 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ jobs:
run: |
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
- name: Run vulnerability scanner
uses: aquasecurity/trivy-action@0.0.6
uses: aquasecurity/trivy-action@0.0.7
with:
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
```

Expand All @@ -55,12 +56,13 @@ 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 |
| `severity` | String | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | Severities of vulnerabilities to be displayed |
| 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 |
| `ignore-unfixed` | Boolean | false | Ignore unpatched/unfixed vulnerabilities |
| `severity` | String | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | Severities of vulnerabilities to be displayed |

[release]: https://github.com/aquasecurity/trivy-action/releases/latest
[release-img]: https://img.shields.io/github/release/aquasecurity/trivy-action.svg?logo=github
Expand Down
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'
ignore-unfixed:
description: 'ignore unfixed vulnerabilities'
required: false
default: false
severity:
description: 'severities of vulnerabilities to be displayed'
required: false
Expand All @@ -24,5 +28,6 @@ runs:
- 'image'
- '--format=${{ inputs.format }}'
- '--exit-code=${{ inputs.exit-code }}'
- '--ignore-unfixed=${{ inputs.ignore-unfixed }}'
- '--severity=${{ inputs.severity }}'
- '${{ inputs.image-ref }}'