How svuillaume/forticnapp-forensicaiagent works
FortiCNAPP AI Agent is a local chat and investigation application: a user submits a question, the app selects a configured model provider, and the agent coordinates tools before returning a report. Distinct capabilities include tenant LQL/API investigations, compliance findings, CodeSec scans, TLS crypto checks, and knowledge wikis; browser history and result dashboards present completed work. Edges follow explicit README statements and sampled call sites. Several subsystems are documented but their full wiring was not sampled, so those links are dashed where the relationship is unverified.
Main entry points: backend.py MCP and gateway · app.py Local web app · agent.py Agent loop · mcp_server.py LQL MCP tools
Components 22
Chat experience
- Local web app
app.py - Chat page
index.html - Result dashboards
dashboard.js - Chat history
history.js
Agent and tools
- Agent loop
agent.py - Evidence ledger
ledger.py - MCP and gateway
backend.py
Tenant investigation
- LQL MCP tools
lql/mcp_server.py - LQL grounding
lql/lql_sources.py - Read-only API tools
lql/forensic_tools.py - Compliance frameworks
frameworks.py
Security assurance
- CodeSec scans
codesec.py - TLS crypto checks
tlscheck.py - Knowledge wikis
wiki.py
Access and providers
- Tenant credentials
creds.py - Model providers
providers.py - Admin authentication
auth.py
Other components
- User
- Model API
- FortiCNAPP API
- lacework scanners
- OpenSSL
Connections 27
- User → Chat page: asks
README.md - Chat page → Local web app: sends requests
- Local web app → Agent loop: runs questions
app.py - Agent loop → MCP and gateway: requests tools
backend.py - MCP and gateway → Model API: calls model
backend.py - Agent loop → Evidence ledger: checks claims
agent.py - Agent loop → Result dashboards: returns results
- Result dashboards → User: shows tables
README.md - Chat page → Chat history: stores chats
README.md - MCP and gateway → LQL MCP tools: connects tools
backend.py - LQL MCP tools → LQL grounding: grounds queries
lql/mcp_server.py - LQL MCP tools → Read-only API tools: exposes tools
lql/mcp_server.py - Local web app → Compliance frameworks: requests findings
app.py - MCP and gateway → Compliance frameworks: provides tools
backend.py - LQL MCP tools → FortiCNAPP API: queries tenant
lql/mcp_server.py - Tenant credentials → FortiCNAPP API: validates key
creds.py - Tenant credentials → LQL MCP tools: configures environment
creds.py - MCP and gateway → Model providers: uses direct APIs
backend.py - Model providers → Model API: sends requests
providers.py - Local web app → Admin authentication: checks sessions
app.py - Local web app → CodeSec scans: starts scans
app.py - CodeSec scans → Tenant credentials: uses scanner credentials
codesec.py - CodeSec scans → lacework scanners: runs scans
README.md - MCP and gateway → TLS crypto checks: runs tool
backend.py - TLS crypto checks → OpenSSL: probes handshakes
tlscheck.py - MCP and gateway → Knowledge wikis: offers wiki tools
backend.py - Agent loop → TLS crypto checks: imports checker
agent.py