AISAI is a local-first security auditing workbench for identifying software supply chain vulnerabilities across PyPI, npm, crates.io, Git repositories, and local project folders. It resolves dependency trees, downloads source archives safely without installing or executing untrusted code, parses source files into syntax trees, and combines static rules, OSV advisories, and an optional LLM review pipeline.
View source on GitHub · Latest release
Origin & Architecture
AISAI started as my undergraduate research project—a Python and Dash prototype (preserved under legacy/). Because I’m stronger on backend systems than frontend design, that first UI felt amateurish and limited what the tool could do. I rewrote AISAI to give it a proper, approachable frontend and make it genuinely easier and more useful in day-to-day auditing, pairing a Go backend (cmd/aisai-server) with an Electron + TypeScript desktop renderer (CodeMirror, vis-network, xterm.js, and Zustand, with no frontend framework):
- Library-first Go core: The same internal Go packages back the Electron sidecar, an MCP stdio server (
cmd/aisai-mcp), and the benchmark harness (cmd/aisai-bench), keeping finding definitions identical across interactive and automated runs. - Unix-socket IPC: The Electron main process spawns the Go sidecar over a local Unix socket rather than exposing an HTTP port on the network, while the preload bridge exposes only an allow-listed API surface.
- Local and air-gapped ready: Advisories can be queried against a local OSV snapshot and LLM features can run against a local Ollama server (or OpenAI-compatible/hosted providers with API keys kept in the OS keychain), or be turned off completely with
DISABLE_LLM=1.
Auditing & Analysis
- Multi-ecosystem resolution & advisories: Resolves dependency graphs via
deps.dev(and lockfiles such asCargo.lock,package-lock.json,poetry.lock,Pipfile.lock,go.mod, and pinnedrequirements*.txtfor local folders), checks versions against OSV, and surfaces dependency chains explaining why any transitive package is present. - 14-language static analysis: Parses Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C#, Ruby, C, C++, PHP, Scala, and shell scripts with tree-sitter. Combines pattern rules across all 14 languages, intra-file taint analysis for Python, Rust, JS/TS, Go, and Java, and dedicated rules for Rust
unsafeand FFI boundaries. - Verified LLM review & workspace Q&A: Treats LLM scans as a second opinion—every candidate finding goes through a verification pass that drops unverifiable claims and re-anchors findings to quoted code. Includes inline
⌘Kdiff proposals, re-scanning of applied patches, and threaded codebase chat with explicit approval prompts for non-read-only tool commands. - Interactive workspace: Rearrangeable panes and layout presets, interactive dependency and AST graphs (PNG/SVG export), a built-in terminal, and a standard-library
bdbPython debugger restricted strictly to user-opened local projects.
Safety Properties
- Audited packages are never installed or executed (
setup.pyand build scripts never run). - Archive extraction rejects path traversal, external symlinks, device nodes, and oversized archives, strips setuid/setgid bits, and is covered by fuzz testing.
- All filesystem access funnels through a single symlink-resolving workspace chokepoint (
audit.ResolvePath), and untrusted source code is quarantined against prompt injection before reaching models.
Reporting, MCP & Benchmarking
Audits export to print-ready PDF, self-contained HTML, SARIF 2.1.0, CycloneDX 1.5, and SPDX 2.3. External coding agents can drive full audits through the bundled MCP server (scan_package, get_dependency_graph, run_sast, propose_fix, export_report, and more), and a Go benchmark harness evaluates the static and LLM engines against a 1,551-pair vulnerable/fixed dataset.