How sanketpatel32/blunt-code works
Blunt Code is a local-first code-quality and security scanner with a browser UI and headless CLI. The main workflow is to select a workspace, plan and run analyzers, persist findings, then inspect, compare, suppress, and export results or apply a CI gate. The graph preserves major documented capabilities, including pentest/DAST, tool management, scan history, and reports. Several backend links rely on README workflow documentation because their implementation files were not excerpted; those limits are reflected by omitting unverified call details.
Main entry points: service.go Scan execution · api.ts Browser API client · database.go Local findings store · server.go Loopback API
Components 20
User entry points
- CLI commands
cmd/bluntcode
Scan pipeline
- Workspace discovery
internal/discovery - Scan planning
internal/scans/plan.go - Scan execution
internal/scans/service.go - Analyzer suite
internal/analyzers - Pentest and DAST
internal/dast/dast.go - Managed tools
internal/tools/manager.go
Findings and outputs
- Finding classification
internal/diffclassify/classify.go - Local findings store
internal/database/database.go - Baselines and history
internal/scans/coverage.go - Report exports
internal/reports/report.go - Policy and CI gate
internal/scans/gate.go
Local interface
- Web application
web/src/App.tsx - Loopback API
internal/api/server.go - Browser API client
web/src/api.ts - Finding report view
web/src/pages/report/ReportView.tsx - Finding search
web/src/pages/SearchPage.tsx - Dashboard and workspaces
web/src/pages/HomePage.tsx
Other components
- Developer / operator
- Project files
Connections 22
- Developer / operator → CLI commands: runs commands
README.md - Developer / operator → Web application: uses locally
README.md - Web application → Browser API client: requests data
web/src/App.tsx - Browser API client → Loopback API: calls API
web/src/api.ts - CLI commands → Scan execution: runs scans
README.md - Loopback API → Scan execution: starts scans
- Project files → Workspace discovery: provides project
README.md - Scan execution → Workspace discovery: discovers inputs
- Scan execution → Scan planning: plans execution
- Scan execution → Analyzer suite: runs analyzers
README.md - Scan execution → Pentest and DAST: runs pentest
README.md - Scan execution → Managed tools: uses managed tools
- Analyzer suite → Finding classification: produce findings
README.md - Pentest and DAST → Finding classification: produces findings
README.md - Finding classification → Local findings store: persisted locally
README.md - Local findings store → Baselines and history: supports comparison
README.md - Local findings store → Report exports: feeds exports
README.md - Local findings store → Policy and CI gate: feeds CI gate
README.md - Loopback API → Finding report view: serves report data
- Finding report view → Browser API client: loads and suppresses
web/src/pages/report/ReportView.tsx - Browser API client → Finding search: supplies findings
- Browser API client → Dashboard and workspaces: supplies workspace data