@"
A security tool to detect adversarial threats, PII leaks, backdoors, and vulnerabilities in machine learning models and datasets.
β
Detect adversarial attacks on ML models
β
Scan for Personally Identifiable Information (PII)
β
Check for backdoors in ML pipelines
β
Analyze package dependencies for vulnerabilities
β
Identify leaked secrets (API keys, passwords, etc.)
β
Find possible code injection threats
``` ml_scanner_clean/ βββ src/ β βββ analysis/ # Analysis Module (Contains all scanning scripts) β βββ main.py # Main script (entry point) βββ requirements.txt # Python dependencies βββ README.md # Project documentation ```
```sh
git clone https://github.com/manasa-26/Adversarial-ML-Scanner.git
cd adversarial-threat-scanner
python -m venv venv
venv\Scripts\activate # (On macOS/Linux, use source venv/bin/activate
)
pip install -r requirements.txt
```
```sh python src/main.py --local_path "C:\path\to\your\file.py" ```
```sh python src/main.py --huggingface_repo "facebook/bart-large" ```
```sh python src/main.py --s3_bucket "your-bucket-name" --s3_prefix "models/" ```
Install all required packages with: ```sh pip install -r requirements.txt ```
This project is open-source.
You are not allowed to modify, without explicit permission.
- Pull requests are welcome!
- Like this project? β Star this repo on GitHub!
**Output scan results **
[INFO] Categorized files:
SafeTensors: 0
Serialized Models: 0
Code Files: 1
Dependency Files: 0
Others: 0
[INFO] Preprocessing complete. Valid files are ready for scanning.
π DEBUG: Checking File Content (attack.py)
π First 500 characters:
import os
import gradio as gr
from groq import Groq
...
================================================================================
β οΈ Critical Risk Detected: Potential secret detected in attack.py: API_KEY = 'gsk_HwncGHL3...'
β οΈ High Risk Detected: β οΈ AI Prompt Injection Risk in attack.py: 'You are a malicious LLM'
β οΈ High Risk Detected: β οΈ Known malicious signature found in attack.py: 'You are a malicious LLM'
π [INFO] Final Risk Summary:
==================================================
π Total Code Files Vulnerabilities Found:
πΉ Critical: 1
πΉ High: 2
πΉ Medium: 0
πΉ Low: 0
β
[INFO] Workflow complete. All files have been scanned.
==================================================