feat : add markdown report export support#1592
Conversation
|
Thank you for taking the time to review this PR! 🚀 This PR introduces Markdown report export while keeping the reporting system consistent with the existing HTML, PDF, CSV, and SARIF formats. I focused on maintaining clean formatting and minimizing the impact on the current codebase. I appreciate any feedback or suggestions for improvement. Thank you! 😊 |
utksh1
left a comment
There was a problem hiding this comment.
Requesting changes (per project rules): this PR is missing a link to an open, approved issue (no closing issue reference found).
Please open the appropriate issue first and update the PR so it links to that issue.
utksh1
left a comment
There was a problem hiding this comment.
Please add unit tests for the markdown report generation (both the generate_markdown_report function and the new /task/{task_id}/report/md endpoint) to ensure coverage before merging.
utksh1
left a comment
There was a problem hiding this comment.
This is a great feature! However, there don't appear to be any tests added for the new markdown export. Could you please add some unit tests (e.g. in test_reporting.py) verifying that generate_markdown_report() handles findings correctly? Once tests are added, we can merge.
|
Hi @utksh1 👋 Thank you for the detailed review and valuable feedback. I've addressed all the requested changes:
I believe all review comments have now been addressed. Could you please take another look when you have time? If there's anything else that should be improved, I'd be happy to make the necessary changes. Thank you for your time and review! 🚀 |
utksh1
left a comment
There was a problem hiding this comment.
The markdown export feature itself looks good, but two previous review items were not addressed:
1. No issue linked: The PR body still has a raw Closes #<issue-number> placeholder that was never filled in. Please link to a real, approved issue.
2. No tests added: Zero unit tests for generate_markdown_report() or the /task/{task_id}/report/md endpoint. Please add tests in testing/backend/test_reporting.py covering:
generate_markdown_report()with various payloads (no findings, findings with all fields, findings with missing fields)- The endpoint (auth check, 404 for non-existent task, 400 for unfinished task, successful download)
|
Hi @utksh1! 👋 Thank you for reviewing my PR and for your detailed feedback. I've completed the requested changes:
If there are any remaining changes required, please let me know and I'll address them promptly. Otherwise, could you please re-review the PR and remove the "Changes Requested" review so it can be merged? Thank you for your time and support! 🚀 |
Description
Added support for Markdown (.md) report export in SecuScan.
✨ Changes
generate_markdown_report()inreporting.py./report/mddownload endpoint inroutes.py.Related Issues
Closes #<1587>
Type of Change
How Has This Been Tested?
.mdfile downloads successfully through the new API endpoint.Checklist
Additional Notes
This feature improves report portability by allowing users to easily read, share, version-control, and integrate scan reports into documentation platforms such as GitHub, GitLab, MkDocs, and other Markdown-compatible tools.