Skip to content
Closed
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
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,36 @@ jobs:
- name: Validate example custom skills
# Same check a team's own skills repo would run (docs/SKILLS.md).
run: secfoo skills validate examples/skills

- name: Check __about__.py version is >= latest PyPI release
run: |
python - <<'PY'
import json
import urllib.error
import urllib.request
from packaging.version import Version
from secfoo import __version__

try:
with urllib.request.urlopen("https://pypi.org/pypi/secfoo/json", timeout=15) as resp:
pypi_version = json.loads(resp.read().decode("utf-8"))["info"]["version"]
except (urllib.error.URLError, TimeoutError) as exc:
print(f"Skipping PyPI version comparison (network unavailable): {exc}")
else:
print(f"Local __version__: {__version__}, PyPI latest: {pypi_version}")
assert Version(__version__) >= Version(pypi_version), (
f"src/secfoo/__about__.py ({__version__}) is behind PyPI ({pypi_version})"
)
PY

docs-links:
name: Docs link check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0

- name: Check links in README.md and docs/
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
with:
args: --verbose --no-progress --accept 200..=299,429 README.md docs/
fail: true
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,5 @@ jobs:
context: .
push: true
tags: |
ghcr.io/rakfortltd/secfoo:${{ needs.check-version.outputs.version }}
ghcr.io/rakfortltd/secfoo:latest
ghcr.io/secfoo-com/secfoo:${{ needs.check-version.outputs.version }}
ghcr.io/secfoo-com/secfoo:latest
15 changes: 15 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Placeholder / example URLs used in documentation snippets
^https://github\.com/org/
^https://github\.com/acme/
^https://raw\.githubusercontent\.com/acme/
^https://gitlab\.com/group/
^https://bitbucket\.org/workspace/
^https://yourcompany\.atlassian\.net/
^https://mcp\.example\.com/
^https://memory\.internal\.example
^https://secfoo\.internal
^https://\.\.\./
# Authenticated MCP endpoint returns 401/403 without OAuth token
^https://mcp\.atlassian\.com/v1/mcp/authv2
# Localhost / loopback examples
^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cff-version: 1.2.0
message: "If you use secfoo in your research or tooling, please cite it as below."
title: "secfoo"
abstract: "Context-based security architectural assessment orchestrator: pick skills, targets, and an agent CLI to run them."
abstract: "AI security review CLI: SAST, secret scanning, SCA, threat modeling, and architecture review with Claude Code, Copilot, Codex, Gemini, Cursor, or an API key."
authors:
- name: "RakFort"
repository-code: "https://github.com/secfoo-com/secfoo"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Published to ghcr.io/rakfortltd/secfoo by .github/workflows/release.yml.
# Published to ghcr.io/secfoo-com/secfoo by .github/workflows/release.yml.
# Installs from PyPI rather than PyInstaller-bundling -- simplest, most
# robust route for a container image, since there's no cross-platform
# concern (the image itself is the platform).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ uvx secfoo --help # run from PyPI without installing (uv)
pipx install secfoo # isolated install, Python 3.10+
pip install secfoo # PyPI
npm install -g @rakfortltd/secfoo # npm, no Python needed
docker run --rm ghcr.io/rakfortltd/secfoo --help
docker run --rm ghcr.io/secfoo-com/secfoo --help
```

No agent CLI? Use an API key:
Expand Down Expand Up @@ -241,7 +241,7 @@ steps:
- **GitHub Action** with SARIF upload, job summary and severity outputs: [docs/CI.md](https://github.com/secfoo-com/secfoo/blob/main/docs/CI.md#github-actions)
- **pre-commit**: `repo: https://github.com/secfoo-com/secfoo`, hooks `secfoo-secrets` and `secfoo` ([example](https://github.com/secfoo-com/secfoo/blob/main/examples/ci/pre-commit-config.yaml))
- **GitLab CI** job with SARIF artifact: [examples/ci/gitlab-ci.yml](https://github.com/secfoo-com/secfoo/blob/main/examples/ci/gitlab-ci.yml)
- **Docker**: `docker run --rm ghcr.io/rakfortltd/secfoo --help`
- **Docker**: `docker run --rm ghcr.io/secfoo-com/secfoo --help`
- **Anywhere else**: `secfoo run ... --json --fail-on high`, then `secfoo findings export --format sarif`. Exit codes `0` clean, `1` run failed, `2` findings gate, `3` cost gate.

## Learn more
Expand Down
4 changes: 2 additions & 2 deletions docs/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ including merge-request rules and a container-image variant:
The image on GHCR has secfoo and git, nothing else:

```bash
docker run --rm -e OPENAI_API_KEY -v "$PWD:/workspace" ghcr.io/rakfortltd/secfoo \
docker run --rm -e OPENAI_API_KEY -v "$PWD:/workspace" ghcr.io/secfoo-com/secfoo \
run --agent api --target /workspace --depth quick --json --rescan --skill sast --fail-on high
```

No agent CLI is installed in the image, so `--agent api` is the practical
choice; build `FROM ghcr.io/rakfortltd/secfoo` and `npm install -g
choice; build `FROM ghcr.io/secfoo-com/secfoo` and `npm install -g
@anthropic-ai/claude-code` (or another CLI) if you want one. The store is
`/root/.secfoo`; mount it to keep findings between jobs. See the
[Distribution](REFERENCE.md#distribution) notes.
Expand Down
20 changes: 10 additions & 10 deletions docs/REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -721,16 +721,16 @@ pipx install secfoo
npm install -g @rakfortltd/secfoo

# Universal installer script (macOS/Linux, no Python or Node needed)
curl -fsSL https://raw.githubusercontent.com/rakfortltd/secfoo/main/install.sh | sh
curl -fsSL https://raw.githubusercontent.com/secfoo-com/secfoo/main/install.sh | sh

# Windows (PowerShell), no Python or Node needed
irm https://raw.githubusercontent.com/rakfortltd/secfoo/main/install.ps1 | iex
irm https://raw.githubusercontent.com/secfoo-com/secfoo/main/install.ps1 | iex

# Docker (nothing installed on the host at all)
docker run --rm ghcr.io/rakfortltd/secfoo --help
docker run --rm ghcr.io/secfoo-com/secfoo --help

# Or grab a binary directly for your platform from the Releases page:
# https://github.com/rakfortltd/secfoo/releases
# https://github.com/secfoo-com/secfoo/releases
```

Developing on this repo instead? `pip install -e ".[dev]"`.
Expand Down Expand Up @@ -949,20 +949,20 @@ Every install channel above is built on the same foundation: standalone,
self-contained binaries (bundled Python interpreter + all dependencies —
nothing needs to be pre-installed) for macOS (arm64/x64), Linux
(x64/arm64), and Windows (x64), built by CI (`.github/workflows/release.yml`)
on every `vX.Y.Z` tag push and attached to the matching GitHub Release
along with a `SHA256SUMS` file.
via manual `workflow_dispatch` for an existing `vX.Y.Z` tag and attached to
the matching GitHub Release along with a `SHA256SUMS` file.

- **pip**: the "real"/native path — a normal Python sdist+wheel, published
to PyPI as usual.
- **npm**: `@rakfortltd/secfoo` is a tiny meta-package whose
`optionalDependencies` are 5 per-platform packages
- **npm**: `@rakfortltd/secfoo` (published under RakFort's npm scope) is a
tiny meta-package whose `optionalDependencies` are 5 per-platform packages
(`@rakfortltd/secfoo-darwin-arm64`, etc.), each containing just that
platform's binary. npm installs only the one matching your machine —
no `postinstall` network fetch, which is what makes this safe to use
behind a locked-down corporate npm/Artifactory mirror.
- **install.sh / install.ps1**: detect your OS/arch, download the matching
binary from the latest GitHub Release, verify its SHA256, install it.
- **Docker**: `ghcr.io/rakfortltd/secfoo`, built from the PyPI package on
- **Docker**: `ghcr.io/secfoo-com/secfoo`, built from the PyPI package on
a slim Python base (simplest, most robust route for a container image —
no cross-platform concern since the image itself is the platform).
**Note**: none of the agent CLIs listed in the
Expand All @@ -977,7 +977,7 @@ along with a `SHA256SUMS` file.

```bash
docker run --rm -p 8787:8787 -v ~/.secfoo:/root/.secfoo \
ghcr.io/rakfortltd/secfoo serve --host 0.0.0.0 --port 8787
ghcr.io/secfoo-com/secfoo serve --host 0.0.0.0 --port 8787
```

- **GitHub Action**: `uses: secfoo-com/secfoo@main` (composite action in
Expand Down
2 changes: 1 addition & 1 deletion docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ brackets indicate optional arguments. All CLI processes run in `WORKDIR`.
| `copilot` | The adapter identifies the npm package as `@github/copilot`; install and authentication commands are unverified. `copilot [--model MODEL] --output-format json --allow-all-tools` (prompt on stdin). Tools, including writes, are auto-approved: read-only behavior relies on review instructions, not a sandbox. |
| `droid` | Install command unverified. Set `FACTORY_API_KEY` for noninteractive use. `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. |
| `devin` | The adapter identifies the official Homebrew cask as `devin-cli`; install command unverified. Authenticate beforehand with `devin auth login`; credential reuse for headless runs is unverified. `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. |
| `api` | No agent binary is invoked. If dependencies are missing, run `pip install "secfoo[api]"`. 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`. |
| `api` | No agent binary is invoked (`litellm` and `langgraph` are installed with `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`. |

`agy` and `devin` do not support adapter model selection; secfoo warns and
ignores a requested model. Other CLI model flags are shown above.
Expand Down
2 changes: 1 addition & 1 deletion examples/ci/gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ secfoo:
# secfoo-docker:
# stage: test
# image:
# name: ghcr.io/rakfortltd/secfoo:latest
# name: ghcr.io/secfoo-com/secfoo:latest
# entrypoint: [""]
# script:
# - secfoo run --agent api --target . --depth quick --json --rescan --skill sast --fail-on high > secfoo-result.json
4 changes: 2 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Universal installer for secfoo (Windows). Usage:
# irm https://raw.githubusercontent.com/rakfortltd/secfoo/main/install.ps1 | iex
# irm https://raw.githubusercontent.com/secfoo-com/secfoo/main/install.ps1 | iex
#
# Downloads the latest secfoo-win32-x64.exe from GitHub Releases, verifies
# its checksum, and installs it to $env:LOCALAPPDATA\secfoo\secfoo.exe,
# adding that directory to the user PATH if it isn't there already.

$ErrorActionPreference = "Stop"

$Repo = "rakfortltd/secfoo"
$Repo = "secfoo-com/secfoo"
$InstallDir = Join-Path $env:LOCALAPPDATA "secfoo"
$Asset = "secfoo-win32-x64.exe"

Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/sh
# Universal installer for secfoo (macOS/Linux). Usage:
# curl -fsSL https://raw.githubusercontent.com/rakfortltd/secfoo/main/install.sh | sh
# curl -fsSL https://raw.githubusercontent.com/secfoo-com/secfoo/main/install.sh | sh
#
# Downloads the correct standalone binary from the latest GitHub Release,
# verifies its checksum, and installs it to $PREFIX/bin (default
# /usr/local/bin, falling back to ~/.local/bin if that isn't writable).
# POSIX sh only -- no bashisms -- since /bin/sh is dash on many systems.
set -e

REPO="rakfortltd/secfoo"
REPO="secfoo-com/secfoo"
PREFIX="${PREFIX:-/usr/local}"

os_name() {
Expand Down
2 changes: 1 addition & 1 deletion npm/secfoo-darwin-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/rakfortltd/secfoo.git"
"url": "git+https://github.com/secfoo-com/secfoo.git"
}
}
2 changes: 1 addition & 1 deletion npm/secfoo-darwin-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/rakfortltd/secfoo.git"
"url": "git+https://github.com/secfoo-com/secfoo.git"
}
}
2 changes: 1 addition & 1 deletion npm/secfoo-linux-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/rakfortltd/secfoo.git"
"url": "git+https://github.com/secfoo-com/secfoo.git"
}
}
2 changes: 1 addition & 1 deletion npm/secfoo-linux-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/rakfortltd/secfoo.git"
"url": "git+https://github.com/secfoo-com/secfoo.git"
}
}
2 changes: 1 addition & 1 deletion npm/secfoo-win32-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "git+https://github.com/rakfortltd/secfoo.git"
"url": "git+https://github.com/secfoo-com/secfoo.git"
}
}
2 changes: 1 addition & 1 deletion npm/secfoo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ npm install -g @rakfortltd/secfoo
secfoo run --skill security-architecture-review --agent claude
```

Full documentation: https://github.com/rakfortltd/secfoo
Full documentation: https://github.com/secfoo-com/secfoo
4 changes: 2 additions & 2 deletions npm/secfoo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"node": ">=16"
},
"license": "Apache-2.0",
"homepage": "https://github.com/rakfortltd/secfoo",
"homepage": "https://github.com/secfoo-com/secfoo",
"repository": {
"type": "git",
"url": "git+https://github.com/rakfortltd/secfoo.git"
"url": "git+https://github.com/secfoo-com/secfoo.git"
},
"keywords": [
"security",
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ dependencies = [
[project.optional-dependencies]
dev = ["jsonschema>=4.26.0", "pytest>=9.2.0", "hypothesis>=6.168.5", "httpx>=0.28.1", "ruff>=0.17.5", "bandit>=1.9.4", "pip-audit>=2.10.1", "langgraph>=1.2.21"]
build = ["pyinstaller>=6.22.3"]
# The `api` agent (secfoo/agents/api.py): a LangGraph workflow that calls OpenAI/Anthropic/Gemini
# through LiteLLM with an API key instead of driving an installed agent CLI.
# (dev includes langgraph so the real graph runs in tests; litellm is faked.)
api = ["litellm>=1.109.1", "langgraph>=1.2.21"]

[project.urls]
Homepage = "https://secfoo.com"
Expand Down
2 changes: 1 addition & 1 deletion src/secfoo/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.0"
__version__ = "0.3.1"
4 changes: 3 additions & 1 deletion src/secfoo/agents/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ def run(self, prompt: str, *, workdir: Path, timeout: int | None = None, prev_co
from langgraph.graph import END, START, StateGraph
except ImportError:
return self._result(
"failed", started, stderr='litellm/langgraph are not installed. Run: pip install "secfoo[api]"'
"failed",
started,
stderr="litellm/langgraph are not installed. Reinstall secfoo: pip install --force-reinstall secfoo",
)
try:
final = build_graph(litellm, StateGraph, START, END).invoke({
Expand Down
7 changes: 5 additions & 2 deletions src/secfoo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
from secfoo.storage.repository import RunRepository
from secfoo.targets.resolver import TargetResolutionError, resolve_target

app = typer.Typer(name="secfoo", help="Context-based security architectural assessment.")
app = typer.Typer(
name="secfoo",
help="AI security review CLI: SAST, secret scanning, SCA, threat modeling, and architecture review.",
)
mcp_app = typer.Typer(name="mcp", help="Manage MCP servers configured in ~/.secfoo/config.toml.")
config_app = typer.Typer(name="config", help="Manage ~/.secfoo/config.toml.")
assessment_app = typer.Typer(name="assessment", help="Manage assessment case files.")
Expand Down Expand Up @@ -83,7 +86,7 @@ def _root(
typer.Option("--version", "-V", is_eager=True, callback=_show_version, help="Show the installed version and exit."),
] = False,
) -> None:
"""Context-based security architectural assessment."""
"""AI security review CLI: SAST, secret scanning, SCA, threat modeling, and architecture review."""


@app.command()
Expand Down
4 changes: 3 additions & 1 deletion tests/test_agents/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ def test_run_without_litellm_installed_says_how_to_install_it(tmp_path, monkeypa
result = ApiAdapter().run("prompt", workdir=tmp_path)

assert result.status == "failed"
assert "secfoo[api]" in result.stderr
assert "pip install" in result.stderr
assert "secfoo" in result.stderr
assert "secfoo[api]" not in result.stderr


def test_incomplete_report_is_reformatted_once_without_resending_source(tmp_path, monkeypatch):
Expand Down
Loading
Loading