From 4ba03c75e667de7fd431b94c03c02b5eab9c7347 Mon Sep 17 00:00:00 2001 From: Chinmay Chandra Date: Sun, 5 Apr 2026 23:14:11 +0530 Subject: [PATCH 1/2] chore: ignore generated markdown report files --- nettacker/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 nettacker/.gitignore diff --git a/nettacker/.gitignore b/nettacker/.gitignore new file mode 100644 index 000000000..5f7cf052c --- /dev/null +++ b/nettacker/.gitignore @@ -0,0 +1 @@ +output.md From 02a5bcbd1ba6453ae683aebed83062ac448dcb99 Mon Sep 17 00:00:00 2001 From: Chinmay Chandra Date: Sun, 5 Apr 2026 23:28:13 +0530 Subject: [PATCH 2/2] feat: add markdown report generation support --- nettacker/nettacker/core/markdown_report.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 nettacker/nettacker/core/markdown_report.py diff --git a/nettacker/nettacker/core/markdown_report.py b/nettacker/nettacker/core/markdown_report.py new file mode 100644 index 000000000..8cd300ad8 --- /dev/null +++ b/nettacker/nettacker/core/markdown_report.py @@ -0,0 +1,17 @@ +def generate_markdown_report(results, output_file="output.md"): + """ + Generate a simple markdown report from scan results. + """ + try: + with open(output_file, "w", encoding="utf-8") as f: + f.write("# Nettacker Scan Report\n\n") + + if not results: + f.write("No results found.\n") + return + + for item in results: + f.write(f"- {str(item)}\n") + + except Exception as e: + print(f"Error generating markdown report: {e}")