Skip to content
MazoniaPublic

About

MazAPI: Enterprise API & AI Security Intelligence Platform - AST route discovery, AI-BOM supply-chain audit, MCP scanner, and OWASP API Top 10 DAST.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

101 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MazAPI - Enterprise API & AI Security Intelligence Platform

CI/CD Pipeline Python Version OWASP Compliance AI Supply Chain License

Welcome to the MazAPI Security Platform. MazAPI is a comprehensive, zero-egress, multi-tier API and AI security ecosystem designed for modern development teams. It unifies pre-production static code discovery (AST App Surface), AI Agent & MCP supply-chain audits, active OWASP DAST vulnerability testing, calibrated machine learning threat detection, and an in-browser Side Panel interactive workbench.

Every component shares one design system — Shoreline, a coastal palette of ocean slate, rust stone and cream plaster — with light (Cream) and dark (Deep Water) themes, built for high developer productivity and seamless CI/CD integration.

MazAPI console — overview


📂 Repository Architecture

api-security/
├── api-security-project/      # Core security engines, ML pipeline, and training lab
│   ├── agent_audit/           # AI Agent security auditor, rules, & CycloneDX 1.6 AI-BOM
│   ├── app_surface/           # Multi-language AST route parsers, PR diff, & SARIF exporter
│   ├── monitoring/            # Real-time proxy, 32-feature ML model, & threat dashboard
│   ├── testing-engine/        # Active OWASP API scanner, DAST engine, & MCP auditor
│   ├── vulnerable-api/        # Port 8000 - Intentionally vulnerable FastAPI service & shop
│   ├── hardened-api/          # Port 8001 - Mitigated FastAPI service with OWASP controls
│   └── cli.py                 # Unified CLI for CI/CD and terminal execution
├── mazapi-extension/          # Chrome / Brave Manifest V3 Side Panel extension
├── mazapi-vscode/             # VS Code / Antigravity IDE Workspace scanner extension
└── .github/workflows/         # Automated GitHub Actions for App Surface, Agents, and MCP

🌟 Key Platform Capabilities

1. App Surface Discovery Engine (PR-Time Static Analysis)

Detect application, API, and IoT edge attack surfaces directly from source code during Pull Request review:

  • Multi-Language AST Parsers: Native syntax tree extraction for 7 enterprise & embedded ecosystems:
    • Python: FastAPI, Flask, Django REST Framework, Paho MQTT, aiocoap
    • Node.js: Express, NestJS, Fastify, MQTT.js, CoAP.js
    • C/C++ Embedded IoT: ESP-IDF esp_http_server, Arduino WebServer, FreeRTOS MQTT handlers, and micro-REST endpoints
    • Java: Spring Boot (@RestController, @RequestMapping), JAX-RS
    • .NET: ASP.NET Core Controllers & C# Minimal APIs
    • Go: Gin, Echo, Fiber, Chi
    • PHP: Laravel routing & Symfony Controller attributes
  • Shadow API & Undocumented Route Diffing: Compares Git commits (--base vs --head) to pinpoint newly introduced, altered, or deprecated routes before deployment.
  • OpenAPI 3.0 & AsyncAPI 3.0 Synthesis: Automatically synthesizes OpenAPI 3.0 and event-driven AsyncAPI 3.0 specifications straight from code and exports findings to GitHub Code Scanning (SARIF).

2. AI Agent Audit Engine (AI Supply-Chain & Cyber-Physical Guardrails)

Audit LLM applications, autonomous agentic workflows, and cyber-physical actuation tools before shipping to production:

  • 11+ AI Frameworks Analyzed: LangChain, LangGraph, CrewAI, AutoGen, Semantic Kernel, LlamaIndex, Haystack, DSPy, OpenAI Swarm, AWS Bedrock Agents, and Custom Tool decorators.
  • Deterministic Security Engines:
    • Cyber-Physical IoT Actuation Guardrails: Flags AI agent tools triggering physical actuators (locks, relays, motors, valves, HVAC) executing without Human-in-the-Loop (HITL) authorization or safety parameters.
    • Authorization Gaps & Confused Deputy: Detects unauthenticated tool execution sinks where unvalidated inputs invoke privileged backend tools.
    • Excessive Agency: Flags unconstrained operating system shells, dynamic SQL, file writes, and financial mutation operations (e.g., Stripe charges) executing without HITL approval.
    • Provider Key Exposure: Masked detection of 15+ LLM provider API credentials (OpenAI, Anthropic, Cohere, Groq, Replicate, Hugging Face).
    • RAG Multi-Tenant Isolation: Flags vector database queries (Pinecone, Chroma, Qdrant, Weaviate, Pgvector) missing tenant isolation filter constraints.
  • CycloneDX 1.6 AI-BOM: Generates structured AI Software Bill of Materials tracking models, parameters, data flows, and tool sinks.

