Description
Currently, the ReportGenerator class in backend/secuscan/reporting.py contains monolithic methods, specifically _generate_pdf_html_report, generate_html_report, and generate_sarif_report. These methods handle data parsing, conditional logic, and large string concatenations all in a single block.
This structure makes the file difficult to maintain and goes against the project's backend code style guideline to "prefer small functions over large, multi-purpose blocks".
Proposed Solution
I propose refactoring these methods by breaking them down into smaller, isolated helper methods (e.g., _build_pdf_finding_markup, _build_web_finding_markup, and _extract_sarif_rule_id).
- The underlying behavior, functionality, and generated outputs of the reports will not change.
- The refactor will strictly focus on improving code readability, testability, and modularity.
- I will ensure the backend test suite (
./testing/test_python.sh) passes locally before submitting the PR.
Additional Context
I am participating in GSSoC 2026 and would love to work on this! Please assign this issue to me, and I will open a Pull Request with the refactored code shortly.
Best,
Rohit Kattimani
Description
Currently, the
ReportGeneratorclass inbackend/secuscan/reporting.pycontains monolithic methods, specifically_generate_pdf_html_report,generate_html_report, andgenerate_sarif_report. These methods handle data parsing, conditional logic, and large string concatenations all in a single block.This structure makes the file difficult to maintain and goes against the project's backend code style guideline to "prefer small functions over large, multi-purpose blocks".
Proposed Solution
I propose refactoring these methods by breaking them down into smaller, isolated helper methods (e.g.,
_build_pdf_finding_markup,_build_web_finding_markup, and_extract_sarif_rule_id)../testing/test_python.sh) passes locally before submitting the PR.Additional Context
I am participating in GSSoC 2026 and would love to work on this! Please assign this issue to me, and I will open a Pull Request with the refactored code shortly.
Best,
Rohit Kattimani