Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: Move default.tpl from src/template/ to src/ #97

Merged
merged 1 commit into from
Jun 3, 2021
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If vulnerabilities are found by Trivy, it creates the following GitHub Issue.
|severity|False|HIGH,CRITICAL|Severities of vulnerabilities (separated by commma)|
|vuln_type|False|os,library|Scan target are os and / or library (separated by commma)|
|ignore_unfixed|False|false|Ignore unfixed vulnerabilities<br>Please specify `true` or `false`|
|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)|
|template|False|N/A|Trivy --template option<br>By default, it uses src/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)|
|issue_title|False|Security Alert|Issue title|
|issue_label|False|trivy,vulnerability|Issue label (separated by commma)|
|issue_assignee|False|N/A|Issue assignee (separated by commma)|
Expand Down
2 changes: 1 addition & 1 deletion __tests__/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as fs from 'fs';
import * as path from 'path';
import { Downloader } from '../src/downloader';

export const template = path.join(__dirname, '../src/template/default.tpl');
export const template = path.join(__dirname, '../src/default.tpl');

const downloader = new Downloader();

Expand Down
2 changes: 1 addition & 1 deletion __tests__/trivy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { TrivyCmdOption } from '../src/interface';
import { removeTrivyCmd } from './helper';

const downloader = new Downloader();
const template = `@${path.join(__dirname, '../src/template/default.tpl')}`;
const template = `@${path.join(__dirname, '../src/default.tpl')}`;

describe('Trivy scan', () => {
let trivyPath: string;
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export class Inputs {
severity: core.getInput('severity').replace(/\s+/g, ''),
vulnType: core.getInput('vuln_type').replace(/\s+/g, ''),
ignoreUnfixed: core.getInput('ignore_unfixed').toLowerCase() === 'true',
template:
core.getInput('template') || `@${__dirname}/template/default.tpl`
template: core.getInput('template') || `@${__dirname}/default.tpl`
}
};

Expand Down