Skip to content

Commit

Permalink
Release 1.1.2 - Added TrivySummary version and link to PDF footer
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgewareRoad committed Mar 19, 2024
1 parent b727f6f commit d076515
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
4 changes: 1 addition & 3 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
Full whitelisting support (see README.md)

Documentation update.
Added TrivySummary version and link into the PDF output file footer

Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ private boolean summariseTrivyHistory(String title, TrivyScanHistory history, Pa
variables.put("openVulnerabilities", comparison.getOpenVulnerabilities());
variables.put("closedVulnerabilities", comparison.getClosedVulnerabilities());
variables.put("whitelistedVulnerabilities", comparison.getWhitelistedVulnerabilities());
variables.put("trivySummaryVersion", config.getVersion());

new RenderToPDF().renderToPDF(variables, "compareTrivyScans", outputFile);
}
Expand Down Expand Up @@ -323,6 +324,7 @@ private boolean summariseTrivyHistory(String title, TrivyScanHistory history, Pa
variables.put("scanDate", summary.getScanDate());
variables.put("openVulnerabilities", summary.getOpenVulnerabilities());
variables.put("whitelistedVulnerabilities", summary.getWhitelistedVulnerabilities());
variables.put("trivySummaryVersion", config.getVersion());

new RenderToPDF().renderToPDF(variables, "summariseTrivyScan", outputFile);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
trivysummary.version=1.1.1
trivysummary.version=1.1.2

logging.level.root=ERROR

Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/compareTrivyScans.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<body>

<span id="header" th:text="|${title}|"></span>
<span id="footer">Generated by <a href="https://github.com/EdgewareRoad/TrivySummary" th:text="|TrivySummary ${trivySummaryVersion}|"></a></span>

<h1 th:text="|${title}|">Title</h1>

Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/templates/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
margin-bottom: 6em;
margin-left: 4em;
margin-right: 4em;

/* headers*/
@top-left {
content: element(header);
}

@bottom-left {
content: "Generated by TrivySummary";
content: element(footer);
font-family: sans-serif;
font-size: 0.8em;
}
Expand All @@ -27,6 +28,11 @@
font-family: sans-serif;
}

#footer {
position: running(footer);
font-family: sans-serif;
}

*,
*::before,
*::after {
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/summariseTrivyScan.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<body>

<span id="header" th:text="|${title}|"></span>
<span id="footer">Generated by <a href="https://github.com/EdgewareRoad/TrivySummary" th:text="|TrivySummary ${trivySummaryVersion}|"></a></span>

<h1 th:text="|${title}|">Title</h1>

Expand Down

0 comments on commit d076515

Please sign in to comment.