How to build, test, extend, and ship AXguard.
| Doc | Audience |
|---|---|
| This guide | Contributors & maintainers |
| Architecture | Anyone changing engines/rules |
| Adding rules | Detection authors |
| Plugin / skills | Agent harness wiring |
| Commands quick ref | End users & agents |
| Cover prompt | Branding / assets |
- Python 3.10+
git- Optional: Claude Code / Cursor (to exercise the plugin install path)
git clone https://github.com/Awarexone/AXguard.git
cd AXguard
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
axguard version
axguard helpEditable install gives you the axguard entry point and picks up local engines/ + cli/ changes immediately. Rules load from the repo rules/ directory via engines.paths.default_rules_dir().
# Fast scan
axguard scan fixtures/vuln_app --no-banner
# Full A→Z audit + HTML/MD/JSON
axguard audit fixtures/vuln_app --out-dir .findings/axguard --no-banner
# Tests
pytest -q
# Plugin install (local harness)
./install.sh --agent cursor --project
./uninstall.sh --agent cursor --projectReports land in .findings/axguard/ (gitignored).
cli/ CLI entrypoint (scan, audit, surface, flow, verify, adversary, evidence, paths, help, version)
engines/ Scan orchestration, rule loader, reporters, banner, diagnostic engines (app_model/dataflow/verify/adversary/evidence/attack_graph)
rules/ JSON rule packs (secrets, auth, injection, …)
commands/ Slash commands installed into agent harnesses
skills/ Agent Skills (SKILL.md)
fixtures/ Intentional vulnerable samples for tests
tests/ pytest suite
assets/ Cover art + brand prompts
.claude-plugin/ Plugin manifest
install.sh Install skills/commands into Claude/Cursor/…
uninstall.sh Remove installed skills/commands
docs/ Deeper developer docs
axguard audit|scan
│
▼
engines.scanner.run_scan
│
├─ rules_loader.load_rules(rules/)
└─ source_scan.scan_source(target, rules)
│
▼
findings[]
│
┌───────┴────────┐
▼ ▼
text / json audit + write_reports
(md + html + json)
- Deterministic path: CLI +
rules/*.jsonregex packs - Agent path:
commands/+skills/teach the model when/how to run the CLI and how to triage
Details: docs/architecture.md
- Pick or create a pack under
rules/(e.g.rules/injection.json). - Add a rule object with
id,title,severity,pattern,message,fix. - Add a fixture under
fixtures/that should match. - Assert in
tests/. - If it is a new class, add a slash command under
commands/and updateCOMMANDS-QUICK-REF.md+ README Start Using table.
Full schema and examples: docs/adding-rules.md
Command — commands/axguard-<name>.md
Front matter description: becomes the agent help text. Keep steps concrete: run which CLI, which paths, what to output.
Skill — a top-level directory with a SKILL.md: axguard-<name>/ (orchestration) or <name>/ (research-backed domain skill)
YAML front matter: name, description. Description must say when to load the skill. Domain skills follow docs/SKILL-SCHEMA.md and must appear in skills-index.yaml.
After adding files:
python scripts/validate_skills.py
./install.sh --agent cursor --project # or claude / allUpdate uninstall.sh skill/command lists if you add new names.
pytest -q
python scripts/validate_skills.py
pytest tests/test_scan.py -q
pytest tests/test_audit_report.py -q
pytest tests/test_skills.py -qCI runs tests + skill validation via .github/workflows/ci.yml (needs a token with workflow scope when editing workflows).
Expectations
- New rules → fixture hit + assertion
- Reporter changes → assert MD/HTML contain expected markers
- Do not commit live secrets; fixtures use obvious fake values
| Field | Location |
|---|---|
| Version | pyproject.toml → [project].version (currently 0.2.0) |
| Package name | axguard |
| Console script | axguard = cli.main:main |
| License | MIT (LICENSE) |
Bump version in pyproject.toml, README badges, and engines/audit.py / CLI version strings together.
- Python 3.10+ typing (
list[dict],Path | None) - No heavy deps in the default install (stdlib-first)
- Keep CLI output terse; banner optional via
--no-banner - Agent docs: professional hunter tone, no filler
-
pytest -qgreen - New behavior covered by a test or fixture
- Rules / commands / skills documented in quick-ref or README if user-facing
- No real secrets in fixtures
-
uninstall.shlists updated if you added installable names
| Tool | Role |
|---|---|
| Agentic Bug Hunter | Live hunting (offense) |
| AXguard | Pre-ship gate (defense) |
| public-skills-builder | Generate hunt skills |
| web3 skills | Smart-contract skills |
Questions / sponsorship: awarexone.com · hello@awarexone.com · b2b@awarexone.com · shuvon@awarexone.com