How nguyentin2068/devsecops-mcp works
DevSecOps MCP provides a CLI-driven security scanning workflow for CI: validate and configure a target, run a scanner, persist JSON/SARIF results, and apply a policy gate. Its separate read-only MCP interface lets clients list, inspect, summarize, and report on stored scans over HTTP or stdio. The graph preserves the documented SAST, SCA, container, and DAST stages. Source excerpts do not show every scanner invocation or storage write; those relationships are included only where the index or README supports them.
Main entry points: scan-runner.ts Scan runner · cli.ts Scan CLI · process.ts Process runner · tools.ts Read-only tools
Components 20
Scan execution
- Scan CLI
src/cli.ts - Rules config
src/core/config.ts - Target guards
src/core/guards.ts - Scan runner
src/core/scan-runner.ts - Process runner
src/core/process.ts
Scanner adapters
- Opengrep adapter
src/core/scanners/opengrep.ts - OSV adapter
src/core/scanners/osv-scanner.ts - Trivy adapter
src/core/scanners/trivy.ts - Katana crawler
src/core/scanners/katana.ts - Nuclei adapter
src/core/scanners/nuclei.ts
Results and policy
- Report store
src/core/report-store.ts - Policy gate
src/core/policy.ts - Report renderer
src/core/report.ts - SARIF formatter
src/core/sarif.ts
Read-only MCP
- HTTP transport
src/mcp/http.ts - MCP server
src/mcp/mcp.ts - Read-only tools
src/mcp/tools.ts - Stdio transport
src/mcp/mcp.ts
Other components
- CI / operator
- MCP client
Connections 29
- CI / operator → Scan CLI: invokes
README.md - Scan CLI → Rules config: loads rules
src/cli.ts - Scan CLI → Scan runner: starts scan
src/cli.ts - Scan CLI → Report store: loads results
src/cli.ts - Scan CLI → Policy gate: evaluates gate
src/cli.ts - Scan CLI → Report renderer: renders report
src/cli.ts - Scan runner → Rules config: resolves settings
src/core/scan-runner.ts - Scan runner → Target guards: validates targets
src/core/scan-runner.ts - Scan runner → Opengrep adapter: dispatches SAST
src/core/scan-runner.ts - Scan runner → OSV adapter: dispatches SCA
src/core/scan-runner.ts - Scan runner → Trivy adapter: dispatches scans
src/core/scan-runner.ts - Scan runner → Nuclei adapter: dispatches DAST
src/core/scan-runner.ts - Scan runner → Katana crawler: starts crawl
src/core/scan-runner.ts - Scan runner → Report store: stores results
src/core/scan-runner.ts - Opengrep adapter → Process runner: runs binary
src/core/scanners/opengrep.ts - OSV adapter → Process runner: runs binary
src/core/scanners/osv-scanner.ts - Trivy adapter → Process runner: runs binary
src/core/scanners/trivy.ts - Nuclei adapter → Process runner: runs binary
src/core/scanners/nuclei.ts - Katana crawler → Process runner: runs binary
src/core/scanners/katana.ts - Report store → SARIF formatter: formats SARIF
src/core/report-store.ts - Report renderer → SARIF formatter: formats SARIF
src/core/report.ts - MCP client → HTTP transport: connects HTTP
README.md - HTTP transport → MCP server: serves MCP
src/mcp/http.ts - MCP server → Read-only tools: dispatches tools
src/mcp/mcp.ts - Read-only tools → Report store: reads scans
src/mcp/tools.ts - Read-only tools → Policy gate: evaluates policy
src/mcp/tools.ts - Read-only tools → Report renderer: renders report
src/mcp/tools.ts - MCP client → Stdio transport: connects stdio
README.md - Stdio transport → MCP server: hosts MCP
src/mcp/mcp.ts