Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
"name": "secfoo",
"owner": {
"name": "secfoo-com",
"url": "https://github.com/secfoo-com/secfoo"
},
"metadata": {
"description": "Secfoo security scanning, threat modeling, and local/cloud finding management for Claude Code.",
"version": "0.3.3"
},
"plugins": [
{
"name": "secfoo",
"source": "./plugins/secfoo",
"description": "Local-first AI security engineering skills and stdio MCP server with optional app.secfoo.com sync.",
"version": "0.3.3",
"category": "security",
"homepage": "https://github.com/secfoo-com/secfoo",
"repository": "https://github.com/secfoo-com/secfoo",
"license": "MIT",
"keywords": [
"security",
"sast",
"threat-modeling",
"secrets",
"sca",
"mcp"
]
}
]
}
16 changes: 16 additions & 0 deletions .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "secfoo-marketplace",
"owner": {
"name": "secfoo-com"
},
"metadata": {
"description": "Secfoo AI security review, threat modeling, and local/cloud finding management plugins for Cursor."
},
"plugins": [
{
"name": "secfoo",
"source": "plugins/cursor-secfoo",
"description": "Local-first AI security engineering skills and stdio MCP server for Cursor (optional app.secfoo.com sync via env or secfoo cloud login)."
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,5 @@ jobs:
# from Actions runners with 503, while a broken link is a 404.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --no-progress --max-retries 2 --accept 200,201,204,429,502,503 --exclude '^https?://(localhost|127\.0\.0\.1)' --exclude 'ghcr\.io' --exclude 'npmjs\.com' --exclude 'raw\.githubusercontent\.com/.*/leaderboard' README.md 'docs/**/*.md'
args: --no-progress --max-retries 2 --accept 200,201,204,429,502,503 --exclude '^https?://(localhost|127\.0\.0\.1)' --exclude '^cursor://' --exclude 'ghcr\.io' --exclude 'npmjs\.com' --exclude 'raw\.githubusercontent\.com/.*/leaderboard' README.md 'docs/**/*.md'
fail: true
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,24 @@ Universal install scripts, standalone binaries, CI flags, spend tracking,
and configuration live in [docs/REFERENCE.md](https://github.com/secfoo-com/secfoo/blob/main/docs/REFERENCE.md#install).
Developing this repo: `pip install -e ".[dev]"`.

### Claude Code, Claude Desktop & claude.ai

- **Prerequisite (`uv`):** Plugin MCP configs run `uvx secfoo mcp serve` (requires [uv](https://docs.astral.sh/uv/getting-started/installation/), e.g. `curl -LsSf https://astral.sh/uv/install.sh | sh`, or use `pipx run secfoo mcp serve` as a fallback).
- **Claude Code marketplace:**
```
/plugin marketplace add secfoo-com/secfoo
/plugin install secfoo@secfoo
```
Ships all 9 built-in skills (`sast`, `sca-reachability`, `secret-scanning`, `threat-modeling`, `security-architecture-review`, `deployment-readiness`, `prompt-review`, `responsible-ai-compliance`, `third-party-risk-assessment`) plus slash commands (`/secfoo:scan`, `/secfoo:threat-model`, `/secfoo:findings`, `/secfoo:connect`).
- **Claude Desktop (`.mcpb` extension):** Package `dist/secfoo-*.mcpb` via `python scripts/build_plugins.py --target claude --mcpb` (or configure stdio command `uvx secfoo mcp serve` in `claude_desktop_config.json`). Optional `SECFOO_CLOUD_API_KEY` is marked sensitive so Desktop stores it in your OS keychain rather than plaintext.
- **claude.ai:** `claude.ai` web requires a hosted remote MCP connector, which is planned (`#225`) and not available yet; local workflows use Claude Code or Claude Desktop.

### Cursor

- **Prerequisite (`uv`):** Both the deeplink and plugin run `uvx secfoo mcp serve` (requires [uv](https://docs.astral.sh/uv/getting-started/installation/), or use `pipx run secfoo mcp serve` as a fallback).
- **One-click MCP install:** [Add Secfoo to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=secfoo&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyJzZWNmb28iLCJtY3AiLCJzZXJ2ZSJdfQ==)
- **Cursor Marketplace / Plugin:** Add this repository (`plugins/cursor-secfoo` via `.cursor-plugin/marketplace.json`) or run `secfoo mcp sync --agent agent` to register `secfoo` in `~/.cursor/mcp.json`. Runs stay strictly local in `~/.secfoo` by default; run `secfoo cloud login` (never store keys in `.cursor/mcp.json`) for optional `app.secfoo.com` org sync.

## What it found on OWASP NodeGoat

One real, unedited run against [OWASP/NodeGoat](https://github.com/OWASP/NodeGoat)
Expand Down
4 changes: 2 additions & 2 deletions docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ brackets indicate optional arguments. All CLI processes run in `WORKDIR`.

| `--agent` | Setup and command | Models |
| --- | --- | --- |
| `claude` | Install via `npm install -g @anthropic-ai/claude-code` or `curl -fsSL https://claude.ai/install.sh \| bash` ([docs](https://docs.anthropic.com/en/docs/claude-code/setup)). Authenticate with `claude auth login`. For non-interactive use, set `ANTHROPIC_API_KEY`, or with a Claude subscription run `claude setup-token` once and set the token it prints as `CLAUDE_CODE_OAUTH_TOKEN` (verified `2.1.329 (Claude Code)` on 2026-11-21, macOS Darwin arm64). `claude [--model MODEL] -p --output-format json --allowedTools TOOLS --permission-mode default --setting-sources user --strict-mcp-config --no-session-persistence [--mcp-config PATH]` (prompt on stdin). `TOOLS` starts with `Read,Grep,Glob,Bash(git log:*),Bash(git diff:*)` and includes configured MCP servers when present. The tool grant is read-only, not an OS sandbox. | `secfoo models --agent claude`. Examples: `claude-sonnet-4-6`, `sonnet`. Live via `ANTHROPIC_API_KEY` (Anthropic models API), else curated. |
| `agent` (Cursor) | Install via `curl https://cursor.com/install -fsS \| bash` ([docs](https://cursor.com/docs/cli/overview)). Authenticate with `agent login` or set `CURSOR_API_KEY` for non-interactive use (login and `CURSOR_API_KEY` confirmed in `agent --help` for `2026.08.11-e8db854` on 2026-11-21, macOS arm64; install command from the official docs). `agent [--model MODEL] -p PROMPT` | `secfoo models --agent agent`. Examples: `auto`, `claude-4.5-sonnet`. Live via CLI if supported, else curated. |
| `claude` | Install via `npm install -g @anthropic-ai/claude-code` or `curl -fsSL https://claude.ai/install.sh \| bash` ([docs](https://docs.anthropic.com/en/docs/claude-code/setup)). Authenticate with `claude auth login`. For non-interactive use, set `ANTHROPIC_API_KEY`, or with a Claude subscription run `claude setup-token` once and set the token it prints as `CLAUDE_CODE_OAUTH_TOKEN` (verified `2.1.329 (Claude Code)` on 2026-11-21, macOS Darwin arm64; plugin manifests validated with `claude plugin validate` on `2.1.273 (Claude Code)` on Windows). `claude [--model MODEL] -p --output-format json --allowedTools TOOLS --permission-mode default --setting-sources user --strict-mcp-config --no-session-persistence [--mcp-config PATH]` (prompt on stdin). `TOOLS` starts with `Read,Grep,Glob,Bash(git log:*),Bash(git diff:*)` and includes configured MCP servers when present. The tool grant is read-only, not an OS sandbox. To expose Secfoo inside interactive Claude Code sessions, install from this repo's marketplace: `/plugin marketplace add secfoo-com/secfoo` then `/plugin install secfoo@secfoo` (runs `uvx secfoo mcp serve` locally by default; optional org sync via `secfoo cloud login` or `SECFOO_CLOUD_API_KEY`). | `secfoo models --agent claude`. Examples: `claude-sonnet-4-6`, `sonnet`. Live via `ANTHROPIC_API_KEY` (Anthropic models API), else curated. |
| `agent` (Cursor) | Install via `curl https://cursor.com/install -fsS \| bash` ([docs](https://cursor.com/docs/cli/overview)) or Cursor IDE (checked Cursor `3.30.14` on Windows). Authenticate with `agent login` or set `CURSOR_API_KEY` for non-interactive use (login and `CURSOR_API_KEY` confirmed in `agent --help` for `2026.08.11-e8db854` on 2026-11-21, macOS arm64; install command from the official docs). `agent [--model MODEL] -p PROMPT`. For IDE / Composer sessions, install the `secfoo` plugin from `.cursor-plugin/marketplace.json` (`plugins/cursor-secfoo/`), use the **Add Secfoo to Cursor** MCP deeplink in `README.md`, or run `secfoo mcp sync --agent agent` (all run `uvx secfoo mcp serve` locally by default; authenticate with `secfoo cloud login` rather than putting API keys in `.cursor/mcp.json`). | `secfoo models --agent agent`. Examples: `auto`, `claude-4.5-sonnet`. Live via CLI if supported, else curated. |
| `agy` (Antigravity) | Install the `agy` CLI from the Antigravity distribution ([docs](https://antigravity.google)), then run `agy install` to add it to `PATH`. The CLI has no login subcommand: sign in through Antigravity before headless runs (checked against `agy --help` for `1.5.3` on 2026-11-21, macOS arm64). `agy --print PROMPT --print-timeout Ns` (`N` is the effective timeout in seconds). Headless mode denies tool calls requiring approval. | Not supported (`--model` fails fast). |
| `gemini` | Install via `npm install -g @google/gemini-cli` ([docs](https://github.com/google-gemini/gemini-cli)). Authenticate interactively with `gemini` or set `GEMINI_API_KEY` for non-interactive use (verified `0.38.1` on 2026-11-21, macOS Darwin arm64). `gemini [--model MODEL] -p PROMPT --output-format json --skip-trust`. No `--yolo` write auto-approval is passed. | `secfoo models --agent gemini`. Examples: `gemini-2.5-pro`, `gemini-2.5-flash`. Live via `GEMINI_API_KEY`, else curated. |
| `codex` | Install via `npm install -g @openai/codex` ([docs](https://github.com/openai/codex)). Authenticate with `codex login` or set `OPENAI_API_KEY` for non-interactive use (verified `codex-cli 0.159.0` on 2026-11-21, macOS Darwin arm64; `codex-cli 0.172.0` on Windows). `codex exec [--model MODEL] --sandbox read-only [-c windows.sandbox="unelevated"] --skip-git-repo-check --ephemeral --color never --cd WORKDIR -` (prompt on stdin; `-c` is Windows-only). MCP servers are registered into `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) via `secfoo mcp sync --agent codex` (or `secfoo mcp sync`). | `secfoo models --agent codex`. Examples: `gpt-5.4`, `o4-mini`. Live via `OPENAI_API_KEY` (or CLI), else curated. |
Expand Down
41 changes: 41 additions & 0 deletions packaging/mcpb/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://raw.githubusercontent.com/anthropics/mcpb/main/schemas/mcpb-manifest-v0.4.schema.json",
"manifest_version": "0.4",
"name": "secfoo",
"display_name": "Secfoo Security Workbench",
"version": "0.3.3",
"description": "Local-first AI security scanning, threat modeling, and findings workbench via MCP.",
"author": {
"name": "secfoo-com",
"url": "https://github.com/secfoo-com/secfoo"
},
"repository": {
"type": "git",
"url": "https://github.com/secfoo-com/secfoo"
},
"license": "MIT",
"server": {
"type": "binary",
"entry_point": "uvx",
"mcp_config": {
"command": "uvx",
"args": [
"secfoo",
"mcp",
"serve"
],
"env": {
"SECFOO_CLOUD_API_KEY": "${user_config.SECFOO_CLOUD_API_KEY}"
}
}
},
"user_config": {
"SECFOO_CLOUD_API_KEY": {
"type": "string",
"title": "Secfoo Cloud API key (optional)",
"description": "Optional sfc_ingest_* key for app.secfoo.com org sync. Leave blank for strictly local mode (~/.secfoo).",
"sensitive": true,
"required": false
}
}
}
23 changes: 23 additions & 0 deletions plugins/cursor-secfoo/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "secfoo",
"displayName": "Secfoo Security Workbench",
"version": "0.3.3",
"description": "AI security engineering workflows powered by Secfoo (SAST, threat modeling, SCA reachability, secret scanning, deployment readiness, prompt review, Responsible AI, and optional cloud sync).",
"author": {
"name": "secfoo-com",
"url": "https://github.com/secfoo-com/secfoo"
},
"homepage": "https://github.com/secfoo-com/secfoo",
"repository": "https://github.com/secfoo-com/secfoo",
"license": "MIT",
"keywords": [
"security",
"sast",
"threat-modeling",
"secrets",
"sca",
"mcp"
],
"category": "Developer Tools",
"mcpServers": "./.mcp.json"
}
12 changes: 12 additions & 0 deletions plugins/cursor-secfoo/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"mcpServers": {
"secfoo": {
"command": "uvx",
"args": [
"secfoo",
"mcp",
"serve"
]
}
}
}
7 changes: 7 additions & 0 deletions plugins/cursor-secfoo/commands/connect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Secfoo Cloud Status & Sign-In

Inspect Secfoo storage and sync configuration on this machine:

1. Call `cloud_status` from the `secfoo` MCP server and report `mode` (`local` or `connected`), `uploads_enabled`, `key_kind`, and `portal_url`.
2. Never place API keys inside `.cursor/mcp.json` or repository files.
3. To enable optional `app.secfoo.com` org portal sync, instruct the user to run `secfoo cloud login` (stored `0600` in `~/.secfoo/cloud.toml`) or export `SECFOO_CLOUD_API_KEY=sfc_ingest_...` in their shell environment. Read-only `sfc_view_*` keys stay strictly local.
7 changes: 7 additions & 0 deletions plugins/cursor-secfoo/commands/findings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Secfoo Findings & Export

Inspect or export Secfoo findings stored locally (`~/.secfoo`):

- Call `list_findings` (optionally filtered by `project`, `skill`, or `status`) to summarize recorded findings.
- Call `export_findings(format="sarif"|"jsonl", ...)` if SARIF 2.1.0 or JSON Lines output is requested.
- Call `get_run(run_uuid=...)` when asked for details on a specific run UUID.
8 changes: 8 additions & 0 deletions plugins/cursor-secfoo/commands/scan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Secfoo Security Scan

Run a Secfoo security assessment on the current workspace:

1. Call `list_skills` from the `secfoo` MCP server if needed, and load the requested skill (`sast` by default, or `secret-scanning` / `sca-reachability` / `threat-modeling` / `deployment-readiness`).
2. Follow the skill's methodology and exact output contract (`### [SEVERITY] F1: ...` plus `## Findings Register`).
3. Persist the completed Markdown report via `submit_report(skill=..., target="<workspace-root>", report=...)`.
4. Report severity counts, the stored run UUID, and whether cloud sync ran (`cloud_synced`), suggesting `secfoo serve` for interactive triage.
8 changes: 8 additions & 0 deletions plugins/cursor-secfoo/commands/threat-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Secfoo Threat Model

Generate a Secfoo STRIDE / entry-point threat model for the current workspace:

1. Invoke the `threat-modeling` Secfoo skill / prompt.
2. Trace trust boundaries, assets, actors, entry points, and realistic attack paths grounded in repository code.
3. Persist the completed Markdown report via `submit_report(skill="threat-modeling", target="<workspace-root>", report=...)`.
4. Summarize the highest-priority threats and concrete mitigations.
Loading
Loading