Skip to content

Commit

Permalink
Issue 95 fix (#98)
Browse files Browse the repository at this point in the history
* fix the report name
  • Loading branch information
fatihtokus authored Sep 21, 2024
1 parent 3a50d41 commit 22f29a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion release-candidate/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: "rc0.3.5"
usage: scan targets into a smart html file
description: |-
A Trivy plugin that scans and outputs the results to a html file.
trivy scan2html [-h,--help] command target filename.
trivy scan2html [-h,--help] command target filename
platforms:
- selector:
os: windows
Expand Down
8 changes: 4 additions & 4 deletions scan2html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function replaceText() {
}

function generateReportName() {
echo "function generateReportName"
echo "function generateReportName" >&2
local reportName="$1"
if [ -f $reportName ]; then
timestamp=$(date +%s)
Expand All @@ -105,7 +105,7 @@ function combineReports {
combinedResultFile="$1"
args=("${@:2:$#0}")
resultsFiles="${args[@]}"

echo "combinedResultFile: $combinedResultFile"
echo "args: $args"
echo "resultsFiles: $resultsFiles"
Expand Down Expand Up @@ -141,7 +141,7 @@ function generateHtmlReport {
echo "reportName: $reportName"
tmp_result="results.json"
result_json="$BASEDIR"/$tmp_result

reportName=$(generateReportName "$reportName")

cat "$BASEDIR"/report_template.html >>"$reportName"
Expand Down Expand Up @@ -174,7 +174,7 @@ function generate {

combineReports "$result_json" "$resultsFiles"

generateHtmlReport "$BASEDIR" "$reportName"
generateHtmlReport "$BASEDIR" "$reportName"

exit
}
Expand Down

0 comments on commit 22f29a5

Please sign in to comment.