AI security testing framework with terminal-first execution and GitHub Pages demo shell.
- Clone repository:
git clone https://github.com/imharshitaa/AIvector.git
cd AIvector- (Optional) Create virtual environment:
python3 -m venv .venv
source .venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Install global
aicommand:
bash scripts/install_ai_command.sh- If command is still not found in fish, run once:
set -U fish_user_paths ~/.local/bin $fish_user_paths- Verify:
ai --helpai run <target_url>Example sample endpoints:
ai run https://prompt-injection-lab.vercel.app/api/chat
ai run https://api-inference.huggingface.co/models/gpt2
ai run https://aihorde.net/api/v2
ai run https://chat.openai.com/backend-api/models/Users/harshitaaa/Projects/AIvector
├── ai # launcher for ai run <target_url>
├── main.py # command parser + run orchestration
├── demo/
│ ├── __init__.py
│ ├── framework.py # case loading, stage execution, report write
│ ├── ui.py # terminal rendering and pre-input helper text
│ └── index.html # demo page served at /demo/
├── common/
│ ├── case_utils.py # shared case helper methods
│ └── __init__.py
├── scripts/
│ ├── install_ai_command.sh # installs ai command to ~/.local/bin
│ └── uninstall_ai_command.sh # removes ai command from ~/.local/bin
├── <test_case_folder>/
│ ├── discovery.py
│ ├── test.py
│ └── exploit.py
├── reports/
│ ├── latest_report.json
│ └── target_history.json
├── .github/workflows/pages.yml # GitHub Pages deployment workflow
└── index.html # root page linking to live demo
- Parse
ai run <target_url>. - Print helper prelude (project, link, command, sample URLs).
- Discover testcase folders containing all required files:
discovery.pytest.pyexploit.py
- Execute each case in order:
- discovery stage
- test stage
- exploit stage
- Print per-case logs and vulnerability evidence.
- Generate final summary and save JSON report.
- Update historical target list of vulnerable endpoints.
Per case, terminal prints:
status(PASS/VULNERABLE)severityscoreevidenceremediationduration
Logs include timestamps and case id, e.g.:
[16:45:01][info][prompt_injection__system_override] discovery:start
[16:45:01][info][prompt_injection__system_override] test:start
[16:45:02][info][prompt_injection__system_override] exploit:start
This repository deploys Pages from main via:
.github/workflows/pages.yml
After each push to main, GitHub Pages publishes the demo route:
/AIvector/demo/
Use only with explicit authorization on targets you are allowed to test.