VEILSCAN is an AI/ML security scanning project with three main parts:
-
A Python CLI that scans model artifacts, codebases, configs, and AI application glue code
-
A Tauri desktop app that wraps the CLI in a local UI
-
A website/frontend prototype area used for an alternate web experience
-
The project is aimed at developers, security engineers, and researchers who want a practical way to inspect AI/ML systems for common security, privacy, supply-chain, governance, and deployment risks.
- VEILSCAN is broader than a single-file model scanner.
It can inspect:
- Model artifacts such as
.pt,.pth,.bin,.safetensors,.onnx,.h5,.keras,.joblib,.pkl - Python projects that serve, fine-tune, or integrate models
- RAG and agent-style applications
- Dependency manifests such as
requirements.txt,pyproject.toml,Pipfile, andenvironment.yml - Hugging Face model metadata and local snapshots
- Running model APIs through the live
probecommand
It does this without loading untrusted model weights during normal static scans.
'''text . ├─ veilscan/ Python CLI and scanning engine ├─ app/ Tauri desktop app (React + TypeScript frontend, Rust backend) ├─ tests/ Unit tests and vulnerable/clean fixtures ├─ sample_ui 2/ Website/frontend prototype area used by launch_website.bat ├─ launch_app.bat Desktop app launcher ├─ launch_website.bat Website prototype launcher ├─ pyproject.toml Python package config and CLI entry point └─ requirements.txt Optional/dev dependency hints
### Component Status
- `veilscan/` is the core product and the most complete part of the repository.
- `app/` is a working local desktop shell over the CLI.
- `sample_ui 2/` currently looks incomplete in this checkout. The launcher exists, but the directory mostly contains generated Next.js artifacts and installed dependencies rather than a clean, source-complete web app.
## Core Capabilities
### CLI
The CLI is the main engine. It supports:
- Static scanning of local folders, single files, GitHub repos, and Hugging Face targets
- Purpose-aware scoring for different AI use cases
- Security checklist scoring against multiple frameworks
- Exploit demo generation
- Threat model generation
- Red-team playbook generation
- SBOM generation
- Fingerprinting and watermark-related analysis
- Dependency graph and CVE-style dependency checks
- Compliance-oriented reporting
- Patch and auto-fix generation
- Risk history tracking
- CI/CD template generation
- Live endpoint probing
### Desktop App
The Tauri app exposes the CLI through a local UI with these panels:
- `Scan`
- `Live Probe`
- `History`
- `Threat Model`
- `Red Team`
- `Analysis`
- `Settings`
The app shells out to the installed `veilscan` command, streams output into the UI, and can export generated content such as scan JSON, threat models, and red-team playbooks.
### Website Prototype
The repository also includes `launch_website.bat`, which targets `sample_ui 2/`. At the moment, this appears to be a prototype area rather than a stable, documented web product. Treat it as experimental unless the missing website source is restored.
## How VEILSCAN Works
### Static Scan Path
For local and repository targets, VEILSCAN:
1. Resolves the target type
2. Walks the file tree while skipping common cache/build directories
3. Reads source, config, and model-adjacent files safely
4. Runs all registered check modules
5. Aggregates findings into a risk score and label
6. Maps findings into checklist frameworks
7. Produces terminal output, JSON, fixes, or downstream reports
Notebooks are treated as code input for scanning purposes, so `.ipynb` content is included when Python-oriented checks run.
### Live Probe Path
The `probe` command is different from the static scanner.
It sends real HTTP requests to a running endpoint and checks runtime behavior such as:
- authentication enforcement
- CORS behavior
- rate limiting
- output length control
- prompt injection resistance
- system prompt leakage
- jailbreak resistance
This is the only active testing path in the project. Everything else is static analysis or generated reporting.
## Supported Targets
VEILSCAN accepts targets such as:
- local directories: `veilscan .`
- local files: `veilscan model.pt`
- Hugging Face model IDs: `veilscan meta-llama/Llama-2-7b-hf`
- Hugging Face URLs
- GitHub repository URLs
## Installation
### Python CLI
Recommended local development install:
```powershell
pip install -e .
Run the CLI:
veilscan --helpIf the command is not on PATH:
py -m veilscan --helpThe core scanner is stdlib-first. Optional packages are used for specific workflows.
huggingface_hubfor Hugging Face snapshot scanningtorchandtransformersare referenced in fixtures and examples, not required for core static scans
To run the Tauri app, you need:
- Python with
veilscaninstalled locally - Node.js and npm
- Rust toolchain for Tauri builds
Install frontend dependencies:
cd app
npm installRun the app:
npm run tauri devOr from the repo root:
start_app.batlaunch_app.bat also exists, but it includes branch-switching behavior and is more opinionated than start_app.bat.
veilscan .
veilscan C:\path\to\project
veilscan meta-llama/Llama-2-7b-hf
veilscan https://github.com/org/repoveilscan . -o report.jsonveilscan . --purpose chatbot
veilscan . --purpose medical
veilscan . --purpose agentveilscan . --min-severity HIGH
veilscan . --fail-on HIGH
veilscan . -qveilscan . --fix
veilscan patch . -o fixes.patch
veilscan patch . --pr-desc pr.mdveilscan probe http://localhost:8000/v1/chat/completions
veilscan probe http://localhost:11434/api/generate --format ollama --model llama3
veilscan probe https://api.anthropic.com/v1/messages --format anthropic --auth <api-key>
veilscan probe http://localhost:8000/generate --format rawveilscan threat-model .
veilscan redteam .
veilscan sbom .
veilscan fingerprint .
veilscan compliance .
veilscan watermark .
veilscan depgraph .
veilscan benchmark .veilscan history .
veilscan history --all
veilscan ci-setup
veilscan ci-setup --ci github
veilscan checklistsThe desktop app is a local shell around the CLI. It does not reimplement the scanner in JavaScript. Instead, it invokes the Python command and streams results into the UI.
The Scan panel supports:
- path/model/repo target entry
- purpose selection
- exploit demo toggle
- fix toggle
- grouped findings by severity
- model-file focused filtering
- JSON export
The Probe panel supports endpoint formats for:
- OpenAI-compatible chat/completions APIs
- Ollama
- Anthropic
- raw text endpoints
The Analysis panel provides UI wrappers for:
sbomfingerprintcompliancewatermarkdepgraphbenchmarkpatch
These panels generate and export:
- STRIDE threat models
- red-team attack playbooks
History reads stored scan history from the user profile and visualizes risk score trends over time.
Settings control defaults such as:
- minimum severity
- default purpose
- exploit/fix defaults
- stderr visibility
- CI/CD template generation
VEILSCAN currently registers 19 main check families.
| Check Family | Prefixes | Focus |
|---|---|---|
| Prompt Injection & Insecure Output Handling | PI-* |
User-controlled prompt building, system prompt injection, eval/exec, prompt-to-SQL patterns, jailbreak text |
| Unsafe Serialization | SERIAL-* |
Pickle-based formats, torch.load, pickle.load, unsafe yaml.load, related deserialization risks |
| Model Integrity | INTEG-* |
Missing checksums, backdoor-like loaders, compressed pickle bypass patterns, tampered model behavior |
| Data Leakage | DL-* |
Hardcoded secrets, tokens, credentials, private keys, PII patterns |
| Excessive Agency & Model Theft | AGENCY-* |
Unsafe autonomy, disabled human approval, dangerous system prompts, model internals exposure |
| Plugin / Tool Security | PLUGIN-* |
Dangerous tool definitions, missing parameter constraints, user-controlled external actions |
| Training Data Poisoning | TRAIN-* |
Untrusted datasets, direct remote training input, poisoned JSONL instructions, reward-model abuse |
| Model Configuration | CONFIG-* |
trust_remote_code, auto_map, risky tokenizer or generation settings |
| RAG Security | RAG-* |
Untrusted loaders, poisoned vector stores, unsafe context insertion, raw retrieval injection |
| Model DoS | DOS-* |
Missing output limits, absent rate limiting, unbounded loops, oversized generation configs |
| Privacy Risk | PRIV-* |
Confidence scores, hidden state exposure, prompt leakage, personal data without privacy controls |
| Adversarial Robustness | ADV-* |
Missing robustness tooling, absent validation, poor preprocessing, missing adversarial documentation |
| Transfer Learning Security | XFER-* |
Fine-tuning unsafe bases, dynamic model paths, trust_remote_code=True |
| Output Integrity | OI-* |
Missing audit logging, insecure serving, forwarding model output to external systems |
| License Compliance | LIC-* |
Missing/unknown license, GPL/AGPL/non-commercial restrictions |
| Bias & Fairness | BIAS-* |
Missing fairness evaluation, risky high-risk-use documentation gaps, protected attributes, stereotype patterns |
| Model Drift | DRIFT-* |
Missing drift monitoring and post-deployment observation |
| Dependency Vulnerabilities | DEP-* |
Version-based dependency risk rules and known vulnerable package checks |
| Supply Chain & Provenance | SC-* |
Missing model cards, provenance gaps, weak documentation, related trust signals |
For a fuller reference, see CHECKS.md.
VEILSCAN maps findings into these checklist views:
owasp-llmowasp-mlmitre-atlasreal-worldcompliance
This means the scanner does not only emit raw findings. It also groups them into recognizable frameworks for governance and review.
Depending on the command, VEILSCAN can produce:
- terminal reports
- JSON scan reports
- threat model Markdown
- red-team playbooks
- SBOM JSON/Markdown
- compliance Markdown/HTML
- dependency graph JSON/DOT
- patch files
- PR description Markdown
- CI/CD config files
The repository includes:
tests/test_checks.pyfor the main check modules and checklist behaviortests/test_commands.pyfor utility/reporting modules such as SBOM, depgraph, fixer, patcher, history, and resolver- fixture projects under
tests/fixtures/covering vulnerable and clean examples
Useful fixture examples include:
tests/fixtures/vulnerable_model/tests/fixtures/clean_model/tests/fixtures/rag_project/tests/fixtures/agent_project/tests/fixtures/training_project/tests/fixtures/dos_project/
The CLI entry point is:
veilscan.cli:main
The python -m veilscan shim is in:
veilscan/__main__.py
veilscan/cli.pybuilds and dispatches commandsveilscan/scanner.pyorchestrates check executionveilscan/checks/contains the detection modulesveilscan/report.pyformats and exports scan resultsveilscan/probe.pyhandles live API probing
app/src/is the React frontendapp/src-tauri/src/lib.rsexposes Tauri commands- the Tauri backend runs the installed
veilscanbinary and streams output into the UI
This repository is strongest today as:
- a static AI/ML security scanner
- a local desktop frontend over that scanner
- a generator of security-oriented artifacts such as threat models and reports
Things to keep in mind:
- normal scans are heuristic static analysis, not proof of exploitability
probeis a lightweight runtime tester, not a full red-team framework- the website prototype area is not cleanly source-complete in this checkout
- some generated outputs are advisory or heuristic and should be reviewed by a human before being treated as authoritative
If you want to try the project quickly:
pip install -e .
veilscan . -o report.json
veilscan threat-model . -o threat-model.md
veilscan probe http://localhost:8000/v1/chat/completionsIf you want the desktop app:
pip install -e .
cd app
npm install
npm run tauri dev