ScopeFix: Autonomous Open-Source Vulnerability Remediation
Detect. Strategize. Surgically Repair
ScopeFix is an open-source framework designed to resolve security vulnerabilities in software codebases. By utilizing a novel Strategist-First Architecture powered exclusively by open-weights Large Language Models (LLMs), it unburdens human developers from the overwhelming volume of routine security patches.
In the modern DevSecOps landscape, thousands of vulnerabilities are detected daily. Human developers simply cannot keep up, leading to a massive backlog of "Low" and "Medium" complexity issues that remain unpatched for months. ScopeFix aims to clear this "Security Debt" by autonomously resolving these vulnerabilities, allowing human engineers to focus on high-severity, architectural security challenges.
The Problem
Automated vulnerability scanning tools like Bandit, Semgrep are able to pinpont thousands of security issues in a jiffy. It takes a lot of human effort to analyze and fix these vulnerabilities leading to Security Debt. Most projects don't have enough resources to fix every detected vulnerability. Studies show that even after 6 months only 56% of detected vulnerabilities are fixed.
Solution: The Strategy first architecture
Scopefix introduces a strategist agent to the repair loop. Instead of blindly asking an LLM to "fix this code," our pipeline mimics a human engineering workflow: Plan first, then Code.
The Strategist (Qwen3-32b)
Before any code is written, the strategist analyzes vulnerability report, source code and common methods to fix the vulnerability (obtained to web scraping) to generate a repair plan.
It defines the root cause of the vulnerability and provides guidance to the fixer.
Impact: This guidance allows the smaller Level 1 model to achieve significantly higher fix rates than if it were working alone.
Level 1 Fixer (Qwen3-32B)
Qwen3-32B is used as it is capable despite being a lightweight model and high availability of inference providers for it. Function: It takes the Strategist's plan and executes a surgical patch. Efficiency: Because it follows a strict plan, it effectively resolves the majority of routine vulnerabilities (e.g., input validation, secure defaults) with minimal compute overhead.
Level 2 Fixer (DeepSeek-R1)
DeepSeek-R1 was choosen for high availability of inference providers and relatively larger context window and coding capabilities. Other opensource models like glm-4.7, qwen3-max and kimi-k2-thinking are better suited but were not chosen due to lack of serverless inference providers.
Function: Leverages a massive context window and advanced reasoning capabilities to handle complex, logic-heavy vulnerabilities.
Local Setup & Usage Instructions
1. Clone the Repository
Open your terminal and clone the repository to your local machine:
git clone [https://github.com/abhiram-29/scopefix.git](https://github.com/abhiram-29/scopefix.git)
cd scopefix
2. Setup Python Virtual Environment
python3 -m venv venv
source venv/bin/activate
3. Install Dependencies
pip install -r requirements.txt
4. Configure Environment Variables
refer to the .env.example file to configure your environment variables
5. Run the remediation loop
To fix a vulnerability in a specific file, you need to pass the file path to the fix_vuln function inside fix_loop.py
python fix_loop.py
Metadata
Release files for scopefix 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scopefix-0.1.1.tar.gz | 14.9 kB | With provenance | Details for scopefix-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scopefix-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for scopefix-0.1.1-py3-none-any.whl |
Total release size: 30.8 kB
Release files / scopefix-0.1.1.tar.gz
| Download URL | scopefix-0.1.1.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58b2f2afd03525ba2c547b40640163aa6dd0fde05947446f6feb3b8565381c58
|
|
BLAKE2b-256 checksum How to use checksums |
9bedef2eaa4d2643bdc0902017789d6382430812e6c4044cc6bf688de4f0fd51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logRelease files / scopefix-0.1.1-py3-none-any.whl
| Download URL | scopefix-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba22b51aa6a70c789f482961931c8df8d97063c2b9bf8798f6526fb5d67a725d
|
|
BLAKE2b-256 checksum How to use checksums |
6666b7a79b3e97e4b65cce0e351d147cb26b2900fae798d3cbd5c6290c9c8ee9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logSecurity for scopefix 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for scopefix-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.