{"id":21713540,"url":"https://github.com/dhammon/security-assistant","last_synced_at":"2026-01-28T12:34:18.754Z","repository":{"id":264526680,"uuid":"893540911","full_name":"dhammon/security-assistant","owner":"dhammon","description":"The Security Assistant is an Ollama based large language model (LLM) retrieval-augmented generation (RAG) project that summarizes PDF and XLSX documents and responds to customer and auditor security questions.  Everything runs locally and does not rely on third party/online models.","archived":false,"fork":false,"pushed_at":"2024-11-24T20:36:02.000Z","size":3592,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T11:12:13.223Z","etag":null,"topics":["ai","llm","ollama","retrieval-a","security-audit","security-automation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhammon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T17:51:34.000Z","updated_at":"2025-01-22T19:01:28.000Z","dependencies_parsed_at":"2024-11-24T21:38:31.461Z","dependency_job_id":null,"html_url":"https://github.com/dhammon/security-assistant","commit_stats":null,"previous_names":["dhammon/security-assistant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dhammon/security-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhammon%2Fsecurity-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhammon%2Fsecurity-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhammon%2Fsecurity-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhammon%2Fsecurity-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhammon","download_url":"https://codeload.github.com/dhammon/security-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhammon%2Fsecurity-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","llm","ollama","retrieval-a","security-audit","security-automation"],"created_at":"2024-11-26T00:17:32.525Z","updated_at":"2026-01-28T12:34:18.737Z","avatar_url":"https://github.com/dhammon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# About\nThe Security Assistant is an Ollama based large language model (LLM) retrieval-augmented generation (RAG) project that summarizes PDF and XLSX documents and responds to customer and auditor security questions.  Everything runs locally and does not rely on third party/online models.\n\n![sample](sample.png)\n\n# Why\nMany organizations are hesitant to provide internal documentation to web based LLMs, such as ChatGPT, because of legal and privacy risks. Therefore, a solution is needed to run a high quality on-premise LLM+RAG that does not rely on a third party to process data. I was inspired to create an LLM that could use existing support documentation to answer security questions customers and/or auditors might have. While the configured prompt is tailored to answering security questions, this project's prompts and files could be easily adjusted to be used for any LLM + RAG purpose.\n\n# How it works\nLangchain unstructured document parsers iterate through each document within the `files` folder, then chunks the content before inserting it into a local vector database using the `nomic-embed-text` model.\n\nThe agent runs two stages when asked a question using the Ollama3 model.  During the first stage, using only the content from the vector database, the agent analyzes available material based on the question and returns a few responses.  The second stage uses the output of the first stage to produce a final response.\n\n# Requirements\n- Tested on Debian and Ubuntu\n- Storage: 25 GB\n- CPU: 8 cores, w/o GPU will take ~5 min for LLM to respond\n- GPU: optional, but 1000x faster\n- Python3, pip, python3-venv (`apt install python3-venv`)\n\n# Install\n1. Setup python virtual env\n```bash\npython3 -m venv env\nsource env/bin/activate\n```\n2. Setup environment\n```bash\nchmod +x setup.sh\n./setup.sh\n```\n\n# Setup\n\u003e Make sure you are in the Python Virtual Environment (`source env/bin/activate`)\n1. Upload PDF, XLSX, CSV files to files folder\n2. Create vector dababase\n```bash\npython3 vector.py\n```\n\n# Use\n\u003e Make sure you are in the Python Virtual Environment (`source env/bin/activate`)\n1. Use the agent to ask questions\n```bash\npython3 agent.py\n#ask your questions\n#quit/exit to exit\n```\n\n# Notes\n## Inspiration from:\n1. https://www.youtube.com/watch?v=WfFpeBNfaeQ\u0026list=PLB6yN0iA43p69t3613Q6i2pqq90Ps3ttb\n2. https://github.com/tonykipkemboi/ollama_pdf_rag/tree/main\n\n## References\n1. https://github.com/hwchase17/chroma-langchain/blob/master/persistent-qa.ipynb\n2. https://docs.aws.amazon.com/systems-manager/latest/userguide/walkthrough-cli.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhammon%2Fsecurity-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhammon%2Fsecurity-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhammon%2Fsecurity-assistant/lists"}