-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated reporting formats to include an array of new flavors (#24)
Co-authored-by: Britton Hayes <[email protected]>
- Loading branch information
1 parent
a58d4dd
commit bde62a2
Showing
8 changed files
with
188 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Pillager - Scan Results</title> | ||
<link rel="stylesheet" href="https://unpkg.com/bulmaswatch/superhero/bulmaswatch.min.css"> | ||
</head> | ||
<body> | ||
<section class="section"> | ||
<div class="container"> | ||
<h1 class="title"> | ||
Pillager | ||
</h1> | ||
<h2 class="subtitle"> | ||
Results of your latest hunt | ||
</h2> | ||
<div class="table-container"> | ||
<table class="table is-fullwidth"> | ||
<thead> | ||
<tr> | ||
<th><abbr title="Filename">File</abbr></th> | ||
<th><abbr title="Line Number">Line</abbr></th> | ||
<th><abbr title="Offender">Leak</abbr></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{ range .Leaks }} | ||
<tr> | ||
<th>{{.File}}</th> | ||
<td>{{.LineNumber}}</td> | ||
<td class="has-text-danger">{{.Offender}}</td> | ||
</tr> | ||
{{ end }} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,5 @@ | ||
<!DOCTYPE html> | ||
<html lang="en-us"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>Pillager - Scan Results</title> | ||
<style type="text/css"> | ||
.offender { | ||
-webkit-text-security: disc !important; | ||
} | ||
|
||
.offender:hover { | ||
-webkit-text-security: none; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css"> | ||
</head> | ||
<body> | ||
<section class="hero is-black"> | ||
<div class="hero-body"> | ||
<p class="title"> | ||
Pillager | ||
</p> | ||
<p class="subtitle"> | ||
Results of your latest hunt | ||
</p> | ||
</div> | ||
</section> | ||
<section class="section"> | ||
<div class="container"> | ||
<div class="table-container"> | ||
<table class="table is-fullwidth"> | ||
<thead> | ||
<tr> | ||
<th><abbr title="Filename">File</abbr></th> | ||
<th><abbr title="Line Number">Line</abbr></th> | ||
<th><abbr title="Offender">Leak</abbr></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{ range .Leaks }} | ||
<tr> | ||
<th>{{.File}}</th> | ||
<td>{{.LineNumber}}</td> | ||
<td class="has-text-danger">{{.Offender}}</td> | ||
</tr> | ||
{{ end }} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</section> | ||
|
||
</body> | ||
</html> | ||
| File | Line | Offender | | ||
| --------| ---------| -------- | | ||
{{ range .Leaks -}} | ||
| {{ .File }} | {{.LineNumber}} | {{.Offender}} | | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package templates | ||
|
||
import _ "embed" | ||
|
||
var ( | ||
//go:embed simple.tmpl | ||
Simple string | ||
|
||
//go:embed html.tmpl | ||
HTML string | ||
|
||
//go:embed markdown.tmpl | ||
Markdown string | ||
|
||
//go:embed table.tmpl | ||
Table string | ||
|
||
//go:embed html-table.tmpl | ||
HTMLTable string | ||
) |