3. Model Context Protocol (MCP) & IoT API Security Auditor

Evaluate Model Context Protocol servers and IoT protocol endpoints for vulnerabilities:

  • IoT API Protocol Auditor: Audits MQTT broker ACLs, CoAP UDP reflection vulnerabilities, cleartext telemetry disclosure, and insecure OTA firmware updates.
  • Security Registry: Evaluates server configurations against a database of 50+ vetted community and enterprise MCP servers.
  • Static Source Scans: Analyzes custom Python and Node.js MCP server implementations for shell injection and path traversal sinks.

4. Calibrated Machine Learning Anomaly Detector

  • 32-Feature Extraction Pipeline: Measures payload size, path entropy, parameter types, authentication headers, and request timing.
  • High-Accuracy Random Forest Model: Calibrated classifier delivering 99.73% validation accuracy in differentiating normal traffic from OWASP API Top 10 attacks and credential enumeration.

5. BOLT Browser Side Panel Workbench

A persistent Chrome/Brave Side Panel workbench (Manifest V3) running 100% locally on-device:

  • Passive Traffic Discovery: Automatically catalogues API routes and formats parameter templates (e.g., /api/users/42 → /api/users/{id}).
  • Auth Token Harvester & JWT Inspector: Extracts Bearer tokens, cookies, and keys. Decodes JWT headers and payloads with instant alerts for alg:none bypasses and symmetric secret risks.
  • Request Manipulator & Replay (BOLA / IDOR): Live request tampering workbench with a Smart Parameter Picker for rapid authorization testing.
  • Selective OAS 3.0 Export: Filter captured traffic and download formatted OpenAPI YAML or JSON specs.
  • Correlated Threat Chains: Graph-based multi-signal engine that links related vulnerabilities into complete attack scenarios.
  • Active OWASP Scanner: Runs 12+ client-side tests without sending telemetry or traffic to external cloud servers.

📊 Comprehensive Industry & Open Source Feature Comparison Matrix

Feature Comparison Matrix

Capability / Feature MazAPI Platform (Ours) APISec / BOLT Akamai / Noname Salt Security Traceable AI 42Crunch StackHawk OWASP ZAP Nuclei Schemathesis
PR-Time AST Route Discovery (7 Langs) Yes (7 Langs) ⚠️ (3 Langs) ❌ ❌ ⚠️ (eBPF) ⚠️ (Spec only) ❌ ❌ ❌ ❌
Embedded C/C++ & IoT AST Parser Yes (ESP/Arduino) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
Shadow API Git Base/Head PR Diff Yes (Git diff) ⚠️ (Planned) ⚠️ (Runtime) ⚠️ (Runtime) ⚠️ (Runtime) ❌ ❌ ❌ ❌ ❌
AsyncAPI 3.0 & OpenAPI Auto-Synthesis Yes (Both) ⚠️ (OpenAPI) ⚠️ (Gateway) ⚠️ (Gateway) ⚠️ (Gateway) ⚠️ (OpenAPI) ❌ ❌ ❌ ⚠️ (OpenAPI)
IoT Protocols (MQTT / CoAP / OTA) Yes ❌ ⚠️ (Basic MQTT) ⚠️ (Basic MQTT) ⚠️ (Basic MQTT) ❌ ❌ ❌ ⚠️ (Templates) ❌
AI Agent Security Audit (11+ Fwks) Yes (11+ Fwks) ⚠️ (Basic) ❌ ❌ ⚠️ (Firewall) ❌ ❌ ❌ ❌ ❌
Cyber-Physical AI Actuation Guard Yes ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
CycloneDX 1.6 AI-BOM Generation Yes ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
MCP (Model Context Protocol) Audit Yes (50+ Reg) ⚠️ (Config) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
Browser Side Panel Workbench Yes (Side Panel) ⚠️ (Popup) ❌ ❌ ❌ ❌ ❌ ❌ ❌ ❌
Active Zero-Egress OWASP & IoT DAST Yes (100% Local) ⚠️ (Cloud) ⚠️ (Add-on) ❌ ⚠️ (DAST) ⚠️ (Conformance) Yes (Cloud) Yes (Local) Yes (Local) Yes (Local)
ML Anomaly Detection Ensemble Yes (99.73% RF) ⚠️ (Heuristic) Yes Yes Yes ❌ ❌ ❌ ❌ ❌
Data Privacy / Zero-Egress Architecture 100% Local Cloud SaaS Cloud / On-Prem Cloud SaaS Hybrid Cloud Cloud / IDE Cloud SaaS 100% Local 100% Local 100% Local
Unified CLI & GitHub SARIF Export Yes (cli.py) ⚠️ (Runner) ⚠️ (Plugin) ❌ ⚠️ (Agent) Yes Yes ⚠️ (CLI) Yes Yes

Tip

Interactive Web Comparison Workbench: Launch the live interactive matrix web dashboard at http://localhost:9000/comparison or http://localhost:8000/comparison, or open comparison_workbench.html directly in your browser. Clicking on any feature row opens a deep-dive drawer analyzing technical capabilities, competitor gaps, security impact, and CLI/code snippets.


🚀 Quick Start Guide

1. Launching the Security Training Lab & Live Monitoring

Run the complete multi-tier lab containing the vulnerable shop backend, mitigated target, and ML monitoring dashboard:

cd api-security-project
docker compose up -d --build

Access the local services:

  • MazAPI Console: http://localhost:9000/dashboard (scanner at /scan-ui)
  • ShopApp (Port 8000): http://localhost:8000/ui — a working storefront on the vulnerable API with a 9-exploit attack lab, a request inspector and one-click replay against the hardened API
  • Hardened API Target (Port 8001): http://localhost:8001
  • VulnBank (Port 8002): http://localhost:8002/ui — online banking (transfers, statements, integrations) where every feature maps to one OWASP API Top 10 category; lessons at /lab/ui

1a. The MazAPI Console (http://localhost:9000)

One web console ties the platform together. Every page shares the same sidebar, live service-health indicators and theme switch (Light · Dark · match system).

Page URL What it's for
Overview /dashboard#overview KPIs with sparklines, request/anomaly timeline, recent detections
Live traffic /dashboard#traffic Filter, sort and export proxied requests; click any row for a detail drawer
Anomalies /dashboard#anomalies Every ML detection mapped to OWASP / CWE with a concrete fix
Endpoints /dashboard#endpoints Volume, error rate, anomalies and auth coverage per route
Scanner /scan-ui 4-step wizard (target → auth → endpoints → tests) with presets, HAR import, live Playwright capture, triage and SARIF / HTML / webhook exports
Reports /dashboard#reports Quick scans, vulnerable-vs-hardened comparison, saved report library with bulk delete
Topology & BOM /dashboard#topology Traffic map, inline ML auto-blocking toggle, OpenAPI and unified BOM export
Extension live feed /extension/live Scans streamed from the browser extension in real time
Feature matrix /comparison Capability comparison with commercial tools, plus hands-on guides

Keyboard shortcuts: Ctrl+K command palette · / focus search · 1–6 switch dashboard views · R refresh · Ctrl+Enter run a scan.

Everything is served from your machine: fonts and scripts are bundled, nothing is loaded from a CDN, and generated reports work offline (with a Print / PDF button).

Anomalies in dark mode Scanner results
Comparison report Browser side panel

Configuration (environment variables for the monitoring service — already set in docker-compose.yml):

Variable Default Purpose
UPSTREAM_URL http://localhost:8000 Where the proxy on :9000 forwards traffic
VULNERABLE_API_URL UPSTREAM_URL Lab target used by presets and the comparison runner
HARDENED_API_URL http://hardened-api:8001 Hardened lab target
REPORTS_DIR /reports, else ./api-security-project/reports Where scan and comparison reports are saved
DB_PATH monitoring/data/traffic.db SQLite traffic log

2. Using the Unified CLI

The unified mazapi command-line tool provides a rich, colorized terminal interface for all security engines. Simply type mazapi or .\mazapi.bat in your terminal to see the interactive banner and command menu:

# Display rich interactive banner & command menu
mazapi

# 1. Scan Application Surface AST across multi-language source code
mazapi app-surface scan ./api-security-project/vulnerable-api --format table

# 2. Audit AI Agent workspace & export CycloneDX 1.6 AI-BOM
mazapi agent-audit scan ./api-security-project/agent_audit --governance --format ai-bom -o ./ai-bom.json

# 3. Audit Model Context Protocol (MCP) server registry & source code
mazapi mcp-audit registry
mazapi mcp-audit source-scan ./api-security-project/testing-engine

# 4. Audit IoT endpoints, MQTT brokers, CoAP, and OTA surfaces
mazapi iot-audit --target http://localhost:8000

# 5. Run active OWASP API Top 10 dynamic DAST scan & export SARIF
mazapi scan --target http://localhost:8000 --format sarif -o ./scan-results.sarif

3. Installing the browser extension (Chrome, Edge, Brave, Firefox)

From a store — search for MazAPI in the Chrome Web Store, Microsoft Edge Add-ons or Firefox Add-ons once the listings are live.

From the latest release (works today):

  1. Download mazapi-extension-chrome-<version>.zip (Chrome, Edge, Brave, Opera) or mazapi-extension-firefox-<version>.zip from the latest release and unzip it.
  2. Chrome / Edge / Brave: open chrome://extensions (or edge://extensions, brave://extensions), turn on Developer mode, click Load unpacked and select the unzipped folder. Firefox: open about:debugging#/runtime/this-firefox → Load Temporary Add-on… → pick manifest.json inside the unzipped folder (temporary until restart; the store version installs permanently).
  3. Click the MazAPI toolbar icon to open the side panel (a sidebar in Firefox). The Guide tab walks through every feature.

Developers can also load ./mazapi-extension directly as an unpacked extension.


4. Installing the VS Code extension (VS Code, Cursor, Windsurf, VSCodium, Antigravity)

From a marketplace — search for MazAPI Scanner in the Extensions view (VS Code Marketplace; Open VSX for Cursor, Windsurf, VSCodium and Antigravity) once published, or run code --install-extension MazAPI.mazapi-scanner.

From the latest release (works today):

  1. Download mazapi-scanner-<version>.vsix from the latest release.
  2. In your editor open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) → Extensions: Install from VSIX… → choose the file. Or: code --install-extension mazapi-scanner-<version>.vsix.
  3. Open the MazAPI icon in the activity bar. File and workspace scans work immediately; live OWASP endpoint scans need the local MazAPI stack (docker compose up -d), configured via mazapi.backendUrl.

