The Policy Tester Interface is designed to run entirely on localhost. All AI inference is handled by a local Ollama instance — no policy text or analysis results are sent to any external service.
| Component | Listens on | Exposed to internet? |
|---|---|---|
| Vite dev server | localhost:5173 |
No |
| FastAPI backend | localhost:8000 |
No |
| Ollama | localhost:11434 |
No |
The application has no authentication, no user accounts, and no persistent storage. It is intended for local, single-user use during policy workshops or individual analysis.
- Policy text you enter stays on your machine. It is sent from the browser to the local FastAPI server, then to Ollama — all over
localhost. - Results are held in browser memory only and are lost when you close or refresh the tab.
- No telemetry or analytics are collected.
- Add external API calls that transmit policy text or results off the machine
- Add authentication or user management without a full threat model review
- Hard-code secrets, API keys, or tokens anywhere in the codebase
- Add persistent storage of policy text or results without considering data protection implications
- Expose any service on
0.0.0.0— all services must bind tolocalhostonly
- Keep all AI processing local via Ollama
- Validate and sanitise all user input on the backend (FastAPI/Pydantic)
- Pin dependency versions in
requirements.txtandpackage.json - Run
npm auditandpip auditperiodically to check for known vulnerabilities
- Frontend: Basic checks before sending requests (non-empty policy text, at least one category selected)
- Backend: Pydantic model validation on all API requests; invalid categories are rejected with a 400 error; empty policy text is rejected
| Ecosystem | Lock file | Audit command |
|---|---|---|
| Node.js | package-lock.json |
npm audit |
| Python | requirements.txt |
pip audit (install via pip install pip-audit) |
- No rate limiting — the FastAPI server does not limit request frequency. This is acceptable for localhost use but would need to be addressed before any network deployment.
- No HTTPS — all traffic is over plain HTTP on localhost. Do not expose these services to a network without adding TLS.
- No Content Security Policy — the Vite dev server does not set CSP headers. The production build should add appropriate headers if deployed.
- LLM output is not sanitised for XSS — model responses are rendered as text in React (which escapes HTML by default), but if the rendering changes to use
dangerouslySetInnerHTML, output sanitisation would be required.
If you find a security issue, please open a GitHub issue or contact the maintainers directly. This is a hackathon project and does not have a formal security response process.