Skip to content

Vedika-Sd/SecurePolicy-Maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SecurePolicy‑Maker

License: MIT Python version

📖 What is SecurePolicy‑Maker?

SecurePolicy‑Maker is a mini‑project built using FastAPI (backend) and HTML/CSS (frontend) to help users generate simple cybersecurity policies through an AI‑assisted workflow. It integrates with a local LLM (via Ollama) for basic chatbot support.

This project is built as part of the NPTEL Cybersecurity & Privacy Course, focused on learning how policy generation systems work.

Use Cases

  • Generate quick security policy drafts
  • Customize and export security rules
  • Experiment with Cybersecurity Specific Chatbot

Screenshots

image

sp1

image

📁 Repository Structure

/
├── main.py                    # FastAPI backend entry point
├── rules.json                 # Base rules/policy format
├── requirements.txt           # Python dependencies
├── templates/                 # Jinja2 templates for policy rendering
│ └── privacy_policy.j2 
├── static/                    # Frontend assets
│ └── index.html               # HTML file with inline CSS, JS, UI components
└── README.md                  # Project documentation

--

🧰 Tech Stack

Layer Technology / Framework Purpose
Backend FastAPI (Python) Core API, routing, business logic
Frontend HTML, CSS, Jinja2 UI rendering, templating engine
Chatbot Llama 3.2:1B (via Ollama) Chat assistance for explaining security terms; not used for policy generation
Policy Engine rules.json (custom rule-based system) Deterministic policy creation
Server Uvicorn ASGI server to run FastAPI app
Package Management pip, venv Dependency and environment management
PDF Export Python-based PDF generation Enables users to download generated policies
Static Assets CSS, JS (local) Frontend styling and behavior

🚀 Setup & Installation

Prerequisites

  • Python 3.10+
  • Ollama or any local LLM API
  • A virtual environment (recommended)

Installation Steps

# 1. Clone the repository
git clone https://github.com/Vedika-Sd/SecurePolicy-Maker.git
cd SecurePolicy-Maker

# 2. Create and activate virtual environment
python -m venv venv
# Windows:
venv\Scripts\activate
# Linux/Mac:
# source venv/bin/activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Run the server
uvicorn main:app --reload

# App runs at:
# http://127.0.0.1:8000

🧰 How It Works

Once you run the server:

  1. Open the UI in your browser.
  2. Provide system/context details.
  3. System generates a draft policy based on predefined rules.json; the LLM is only used for chatbot responses.
  4. Review, refine, export.

Workflow Example

  • Select policy category or input details
  • LLM processes input and rules.json
  • Policy is generated and displayed in UI

⚠ This is an educational project; policies generated must be reviewed manually before real‑world use.


✨ Features

✔ Current Features

  • FastAPI backend with clean routing
  • Simple, user‑friendly HTML UI
  • JSON‑based rule system (rules.json)
  • Chatbot support for more explanation

🔧 Customization & Extension

You can easily extend functionality:

Modify rules

Edit rules.json to adjust policy templates.

Improve prompts

Customize LLM prompts in main.py to Expand features of Chatbot.


🤝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repo
  2. Create a branch (feature/my-update)
  3. Commit and push
  4. Open a Pull Request

You can help with:

  • Better UI/UX
  • More policy templates
  • Robust backend enhancements
  • Documentation improvements

📝 License

This project is licensed under the MIT License. You are free to use, modify, and distribute it.


📬 Author & Contact

Created by Vedika (Vedika-Sd). Feel free to raise issues or suggestions directly through GitHub.

About

This is mini project for Policy Maker using python FastAPI and frontend HTML+CSS. Having Chatbot functionality with local Ollama integration. This is mini project of learning applied during NPTEL Cyber Security and Policy Course.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors