Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f498173417 | ||
|
|
c88ebc55b9 | ||
|
|
1eb53c0425 |
@@ -6,6 +6,8 @@
|
|||||||
[![GitHub Marketplace][marketplace-img]][marketplace]
|
[![GitHub Marketplace][marketplace-img]][marketplace]
|
||||||
[![License][license-img]][license]
|
[![License][license-img]][license]
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
|
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
@@ -39,11 +41,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
|
docker build -t docker.io/my-organization/my-app:${{ github.sha }} .
|
||||||
- name: Run vulnerability scanner
|
- name: Run vulnerability scanner
|
||||||
uses: aquasecurity/trivy-action@0.0.5
|
uses: aquasecurity/trivy-action@0.0.7
|
||||||
with:
|
with:
|
||||||
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
|
image-ref: 'docker.io/my-organization/my-app:${{ github.sha }}'
|
||||||
format: 'table'
|
format: 'table'
|
||||||
exit-code: '1'
|
exit-code: '1'
|
||||||
|
ignore-unfixed: true
|
||||||
severity: 'CRITICAL,HIGH'
|
severity: 'CRITICAL,HIGH'
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -53,13 +56,13 @@ jobs:
|
|||||||
|
|
||||||
Following inputs can be used as `step.with` keys:
|
Following inputs can be used as `step.with` keys:
|
||||||
|
|
||||||
| Name | Type | Default | Description |
|
| Name | Type | Default | Description |
|
||||||
|-------------|--------|------------------------------------|-----------------------------------------------|
|
|------------------|---------|------------------------------------|-----------------------------------------------|
|
||||||
| `image-ref` | String | | Image reference, e.g. `alpine:3.10.2` |
|
| `image-ref` | String | | Image reference, e.g. `alpine:3.10.2` |
|
||||||
| `format` | String | `table` | Output format (`table`, `json`) |
|
| `format` | String | `table` | Output format (`table`, `json`) |
|
||||||
| `exit-code` | String | `0` | exit code when vulnerabilities were found |
|
| `exit-code` | String | `0` | Exit code when vulnerabilities were found |
|
||||||
| `severity` | String | `UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL` | severities of vulnerabilities to be displayed |
|
| `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]: https://github.com/aquasecurity/trivy-action/releases/latest
|
||||||
[release-img]: https://img.shields.io/github/release/aquasecurity/trivy-action.svg?logo=github
|
[release-img]: https://img.shields.io/github/release/aquasecurity/trivy-action.svg?logo=github
|
||||||
|
|||||||
+6
-1
@@ -1,5 +1,5 @@
|
|||||||
name: 'Trivy Vulnerability Scanner'
|
name: 'Trivy Vulnerability Scanner'
|
||||||
description: 'Scan container image for vulnerabilities with Trivy'
|
description: 'Scans container images for vulnerabilities with Trivy'
|
||||||
author: 'Aqua Security'
|
author: 'Aqua Security'
|
||||||
inputs:
|
inputs:
|
||||||
image-ref:
|
image-ref:
|
||||||
@@ -9,6 +9,10 @@ inputs:
|
|||||||
description: 'exit code when vulnerabilities were found'
|
description: 'exit code when vulnerabilities were found'
|
||||||
required: false
|
required: false
|
||||||
default: '0'
|
default: '0'
|
||||||
|
ignore-unfixed:
|
||||||
|
description: 'ignore unfixed vulnerabilities'
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
severity:
|
severity:
|
||||||
description: 'severities of vulnerabilities to be displayed'
|
description: 'severities of vulnerabilities to be displayed'
|
||||||
required: false
|
required: false
|
||||||
@@ -24,5 +28,6 @@ runs:
|
|||||||
- 'image'
|
- 'image'
|
||||||
- '--format=${{ inputs.format }}'
|
- '--format=${{ inputs.format }}'
|
||||||
- '--exit-code=${{ inputs.exit-code }}'
|
- '--exit-code=${{ inputs.exit-code }}'
|
||||||
|
- '--ignore-unfixed=${{ inputs.ignore-unfixed }}'
|
||||||
- '--severity=${{ inputs.severity }}'
|
- '--severity=${{ inputs.severity }}'
|
||||||
- '${{ inputs.image-ref }}'
|
- '${{ inputs.image-ref }}'
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 505 KiB |
Reference in New Issue
Block a user