Add Markdown (.md) Report Format Support
Description
This PR adds support for Markdown (.md) report generation in OWASP Nettacker.
Changes Made
- Added handling for
.mdoutput format in graph.py - Implemented markdown table generation for scan results
- Ensured compatibility with existing output formats
Testing
- Successfully generated markdown reports using: python nettacker.py -i scanme.nmap.org -m all -o output.md
- Verified output file structure and content
Benefits
- Improves readability of scan results
- Allows easy sharing and documentation
- Useful for reports and security audits
[!NOTE]
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
reviews.auto_review.auto_pause_after_reviewed_commitssetting.Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.Use the checkboxes below for quick actions:
- [ ] ▶️ Resume reviews
- [ ] 🔍 Trigger review
Walkthrough
Adds a new Nettacker application entrypoint implementing startup, dependency/DB checks, target normalization/expansion, prerequisite scans, and multiprocess/multithread scan orchestration; extends report generation to support Markdown output and richer report engines; and adds a Nepali locale resource file.
Changes
| Cohort / File(s) | Summary |
|---|---|
Application core (new entrypoint) nettacker/core/app.py.save |
Adds Nettacker class (subclassing ArgParser) implementing startup flow: print_logo, check_dependencies (platform, tmp/results dirs, DB init/migration for SQLite/MySQL/Postgres), target expansion/normalization (expand_targets), prerequisite scans orchestration, and scan orchestration (run, start_scan, scan_target_group, scan_target). |
Report / graph generation nettacker/core/graph.py, nettacker/core/graph.py.save |
Adds Markdown (.md) output handling in create_report(); graph.py.save adds graph engine loading, text/CSV/JSON/DD/SARIF builders, compare-report generation, and helpers for rendering text tables and SARIF/DD JSON outputs. |
Localization nettacker/locale/ne.yml |
Adds new Nepali locale YAML with translations for CLI/API options, scan controls, modules/profiles/help text, DB/reporting messages, graph/report messages, networking/proxy options, validation and error strings. |
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~45 minutes
Suggested reviewers
- arkid15r
- securestep9
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately describes the primary change: adding Markdown (.md) report format support, which aligns with the graph.py modification that implements markdown table generation for scan results. |
| Description check | ✅ Passed | The description is related to the changeset, outlining the addition of Markdown report format support, implementation details, testing performed, and stated benefits. |
| Docstring Coverage | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
Hi 👋
This PR introduces Markdown (.md) report format support in Nettacker.
I have implemented the feature in graph.py and verified it by generating reports using a sample scan. The output is structured and readable.
Looking forward to your feedback. I’d be happy to make any improvements if needed.
Thanks!
Hey @chinmaychandra1, can you please clean up your PR? you've rebased instead of merging main I guess, which is why you're seeing other commits in your PR. Please fix that so its good to review.
Hey @pUrGe12 Thanks for the suggestion! I’ve cleaned up the PR and removed unrelated commits. It now only contains the relevant changes for this feature.
Please take another look.
Hi!
All the suggested issues (critical, major, and minor) have been addressed.
I’ve ensured proper fixes for logic, indentation, and variable handling. Minor improvements and broader changes will be handled separately to keep this PR focused.
Kindly review when you get time. Looking forward to your feedback.
@chinmaychandra1 Added a few more things. Do look into those when you have time.
@chinmaychandra1 Also, verify your commits with a gpg key (you'll find documentation on how to do this online). We cannot accept unverified commits.
All requested changes have been addressed.
Commits are now GPG signed and verified.
Looking forward to your review.
Gentle ping 🙂
Just checking if there are any updates on this PR. All requested changes have been addressed and commits are GPG signed.
Please let me know if anything else is needed from my side.
Resolved CI issues by restoring corrupted files from upstream.
All pre-commit checks are passing and branch is up to date.
@chinmaychandra1 I think you lost all your code here... I can see only gitignores. (why are there two of them though?)
Thanks for the feedback !
I have reintroduced the markdown report feature with a clean and minimal implementation. The previous issue was caused by unintended file loss , which has now been fixed.
Kindly review the updated changes.
Hi! Just a gentle follow-up on this PR.
All requested changes have been addressed and checks are passing. Would appreciate a review whenever you get time. Thanks!