Skip to content

Commit 63e138a

Browse files
committed
chore: Modify action metadata to support template option
1 parent 0d9e3c8 commit 63e138a

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ If vulnerabilities are found by Trivy, it creates the following GitHub Issue.
1111

1212
![image](./assets/img/issue.png)
1313

14-
## Usage
15-
16-
### Inputs
14+
## Inputs
1715

1816
|Parameter|Required|Default Value|Description|
1917
|:--:|:--:|:--:|:--|
@@ -22,21 +20,21 @@ If vulnerabilities are found by Trivy, it creates the following GitHub Issue.
2220
|severity|False|HIGH,CRITICAL|Severities of vulnerabilities (separated by commma)|
2321
|vuln_type|False|os,library|Scan target are os and / or library (separated by commma)|
2422
|ignore_unfixed|False|false|Ignore unfixed vulnerabilities<br>Please specify `true` or `false`|
25-
|issue|False|true|Decide whether creating issue when vulnerabilities are found by trivy.<br>Please specify `true` or `false`|
26-
|token|True if issue parameter is true else False|N/A|GitHub Access Token.<br>${{ secrets.GITHUB_TOKEN }} is recommended.|
23+
|template|False|N/A|Trivy --template option<br>By default, it uses src/template/default.tpl which is based on [contrib/html.tpl](https://github.com/aquasecurity/trivy/blob/main/contrib/html.tpl)<br>reference: [Report Formats - Trivy](https://aquasecurity.github.io/trivy/v0.18.3/examples/report/#template)|
24+
|token|True|N/A|GitHub Access Token.<br>${{ secrets.GITHUB_TOKEN }} is recommended.|
2725
|issue_title|False|Security Alert|Issue title|
2826
|issue_label|False|trivy,vulnerability|Issue label (separated by commma)|
2927
|issue_assignee|False|N/A|Issue assignee (separated by commma)|
3028
|fail_on_vulnerabilities|False|false|Whether the action should fail if any vulnerabilities were found.|
3129

32-
### Outputs
30+
## Outputs
3331

3432
|Parameter|Description|
3533
|:--:|:--|
3634
|html_url|The URL to view the issue|
3735
|issue_number|The created issue number|
3836

39-
## Example Workflow
37+
## Example
4038

4139
Detect your docker image vulnerability everyday at 9:00 (UTC).
4240

@@ -55,7 +53,7 @@ jobs:
5553
- name: Pull docker image
5654
run: docker pull sample
5755

58-
- uses: lazy-actions/gitrivy@main
56+
- uses: lazy-actions/gitrivy@v2
5957
with:
6058
token: ${{ secrets.GITHUB_TOKEN }}
6159
image: sample

action.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ inputs:
2121
description: 'Ignore unfixed vulnerabilities [true, false]'
2222
default: 'false'
2323
required: false
24-
issue:
25-
description: 'Decide whether to create a issue when vulnerabilities are found [true, false]'
26-
default: 'true'
27-
required: false
24+
template:
25+
description: 'Trivy --template option'
26+
required: false
2827
token:
2928
description: 'GitHub access token used to create a issue'
30-
required: false
29+
required: true
3130
issue_title:
3231
description: 'Issue title'
3332
default: 'Security Alert'

0 commit comments

Comments
 (0)