{"id":23662509,"url":"https://github.com/davcoservices/llm_security_guidance_benchmarks","last_synced_at":"2025-09-01T17:31:13.462Z","repository":{"id":267127817,"uuid":"900331409","full_name":"davcoservices/llm_security_guidance_benchmarks","owner":"davcoservices","description":"A repository dedicated to benchmarking lightweight, open-source large language models (LLMs) for their effectiveness in providing security guidance. This project uses the SECURE dataset as a foundation to replicate research and evaluate selected models on predefined cybersecurity tasks.","archived":false,"fork":false,"pushed_at":"2024-12-10T21:05:43.000Z","size":4633,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-30T19:24:33.018Z","etag":null,"topics":["ai","benchmark","cybersecurity","llm","secure"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davcoservices.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,"zenodo":null}},"created_at":"2024-12-08T14:04:52.000Z","updated_at":"2025-05-12T06:02:57.000Z","dependencies_parsed_at":"2025-07-30T19:26:50.617Z","dependency_job_id":"6875a446-7de7-4fe9-8974-3a431c7aee1b","html_url":"https://github.com/davcoservices/llm_security_guidance_benchmarks","commit_stats":null,"previous_names":["davisconsultingservices/llm_security_benchmarks","davisconsultingservices/llm_security_guidance_benchmarks","davcoservices/llm_security_guidance_benchmarks"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davcoservices/llm_security_guidance_benchmarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davcoservices%2Fllm_security_guidance_benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davcoservices%2Fllm_security_guidance_benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davcoservices%2Fllm_security_guidance_benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davcoservices%2Fllm_security_guidance_benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davcoservices","download_url":"https://codeload.github.com/davcoservices/llm_security_guidance_benchmarks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davcoservices%2Fllm_security_guidance_benchmarks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273162154,"owners_count":25056418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","benchmark","cybersecurity","llm","secure"],"created_at":"2024-12-29T05:01:24.139Z","updated_at":"2025-09-01T17:31:12.194Z","avatar_url":"https://github.com/davcoservices.png","language":"Python","funding_links":[],"categories":["Benchmarks"],"sub_categories":[],"readme":"# **LLM Security Guidance Benchmarks**\n\nThis repository is dedicated to benchmarking lightweight, open-source Large Language Models (LLMs) for their effectiveness in providing security guidance. Our work builds upon the [SECURE Benchmark](https://arxiv.org/pdf/2405.20441) to evaluate selected models across predefined cybersecurity tasks using external configuration files for flexibility and scalability.\n\n\nSee the [RESULTS](results/README.md)\n\n---\n\n## **Scope**\n\n**Evaluate the following LLMs against the SECURE benchmark dataset:**\n\n- [**DLite**](https://huggingface.co/aisquared/dlite-v2-1_5b): Lightweight GPT-based model for causal tasks.\n- [**FastChat-T5**](https://huggingface.co/lmsys/fastchat-t5): Lightweight T5 variant for sequence-to-sequence tasks.\n- [**Gemma**](https://huggingface.co/gemma-ai): Lightweight model for cybersecurity reasoning.\n- [**LLaMA 2**](https://huggingface.co/meta-llama/Llama-2-7b-hf): Lightweight model for reasoning and causal tasks.\n- [**LLaMA 3.2**](https://huggingface.co/meta-llama/Llama-3.2-3B): Advanced model for causal and sequence-to-sequence tasks.\n- [**ZySec-AI/SecurityLLM**](https://huggingface.co/ZySec-AI/SecurityLLM): Specialized LLM for security-specific tasks.\n\n\n---\n\n\n## **Tests**\n\n1. **`test_information_extraction.py`**  \n   - **Description**: Tests the ability of models to extract information such as MITRE ATT\u0026CK tactics and CWE weaknesses.\n   - **Dataset**: SECURE - MAET.tsv, CWET.tsv\n\n2. **`test_knowledge_understanding.py`**  \n   - **Description**: Evaluates models on understanding cybersecurity concepts and known vulnerabilities.\n   - **Dataset**: SECURE - KCV.tsv\n\n3. **`test_reasoning_and_problem_solving.py`**  \n   - **Description**: Assesses reasoning about cybersecurity risks and solving CVSS-related problems.\n   - **Dataset**: SECURE - RERT.tsv, CPST.tsv\n\n---\n\n## **Plotting Functions**\n\nThe repository includes scripts to visualize the results. Each script generates plots that can be accessed directly below:\n\n1. **`plot_density_results.py`**  \n   - **Description**: Plots the density of correct vs. incorrect predictions for each model.  \n\n2. **`plot_heatmap_results.py`**  \n   - **Description**: Creates heatmaps to visualize model accuracy across datasets and tasks.  \n\n3. **`plot_violin_results.py`**  \n   - **Description**: Generates violin plots to illustrate performance distribution across tasks and datasets.  \n\n4. **`plot_performance_results.py`**  \n   - **Description**: Compares task performance across models using bar plots.  \n\n5. **`plot_sensitivity_results.py`**  \n   - **Description**: Visualizes sensitivity analysis of models for datasets/tasks.  \n\n---\n\n## **Getting Started**\n\n### **1. Clone the Repository**\n```bash\ngit clone git@github.com:davisconsultingservices/llm_security_benchmarks.git\ncd llm_security_benchmarks\n```\n\n### **2. Initialize Submodules**\nIf datasets are managed as submodules, initialize and update them:\n```bash\ngit submodule update --init --recursive\n```\n\n### **3. Set Up the Environment**\nCreate and activate a virtual environment:\n```bash\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n### **4. Run Evaluations**\nExecute the evaluation scripts for each research category:\n```bash\npython scripts/test_information_extraction.py\npython scripts/test_knowledge_understanding.py\npython scripts/test_reasoning_and_problem_solving.py\n```\n\n### **5. Generate Plots**\nRun the plotting scripts to visualize the results:\n```bash\npython scripts/plot_density_results.py\npython scripts/plot_heatmap_results.py\npython scripts/plot_violin_results.py\npython scripts/plot_performance_results.py\npython scripts/plot_sensitivity_results.py\n```\n\n---\n\n## **References**\n\n- **SECURE Benchmark Paper**: [https://arxiv.org/pdf/2405.20441](https://arxiv.org/pdf/2405.20441)\n- **SECURE Dataset Repository**: [https://github.com/aiforsec/SECURE](https://github.com/aiforsec/SECURE)\n\nFor more details, refer to the [SECURE Benchmark Paper](https://arxiv.org/pdf/2405.20441).\n\n---\n\n## **License**\n\nThis project is licensed under the [Apache-2.0 License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavcoservices%2Fllm_security_guidance_benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavcoservices%2Fllm_security_guidance_benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavcoservices%2Fllm_security_guidance_benchmarks/lists"}