Nettacker icon indicating copy to clipboard operation
Nettacker copied to clipboard

Add Markdown (.md) Report Format Support

Open chinmaychandra1 opened this issue 8 months ago • 13 comments

Description

This PR adds support for Markdown (.md) report generation in OWASP Nettacker.

Changes Made

  • Added handling for .md output 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

chinmaychandra1 avatar Mar 24 '26 16:03 chinmaychandra1

[!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_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Mar 24 '26 16:03 coderabbitai[bot]

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!

chinmaychandra1 avatar Mar 24 '26 16:03 chinmaychandra1

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.

pUrGe12 avatar Mar 26 '26 08:03 pUrGe12

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.

chinmaychandra1 avatar Mar 26 '26 08:03 chinmaychandra1

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 avatar Mar 26 '26 10:03 chinmaychandra1

@chinmaychandra1 Added a few more things. Do look into those when you have time.

pUrGe12 avatar Mar 26 '26 16:03 pUrGe12

@chinmaychandra1 Also, verify your commits with a gpg key (you'll find documentation on how to do this online). We cannot accept unverified commits.

pUrGe12 avatar Mar 26 '26 16:03 pUrGe12

All requested changes have been addressed.

Commits are now GPG signed and verified.

Looking forward to your review.

chinmaychandra1 avatar Mar 27 '26 12:03 chinmaychandra1

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.

chinmaychandra1 avatar Apr 01 '26 10:04 chinmaychandra1

Resolved CI issues by restoring corrupted files from upstream.

All pre-commit checks are passing and branch is up to date.

chinmaychandra1 avatar Apr 01 '26 16:04 chinmaychandra1

@chinmaychandra1 I think you lost all your code here... I can see only gitignores. (why are there two of them though?)

pUrGe12 avatar Apr 05 '26 17:04 pUrGe12

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.

chinmaychandra1 avatar Apr 05 '26 18:04 chinmaychandra1

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!

chinmaychandra1 avatar Apr 10 '26 06:04 chinmaychandra1