Skip to content
Merged
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 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. Reads your design docs, Confluence and Jira through MCP. SARIF output for CI."
authors:
- name: "RakFort"
repository-code: "https://github.com/secfoo-com/secfoo"
Expand Down
6 changes: 3 additions & 3 deletions npm/secfoo/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# @rakfortltd/secfoo

Context-based security architectural assessment orchestrator — a
standalone binary distributed via npm's `optionalDependencies` pattern
(no Python required).
AI security review CLI: SAST, secret scanning, SCA, threat modeling and
architecture review, as a standalone binary distributed via npm's
`optionalDependencies` pattern (no Python required).

```bash
npm install -g @rakfortltd/secfoo
Expand Down
2 changes: 1 addition & 1 deletion npm/secfoo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rakfortltd/secfoo",
"version": "0.1.1",
"description": "Context-based security architectural assessment orchestrator (threat modeling, SAST/SCA checks, and OWASP-aligned reporting via your choice of coding-agent CLI)",
"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.",
"bin": {
"secfoo": "bin/secfoo.js"
},
Expand Down
4 changes: 2 additions & 2 deletions src/secfoo/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
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 @@ -87,7 +87,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
32 changes: 29 additions & 3 deletions tests/test_docs_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

import inspect
import json
import re
from pathlib import Path

Expand Down Expand Up @@ -57,14 +59,18 @@ def test_the_on_block_parser_sees_triggers_after_a_blank_line() -> None:
assert not _has_push_trigger(_top_level_on_block(commented))


def test_no_obsolete_api_extra() -> None:
"""litellm and langgraph are base dependencies, so `secfoo[api]` must not come back."""
def _project() -> dict:
try:
import tomllib
except ModuleNotFoundError: # Python 3.10
import tomli as tomllib

project = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))["project"]
return tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))["project"]


def test_no_obsolete_api_extra() -> None:
"""litellm and langgraph are base dependencies, so `secfoo[api]` must not come back."""
project = _project()
assert "api" not in project.get("optional-dependencies", {})
base = {re.split(r"[\s<>=!~;\[]", dep, maxsplit=1)[0].lower() for dep in project["dependencies"]}
assert {"litellm", "langgraph"} <= base
Expand All @@ -75,3 +81,23 @@ def test_no_obsolete_api_extra() -> None:
files = [path for path in files if path.is_file()]
offenders = [str(path.relative_to(ROOT)) for path in files if "secfoo[api]" in path.read_text(encoding="utf-8")]
assert offenders == []


def test_product_description_is_the_same_everywhere() -> None:
"""The Typer help, CITATION.cff abstract and PyPI description tell one story."""
from secfoo.cli import app

description = _project()["description"]
abstract = re.search(r'^abstract:\s*"(.*)"\s*$', (ROOT / "CITATION.cff").read_text(encoding="utf-8"), re.MULTILINE)
assert abstract, "CITATION.cff has no abstract"
assert abstract.group(1) == description
assert app.info.help
assert description.startswith(app.info.help.rstrip("."))
# `secfoo --help` can show the root callback's docstring instead of Typer(help=...).
assert inspect.getdoc(app.registered_callback.callback) == app.info.help
# The npm package page is the third public listing.
npm = json.loads((ROOT / "npm/secfoo/package.json").read_text(encoding="utf-8"))
assert npm["description"] == description
for path in (ROOT / "src/secfoo/cli.py", ROOT / "CITATION.cff", ROOT / "npm/secfoo/package.json",
ROOT / "npm/secfoo/README.md"):
assert "Context-based security architectural assessment" not in path.read_text(encoding="utf-8"), path