diff --git a/CITATION.cff b/CITATION.cff index 9d25d75..e7f5d86 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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" diff --git a/npm/secfoo/README.md b/npm/secfoo/README.md index f45cce0..e9fb1c4 100644 --- a/npm/secfoo/README.md +++ b/npm/secfoo/README.md @@ -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 diff --git a/npm/secfoo/package.json b/npm/secfoo/package.json index 38cd160..c5f4299 100644 --- a/npm/secfoo/package.json +++ b/npm/secfoo/package.json @@ -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" }, diff --git a/src/secfoo/cli.py b/src/secfoo/cli.py index 5219955..7436601 100644 --- a/src/secfoo/cli.py +++ b/src/secfoo/cli.py @@ -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.") @@ -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() diff --git a/tests/test_docs_consistency.py b/tests/test_docs_consistency.py index 4a7247f..d781440 100644 --- a/tests/test_docs_consistency.py +++ b/tests/test_docs_consistency.py @@ -2,6 +2,8 @@ from __future__ import annotations +import inspect +import json import re from pathlib import Path @@ -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 @@ -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