Build it yourself with python scripts/build_extensions.py --vsix (output in ./dist). Maintainers: see docs/PUBLISHING.md for store publishing.


🛡️ Compliance & Standards Coverage

MazAPI maps every finding to recognized security standards:

  • OWASP API Security Top 10 (2023): API1 (BOLA), API2 (Broken Auth), API3 (BOPLA), API4 (Rate Limiting), API5 (BFLA), API7 (SSRF), API8 (Misconfig), API9 (Inventory/GraphQL).
  • PCI-DSS v4.0: Requirements 6.2.4, 6.3.3, 8.2.1, 8.3.1.
  • GDPR: Articles 5(1)(f), 25, 32 (Data protection and PII leakage prevention).
  • ISO/IEC 27001: Annex A.9.4.1, A.14.2.5, A.18.1.4.
  • CWE / CVE: CWE-22 (Path Traversal), CWE-601 (Open Redirect), CWE-312 (Cleartext Storage), CWE-650 (HTTP Verb Tampering), CVE-2015-9235 (JWT None Algorithm).

🧪 Running Automated Tests

Run the full verification and unit test suite:

python run_all_tests.py

Expected output:

Ran 22 tests in 2.904s -> OK (100% Passed)

❓ Frequently Asked Questions (FAQ)

What is MazAPI?

MazAPI is an enterprise zero-egress API and AI security platform that unifies static code AST discovery across 7 ecosystems, AI Agent and MCP supply-chain audits, active OWASP API Top 10 DAST scanning, and calibrated machine learning threat detection.

How does MazAPI identify Shadow and undocumented APIs?

MazAPI analyzes source code at Pull Request time using language-specific Abstract Syntax Tree (AST) parsers. By comparing Git commits (--base vs --head), it pinpoints newly added or altered routes that lack formal API documentation and generates OpenAPI 3.0 and AsyncAPI 3.0 specifications automatically.

What risks does the AI Agent & MCP auditor look for?

The AI audit engine analyzes agent frameworks (LangChain, CrewAI, AutoGen, etc.) for cyber-physical actuator triggers executing without Human-in-the-Loop approval, confused deputy sinks, excessive agency (unconstrained OS shells and financial mutations), and missing tenant isolation in vector databases. It also generates CycloneDX 1.6 AI-BOM documents.

Does MazAPI send proprietary code or traffic to third-party clouds?

No. MazAPI operates under a strict 100% zero-egress architecture. All AST parsing, DAST security scanning, machine learning classification, and side-panel request tampering execute entirely locally on your machine or private CI/CD runners.


Privacy

MazAPI has no server and collects no telemetry. See PRIVACY.md.

License & Attribution

This project is licensed under the MIT License. Created for research and practical training in modern API, Agentic AI, and Cloud security architectures.

About

MazAPI: Enterprise API & AI Security Intelligence Platform - AST route discovery, AI-BOM supply-chain audit, MCP scanner, and OWASP API Top 10 DAST.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages