diff --git a/.coverage b/.coverage new file mode 100644 index 0000000..f68958a Binary files /dev/null and b/.coverage differ diff --git a/README.md b/README.md index 34c66a0..0b73ff7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@

Turn the coding agent you already have into a disciplined security reviewer.
- SAST, secret scanning, SCA, threat modeling and architecture review. Same checklist, same report shape, every run. + SAST, secret scanning, SCA, threat modeling and architecture review, with your design docs, Confluence and tickets as context.
+ Same checklist, same report shape, every run.

@@ -54,6 +55,56 @@ repo. Every finding carries CWE, OWASP category, CVSS vector, location, the vulnerable code and a fix. The full reports, the SARIF and the JSONL export are in [examples/sample-output/nodegoat](https://github.com/secfoo-com/secfoo/blob/main/examples/sample-output/nodegoat). +## Context, not just code + +A code repository is one input. Real reviews also need the design doc, the +threat model from last year, the runbook and the ticket that explains why the +odd thing is there. secfoo passes that context to the agent through +[MCP](https://modelcontextprotocol.io) and asks the skills to use it: +the architecture review compares what is *documented* (Confluence, README, +ADRs) with what is *implemented* and reports the gaps; secret scanning +covers linked Confluence pages as well as code; every report ends with a +coverage section that says which documentation sources were reached and +which were not. + +```bash +secfoo run --skill security-architecture-review --skill threat-modeling \ + --target https://github.com/org/payments-api \ + --confluence https://yourcompany.atlassian.net/wiki/spaces/PAY/pages/123/Architecture \ + --confluence https://yourcompany.atlassian.net/wiki/spaces/SEC/pages/456/Threat+Model +``` + +Connect the documentation sources once in `~/.secfoo/config.toml`; any MCP +server works, so the same applies to SharePoint and Microsoft 365, Jira, +Notion, Google Drive or an internal wiki: + +```toml +[[mcp_servers]] +name = "Atlassian-Rovo-MCP" # Confluence + Jira, official Atlassian server +command = "npx" +args = ["-y", "mcp-remote@latest", "https://mcp.atlassian.com/v1/mcp/authv2"] + +[[mcp_servers]] +name = "sharepoint" # any HTTP/SSE MCP server +url = "https://mcp.example.com/sharepoint" +transport = "http" +headers = { Authorization = "Bearer ..." } +``` + +| Context | How it gets in | Used by | +|---|---|---| +| Confluence pages | `--confluence ` (repeatable) plus an Atlassian MCP server | Architecture review, threat modeling, secret scanning, compliance skills | +| Jira, SharePoint, Notion, Google Drive, internal wikis | `[[mcp_servers]]` in config; the agent calls them as tools during the review | Every skill | +| Vendor documents (PDF, DOCX, PPTX) and AI-BOM files | `secfoo assessment upload ` | Third-party risk assessment, Responsible AI compliance | +| Curated vulnerability patterns | `secfoo memory signup` (optional hosted service, exposed as an MCP server) | SAST, SCA, secret scanning | + +With `--agent claude` the configured servers are attached to each run +automatically and nothing else (your global Claude config is not touched and +the target's own `.mcp.json` is not loaded). For Gemini CLI and Cursor run +`secfoo mcp sync --agent ` once. Codex, Antigravity and the `api` +agent cannot use MCP servers yet. Details in +[docs/REFERENCE.md](https://github.com/secfoo-com/secfoo/blob/main/docs/REFERENCE.md#configuration-secfooconfigtoml). + ## Put it in CI Findings show up in GitHub's **Security** tab and as PR annotations; the job @@ -104,6 +155,9 @@ Screenshots are from a real local `secfoo serve` against public vulnerable-app t structured prompt and a target, then collects a report in a fixed shape. - **One dashboard for the program.** Coverage, dispositions, STRIDE, design verdicts, and findings across every project you have scanned. +- **Context-aware.** Confluence pages, tickets, design docs and uploaded + vendor documents reach the agent through MCP, and the report says which + sources it could and could not read. See [Context, not just code](#context-not-just-code). - **Local first.** Runs and `secfoo serve` stay on your machine. Optional `secfoo cloud login` syncs to an org portal that is not in this repo. - **Concurrent by default.** Several `--skill` flags run at the same time. @@ -126,6 +180,7 @@ Screenshots are from a real local `secfoo serve` against public vulnerable-app t | Prompt Review | `prompt-review` | | Deployment Readiness | `deployment-readiness` | | Responsible AI Compliance | `responsible-ai-compliance` | +| Third-Party Risk Assessment | `third-party-risk-assessment` | Run one, or several together. What each report actually contains is in [docs/REFERENCE.md](https://github.com/secfoo-com/secfoo/blob/main/docs/REFERENCE.md). Write your own skill as a diff --git a/pyproject.toml b/pyproject.toml index 563bf7a..00c2996 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "hatchling.build" [project] name = "secfoo" dynamic = ["version"] -description = "AI security review CLI: SAST, secret scanning, SCA, threat modeling and architecture review with Claude Code, Copilot, Codex, Gemini, Cursor or an API key. SARIF output for CI." +description = "AI security review CLI: SAST, secret scanning, SCA, threat modeling and architecture review with Claude Code, Copilot, Codex, Gemini, Cursor or an API key. Reads your design docs, Confluence and Jira through MCP. SARIF output for CI." readme = "README.md" requires-python = ">=3.10" license = "MIT" @@ -17,7 +17,7 @@ keywords = [ "security", "appsec", "devsecops", "sast", "static-analysis", "secret-scanning", "sca", "threat-modeling", "security-architecture", "owasp", "stride", "sarif", "code-review", "ai-security", "llm", "llm-agent", "claude-code", "copilot", "codex", "gemini", "cursor", - "security-scanner", "ci", "compliance", + "security-scanner", "ci", "compliance", "mcp", "confluence", "context-aware", ] classifiers = [ "Development Status :: 4 - Beta",