feat: replace string-substitution HTML templates with Jinja2 (#51) - #167
Open
jeffrey-theog06 wants to merge 2 commits into
Open
feat: replace string-substitution HTML templates with Jinja2 (#51)#167jeffrey-theog06 wants to merge 2 commits into
jeffrey-theog06 wants to merge 2 commits into
Conversation
jeffrey-theog06
force-pushed
the
feat/jinja2-html-templates
branch
from
September 9, 2026 05:16
6b7bda7 to
eb1df42
Compare
|
|
||
| from docksec import output | ||
| from docksec.config import RESULTS_DIR, get_html_template | ||
| from docksec.config import RESULTS_DIR, TEMPLATES_DIR, get_html_template |
Collaborator
There was a problem hiding this comment.
Hello @jeffrey-theog06 thank you for the PR. can you please fix this?
Author
There was a problem hiding this comment.
Hello @jeffrey-theog06 thank you for the PR. can you please fix this?
Sure sir.. Will work on it!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #167 +/- ##
==========================================
+ Coverage 78.95% 80.96% +2.01%
==========================================
Files 26 32 +6
Lines 4158 5107 +949
==========================================
+ Hits 3283 4135 +852
- Misses 875 972 +97
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
|
@advaitpatel Sir.. please check and let me know if its a valid fix.. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #51
Overview
Migrated HTML report generation from manual string replacement to Jinja2 with auto-escaping.
Changes
jinja2>=3.1.0torequirements.txtandsetup.py.docksec/templates/report.html.j2with native loops, conditionals, and auto-escaping.ReportGenerator.generate_html_reportto usejinja2.Environmentwithselect_autoescape.{{VAR}}replacements.tests/test_report_generator.pycovering loops, empty states, and auto-escaping.