Quick Start
Prerequisites
Before deploying Soteria, ensure you have the following installed:
- Python 3.13+
- Node.js (v18+) and npm
- Git
1. Backend & Intelligence Engine Setup
The backend handles AST analysis, machine learning inference, and user authentication.
-
Clone the repository:
git clone https://github.com/manu-j3400/A.C.I.D.git cd A.C.I.D -
Configure the Python environment:
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt -
Initialize the Database: The system uses SQLite for local development. Simply running the app for the first time will generate the database and seed a default admin account.
python app.py- Default Admin:
admin@kyber.io - Password:
admin123
- Default Admin:
2. Model Training (Optional)
Soteria comes with pre-trained weights, but you can retrain the "Structural DNA" model using the provided pipeline if you have your own dataset.
# From the backend directory
python src/trainerModel_AST.py
This will process the data in /data, normalize it via AST, and export a new acidModel.pkl to the /ML_master directory.
3. Frontend Dashboard Setup
The "Cyber Sentinel" dashboard is a React application built with Vite and Tailwind CSS.
-
Install dependencies:
cd ../frontend npm install -
Configure Environment Variables: Create a
.envfile in thefrontendfolder:VITE_API_URL=http://localhost:5001 -
Launch the Development Server:
npm run devThe dashboard will be available at
http://localhost:5173.
4. Perform Your First Scan
Once both tiers are running, you can verify the pipeline:
- Log in to the dashboard at
http://localhost:5173/login. - Navigate to the Scanner tab.
- Paste a Python function into the editor.
- Try a clean function:
def add(a, b): return a + b - Try a suspicious pattern: A function containing obfuscated
getattr(os, 'sys' + 'tem')calls.
- Try a clean function:
- Click Analyze Code to view the structural breakdown and security label.
API Quick Reference
If you wish to integrate the Intelligence Engine into your own tools, use the /analyze endpoint:
Endpoint: POST /analyze
Authentication: Bearer Token (JWT)
Request Body:
{
"code": "def malicious_payload():\n import os\n os.system('rm -rf /')"
}
Response:
{
"prediction": 1,
"confidence": 0.98,
"label": "Malicious",
"dna_sequence": {
"Assign": 1,
"Call": 2,
"Import": 1
}
}