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
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 '^cursor://' --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 '^vscode:' --exclude 'ghcr\.io' --exclude 'npmjs\.com' --exclude 'raw\.githubusercontent\.com/.*/leaderboard' README.md 'docs/**/*.md'
fail: true
3 changes: 3 additions & 0 deletions commands/secfoo/deployment-readiness.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/deployment-readiness.md
description = "Security and operational readiness review for production deployment."
prompt = "Run the Secfoo `deployment-readiness` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/prompt-review.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/prompt-review.md
description = "Security review of LLM prompts, tool-calling definitions, and agent behavior."
prompt = "Run the Secfoo `prompt-review` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/responsible-ai-compliance.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/responsible-ai-compliance.md
description = "Checks for responsible-AI governance, transparency, and fairness practices."
prompt = "Run the Secfoo `responsible-ai-compliance` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/sast.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/sast.md
description = "Code-level vulnerability review with taint paths, CWE mapping, and concrete fixes."
prompt = "Run the Secfoo `sast` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/sca-reachability.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/sca-reachability.md
description = "Dependency risk review focused on whether vulnerable code is actually reachable, plus a concrete upgrade plan."
prompt = "Run the Secfoo `sca-reachability` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/secret-scanning.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/secret-scanning.md
description = "Finds exposed credentials in source, config, version-control history, and linked Confluence/documentation."
prompt = "Run the Secfoo `secret-scanning` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/security-architecture-review.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/security-architecture-review.md
description = "Control-centric evaluation of whether the design is sound \u2014 trust boundaries and data flow (cross-referenced by ID), control placement and layering, least privilege, fail-safe behavior, blast radius, operational/regulatory fit, and CCM v4 domain conformance."
prompt = "Run the Secfoo `security-architecture-review` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/third-party-risk-assessment.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/third-party-risk-assessment.md
description = "Evaluates vendor-provided security documentation against the CSA CCM v4 framework."
prompt = "Run the Secfoo `third-party-risk-assessment` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
3 changes: 3 additions & 0 deletions commands/secfoo/threat-modeling.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by scripts/build_plugins.py from src/secfoo/skills/definitions/threat-modeling.md
description = "Adversary-centric enumeration \u2014 STRIDE, attack chains, optional LINDDUN privacy threats, assumptions validated, each threat dispositioned (mitigated/gap/accepted/transferred) and residual risk stated explicitly."
prompt = "Run the Secfoo `threat-modeling` security skill against the current workspace cleanly using the `secfoo` MCP server tools (`list_skills` / `submit_report`) and follow `packaging/gemini/GEMINI.md`.\n\nTarget arguments (optional): {{args}}"
16 changes: 15 additions & 1 deletion docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,28 @@ brackets indicate optional arguments. All CLI processes run in `WORKDIR`.
| `copilot` | Install via `npm install -g @github/copilot` ([docs](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli)). Authenticate by running `copilot` and using its `/login` command, or set `GH_TOKEN` / `GITHUB_TOKEN` (a fine-grained token with the Copilot Requests permission) for non-interactive use (verified against the real CLI 1.0.117 on 2026-11-29, Windows: `gh auth login` plus `GH_TOKEN` from `gh auth token` worked; see the matrix below). `copilot [--model MODEL] --output-format json --allow-all-tools --usage-output-file PATH` (prompt on stdin). Token counts come from the usage file; premium requests / AI credits are not USD, so `cost_usd` stays unknown. Tools, including writes, are auto-approved: read-only behavior relies on review instructions, not a sandbox. | `secfoo models --agent copilot`. Examples: `claude-sonnet-4.5`, `gpt-5`. Curated (live via CLI if supported). |
| `droid` | Install via `curl -fsSL https://app.factory.ai/cli \| sh` ([docs](https://docs.factory.ai/cli/getting-started/overview)). Set `FACTORY_API_KEY` for non-interactive use or run `droid` to sign in interactively (checked against official docs on 2026-11-21, not on an installed CLI). `droid exec [-m MODEL] --output-format json --cwd WORKDIR -- PROMPT`. Droid defaults to read-only; a full authenticated secfoo run was not verified in the adapter. | `secfoo models --agent droid`. Examples: `claude-sonnet-4-5-20250929`, `gpt-5`. Curated (live via CLI if supported). |
| `devin` | Install via `brew install --cask devin-cli` ([docs](https://docs.devin.ai)). Authenticate beforehand with `devin auth login`; credential reuse for headless runs is unverified (install and login checked against official docs on 2026-11-21, not on an installed CLI). `devin -p PROMPT --respect-workspace-trust false --permission-mode auto`. The combined command and an authenticated end-to-end run are unverified; `auto` is documented by the CLI as approving read-only tools. | Not supported (`--model` fails fast). |
| `opencode` | Install via `npm install -g opencode-ai` or `curl -fsSL https://opencode.ai/install \| bash`. Non-interactive `opencode run --pure --format json --dir WORKDIR [-m MODEL]` (prompt on stdin). Read-only permissions set via `OPENCODE_CONFIG_CONTENT` / `OPENCODE_PERMISSION`. MCP servers are registered into `$OPENCODE_CONFIG` (default `~/.config/opencode/opencode.json`) via `secfoo mcp sync --agent opencode` (or `secfoo mcp sync`; schema verified against `opencode v2.2.5` on 2026-12-03). | `secfoo models --agent opencode`. Examples: `anthropic/claude-sonnet-4-5`, `openai/gpt-5`. Live via `opencode models`, else curated. |
| `opencode` | Install via `npm install -g opencode-ai` or `curl -fsSL https://opencode.ai/install \| bash`. Non-interactive `opencode run --pure --format json --dir WORKDIR [-m MODEL]` (prompt on stdin). Read-only permissions set via `OPENCODE_CONFIG_CONTENT` / `OPENCODE_PERMISSION`. | `secfoo models --agent opencode`. Examples: `anthropic/claude-sonnet-4-5`, `openai/gpt-5`. Live via `opencode models`, else curated. |
| `api` | No agent binary is invoked. `litellm` and `langgraph` are installed with secfoo; if importing them fails, reinstall secfoo the way you installed it (`pipx reinstall secfoo` or `pip install --force-reinstall secfoo`). Set `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GEMINI_API_KEY`. Source files are included in the API prompt. Model selection uses the configured model, then `SECFOO_API_MODEL`, then `openai/gpt-4.1-mini`. MCP servers from `[[mcp_servers]]` (and `secfoo-memory`) are connected by secfoo itself. Only their read-only tools are offered to the model (`readOnlyHint: true`, or the server's `tools = [...]` list), with at most 20 tool calls per run (`[agents.api].tool_call_budget`, `0` turns tools off). The tool phase also stops once the input tokens sent reach 4× the first call's. Each call, the number of rounds and the total input tokens are logged to `stderr.log`. | `secfoo models --agent api`. Examples: `openai/gpt-4.1-mini`, `anthropic/claude-sonnet-4-5`. Live from LiteLLM filtered by env API keys. |

`agy` and `devin` do not support adapter model selection; passing an explicit
`--model` (or agent-scoped config) errors before the run. Other CLI model flags
are shown above; run `secfoo models` to inspect available models and whether
validation is live or curated.

## Where to get secfoo

All plugins and editor integrations run `uvx secfoo mcp serve` (local by default, SQLite under `~/.secfoo`). An optional org portal key is read from `secfoo cloud login` or `SECFOO_CLOUD_API_KEY` and is **never** written into any plugin or workspace config.

| Platform | Install / Packaging | Status / Version Checked | Notes |
|---|---|---|---|
| **Official MCP Registry** | `server.json` (`com.secfoo/secfoo`, stdio PyPI `secfoo mcp serve`) | Registry manifest ready (`0.3.3`) | Auto-discovered by MCP Registry-aware clients. |
| **Claude Code & Claude Desktop** | `/plugin marketplace add secfoo-com/secfoo` · `packaging/mcpb/manifest.json` | Verified (`2.1.273 (Claude Code)`) | `.claude-plugin/marketplace.json` + `plugins/secfoo/`. |
| **Cursor (Grok Build)** | `.cursor-plugin/marketplace.json` or **Add Secfoo to Cursor** link in `README.md` | Verified (`Cursor 3.30.14`) | `plugins/cursor-secfoo/` + `cursor://` deeplink. |
| **VS Code & GitHub Copilot (+ Open VSX)** | [Install Secfoo MCP in VS Code](vscode:mcp/install?%7B%22name%22%3A%22secfoo%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22secfoo%22%2C%22mcp%22%2C%22serve%22%5D%7D) · `packaging/vscode/` · `plugins/copilot-secfoo/` | Manifests generated & schema-checked (`0.3.3`) | Extension registers `secfoo mcp serve`; Copilot Agent Plugin ships generated `skills/`. Publishing to VS Code Marketplace / Open VSX requires publisher token. |
| **Gemini CLI** | `gemini extensions install https://github.com/secfoo-com/secfoo` | Extension manifest + `commands/secfoo/*.toml` + `skills/` generated (`0.3.3`) | Uses root `gemini-extension.json`, `commands/secfoo/`, `skills/`, and `packaging/gemini/GEMINI.md` (live CLI install not run on this workstation; verified via generator + smoke test). |
| **OpenAI Codex & Antigravity (`agy`)** | `secfoo mcp sync --agent codex` · `secfoo mcp sync --agent agy` | MCP sync + `packaging/mcp-clients/clients.json` (`0.3.3`) | Configures `uvx secfoo mcp serve` cleanly without adding repo-root `.agents/skills/` overrides. |
| **Windsurf / Devin, Cline / Roo Code, JetBrains, OpenCode, Goose, Factory Droid** | Pre-built MCP server entries in `packaging/mcp-clients/clients.json` | JSON snippets verified (`0.3.3`) | Copy-paste or point each client's MCP settings at `uvx secfoo mcp serve` (no keys stored in config). |

## Real-CLI verification matrix (issue #116)

`✓` means checked against a real installed CLI, with the transcript committed
Expand Down
12 changes: 12 additions & 0 deletions gemini-extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "secfoo",
"version": "0.3.3",
"description": "AI security review skills (SAST, secret scanning, SCA reachability, threat modeling, architecture & AI compliance) via local stdio MCP.",
"contextFileName": "packaging/gemini/GEMINI.md",
"mcpServers": {
"secfoo": {
"command": "uvx",
"args": ["secfoo", "mcp", "serve"]
}
}
}
6 changes: 6 additions & 0 deletions packaging/gemini/GEMINI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Secfoo Gemini CLI Extension

Use the `secfoo` stdio MCP server (`uvx secfoo mcp serve`) or `/secfoo:<skill>` commands (`sast`, `secret-scanning`, `sca-reachability`, `threat-modeling`, `security-architecture-review`, `responsible-ai-compliance`, `prompt-review`, `deployment-readiness`, `third-party-risk-assessment`) to inspect code read-only and call `submit_report` to persist findings in `~/.secfoo`.

- Local by default: no portal API key is needed unless you run `secfoo cloud login` or set `SECFOO_CLOUD_API_KEY`.
- Never place credentials or tokens in repository files or `gemini-extension.json`.
41 changes: 41 additions & 0 deletions packaging/mcp-clients/clients.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"schema_version": 1,
"server": {
"command": "uvx",
"args": ["secfoo", "mcp", "serve"]
},
"clients": {
"windsurf_devin": {
"config_path": "~/.codeium/windsurf/mcp_config.json",
"mcpServers": {
"secfoo": { "command": "uvx", "args": ["secfoo", "mcp", "serve"] }
}
},
"cline_roo_code": {
"mcpServers": {
"secfoo": { "command": "uvx", "args": ["secfoo", "mcp", "serve"], "disabled": false }
}
},
"jetbrains_ai_junie": {
"mcpServers": {
"secfoo": { "command": "uvx", "args": ["secfoo", "mcp", "serve"] }
}
},
"opencode": {
"config_path": "opencode.json",
"mcp": {
"secfoo": { "type": "local", "command": ["uvx", "secfoo", "mcp", "serve"], "enabled": true }
}
},
"goose": {
"extensions": {
"secfoo": { "type": "stdio", "cmd": "uvx", "args": ["secfoo", "mcp", "serve"], "enabled": true }
}
},
"factory_droid": {
"mcpServers": {
"secfoo": { "command": "uvx", "args": ["secfoo", "mcp", "serve"] }
}
}
}
}
33 changes: 33 additions & 0 deletions packaging/vscode/extension.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"use strict";

const vscode = require("vscode");
const path = require("node:path");

function activate(context) {
if (vscode.lm && typeof vscode.lm.registerMcpServerDefinitionProvider === "function") {
const provider = {
provideMcpServerDefinitions() {
const roots = (vscode.workspace.workspaceFolders || []).map((f) => f.uri.fsPath);
const args = ["secfoo", "mcp", "serve"];
for (const r of roots) {
args.push("--root", path.resolve(r));
}
if (typeof vscode.McpStdioServerDefinition === "function") {
return [new vscode.McpStdioServerDefinition("secfoo", "uvx", args)];
}
return [{ label: "secfoo", command: "uvx", args }];
},
};
context.subscriptions.push(vscode.lm.registerMcpServerDefinitionProvider("secfoo.mcp", provider));
}

context.subscriptions.push(
vscode.commands.registerCommand("secfoo.openDashboard", () => {
vscode.env.openExternal(vscode.Uri.parse("http://127.0.0.1:8787"));
})
);
}

function deactivate() {}

module.exports = { activate, deactivate };
32 changes: 32 additions & 0 deletions packaging/vscode/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "secfoo-vscode",
"displayName": "Secfoo Security & MCP",
"description": "Registers the local `secfoo mcp serve` stdio MCP server in VS Code and Open VSX editors, and opens the local findings dashboard.",
"version": "0.3.3",
"publisher": "secfoo-com",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/secfoo-com/secfoo.git"
},
"engines": {
"vscode": "^1.99.0"
},
"categories": ["Other"],
"activationEvents": ["onStartupFinished"],
"main": "./extension.js",
"contributes": {
"mcpServerDefinitionProviders": [
{
"id": "secfoo.mcp",
"label": "Secfoo Security MCP (Local Stdio)"
}
],
"commands": [
{
"command": "secfoo.openDashboard",
"title": "Secfoo: Open Local Findings Dashboard"
}
]
}
}
9 changes: 9 additions & 0 deletions plugins/copilot-secfoo/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"mcpServers": {
"secfoo": {
"type": "stdio",
"command": "uvx",
"args": ["secfoo", "mcp", "serve"]
}
}
}
9 changes: 9 additions & 0 deletions plugins/copilot-secfoo/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "secfoo",
"version": "0.3.3",
"description": "Secfoo security skills and local stdio MCP server for GitHub Copilot Agent Plugins.",
"repository": "https://github.com/secfoo-com/secfoo",
"license": "Apache-2.0",
"skills": "skills/",
"mcpServers": "mcp.json"
}
Loading
Loading