DEV Community

Dendi Prayogo Hidayat
Dendi Prayogo Hidayat

Posted on

Building a Zero-Cost, NDA-Compliant Security Report Generator with Local Gemma 2B.

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

What I Built

As a cybersecurity freelancer on platforms like Fastwork, running vulnerability scans (like Nmap) on a client's infrastructure is the easy part. The real bottleneck is the unbillable hours spent translating raw, technical terminal logs into a professional, easy-to-understand Executive Summary PDF that business owners are actually willing to pay for.

I built the Local SecOps Reporter, an automated Command Line Interface (CLI) pipeline that solves this problem. It orchestrates live Nmap scans, streams the output in real-time, analyzes the vulnerabilities, and instantly exports a beautifully formatted, branded PDF report ready to be invoiced to the client.

The target market? Fellow penetration testers, bug bounty hunters, and freelance security consultants who want to automate their reporting workflow without compromising client data.

Demo

*If the video doesn't load, please refresh the website.

report

Code

Local SecOps Reporter

An AI-powered, completely offline Command Line Interface (CLI) tool designed for Cybersecurity Freelancers and Penetration Testers. It automates the process of running Nmap scans and generating professional, client-ready Executive Summary PDFs using a local LLM.

Built for the Hacktoberfest 2026 "Side Hustle" Challenge.

Why This Exists (The Side Hustle)

As a cybersecurity consultant, scanning a client's infrastructure is fast, but writing the report takes hours. However, feeding sensitive client infrastructure data (like vulnerable open ports) into third-party APIs like ChatGPT is a massive breach of Data Privacy and Non-Disclosure Agreements (NDAs).

This tool solves that by utilizing Google's Gemma 2B open-weight model running 100% locally on your machine.

  • Absolute Data Privacy: Zero data leaves your laptop.
  • Zero Cost: $0 API costs, maximizing freelance profit margins.
  • Client Ready: Automatically converts the AI output into a beautifully formatted PDF with customized agency branding.

Features

  • End-to-End Automation: Runs Nmap, captures…

How I Built It

This tool is built completely around open-source AI and runs 100% locally on my Ubuntu machine.

  • The AI Engine: I used Google's open-weight Gemma 2B model running locally via Ollama.
  • The Pipeline: Written in Python, utilizing subprocess to stream live Nmap scanning data directly into the system's memory.
  • The Prompt Engineering: The Gemma model is guided by a strict System Prompt to act as a Senior Security Analyst, preventing hallucinations and formatting the output strictly as a Markdown table.
  • The Polish: I used the rich library for a beautiful terminal UI (with loading spinners) and markdown-pdf to automatically convert the AI's Markdown output into a client-ready PDF equipped with dynamic CLI-injected branding (e.g., --client "Acme Corp").

Why Does Open Innovation Matter?

For this specific side hustle, open innovation isn't just a "nice to have"—it is a legal requirement.

When auditing client infrastructure, revealing their exposed ports, IP addresses, and vulnerable software versions to a third-party, closed-source API (like OpenAI) is a massive breach of Data Privacy and Non-Disclosure Agreements (NDAs).

By utilizing an open-weight model like Gemma running entirely offline on my local machine:

  1. Absolute Data Privacy: My clients' sensitive infrastructure data never leaves my laptop. It is 100% NDA compliant.
  2. Zero Cost Economics: Running inference locally means I pay $0 in API fees, which turns the time saved on reporting into a 100% profit margin for my side hustle.

Closed APIs would have made this business model legally and financially unviable.

Prize Categories

I am submitting this project for the following category:

  • Best Use of Gemma: The project heavily relies on Google's Gemma model running locally to perform the heavy lifting of security log analysis and report generation.

Top comments (1)

Collapse
 
yuhehe profile image
Yuhe He •

The "unbillable hours translating raw terminal logs into something a business owner pays for" framing is the real cost structure of this whole niche — most people price the scan, nobody prices the translation.

One thing I'd add from running provenance-stamped evidence pipelines (my daily dumps carry url + fetched_at + sha256 per row): an executive summary bills better when the reader can audit it cheaply. Worth emitting, alongside the PDF, a raw artifact (the nmap XML) plus a one-line integrity stamp — client-side NDA auditors pay for "this exact scan, at this time", and it costs you one file write. Local-only Gemma keeps the data story clean, which is the sales feature, not the model size.

Question from the trust side: how are you handling artifact retention — does the pipeline keep raw scans per client, and for how long?