CleanSync-AI:本機 AI 下載檔案安全隔離工具
CleanSync-AI
CleanSync.ai 是開源、本機運行的安全隔離工具,會攔截下載檔案,並透過 Ollama 執行 Llama 3.2 檢查檔案程式碼與邏輯。檔案通過檢查後會移至安全儲存區;偵測到威脅時則會彈出警告,讓用戶選擇放行或隔離。檢查全程離線,私隱檔案不會傳送至外部伺服器。
1.Problem statement - When downloading files from web browsers like Google Chrome, messaging apps, or any cloud storage into a laptop, files are written directly into active local storage while connected to live networks. If a downloaded file contains a HIDDEN VIRUS, BUGS, MALICIOUS SCRIPT, or HACKER PAYLOAD (such as zero-day logic exploits, reverse shells, or credential exfiltration vectors), it can instantly infect the operating system, steal sensitive personal data (like PASSWORDS and DOCUMENTS), or give hackers remote control of the computer. Traditional antivirus software relies mostly on old signature matching, allowing new zero-day threats, obfuscated scripts, and sneaky hacker tools hidden inside ordinary files to slip through unnoticed. Furthermore, online cloud AI security scanners compromise user privacy by uploading confidential personal files to external third-party servers over the internet. There is a critical need for an open-source, 100% local, privacy-first security airlock running directly on the user's laptop that acts as an intermediate staging buffer—intercepting incoming network downloads offline, auditing file syntax and code logic using local LLMs (via Ollama) without exposing private data to the internet, detecting bugs, viruses, and hacker threats, and prompting the user with an on-screen graphical GUI warning before allowing any file onto primary local storage.
2.Solution statement - Modularization (or Code Refactoring) is used in CleanSync.ai. it is a modular, open-source security airlock that runs 100% locally on your laptop. It acts as an intermediate staging buffer between web downloads and your primary computer storage. Instead of letting downloaded files write directly to your hard drive, it automatically catches them in a safe, isolated holding folder.
Operating entirely offline right on your machine, CleanSync.ai uses a local open-source AI model (Llama 3.2 via Ollama) to deeply inspect the file's code and logic for bugs, viruses, and hacker threats without sending your private files anywhere else. If a file is verified as safe, it is quietly moved to secure storage. If a threat is detected, an interactive on-screen warning window pops up right on your screen, giving you the final choice to either allow the file or lock it away safely in quarantine.
3.Here is the complete list of prerequisites needed to run CleanSync.ai locally on your computer:
3.1. Software & Engines
Python (Version 3.8 or higher): The core programming language used to run the background script.
Ollama: The local software engine installed on your computer to host and run open-source AI models completely offline.
Local AI Model (llama3.2): Downloaded via Ollama (ollama pull llama3.2) so the system has an offline AI brain to inspect file code and logic.
3.2. Required Python Libraries
These libraries power the background file monitoring, AI communication, environment settings, and graphical pop-up alerts:
openai: Connects the Python script to your local Ollama AI model.
watchfiles: Monitors your laptop's live Downloads folder for new incoming files.
python-dotenv: Reads your configuration settings securely from a .env file.
tkinter: Python's built-in GUI library used to pop up the on-screen Allow / Quarantine warning windows.
3.3. System Configuration
PowerShell Execution Policy: Adjusted on Windows (Set-ExecutionPolicy RemoteSigned -Scope CurrentUser) to allow virtual environment activation and script execution.
Virtual Environment (venv): An isolated workspace inside your project folder to manage and store all project dependencies cleanly.
來源:DEV Community · dev.to