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
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ jobs:
run: secfoo vendor mermaid

- name: Lint (ruff)
# Non-blocking for now: 102 pre-existing findings (mostly Optional[X]
# vs X | None style, plus a few unused test fixtures) predate this
# workflow. Reporting them here for visibility without turning every
# unrelated PR red; flip to a hard failure once that backlog is
# cleared (tracked separately from this CI/CD setup).
run: ruff check . || true
run: ruff check .

- name: Security scan (bandit)
run: bandit -r src/secfoo -c .bandit -ll

- name: Dependency audit (pip-audit)
# Run on Python 3.12 where patched transitive wheels (pillow/filelock/setuptools)
# are published; Python 3.10 cannot resolve >=3.11-only security releases.
# Add accepted advisories as `--ignore-vuln CVE-... # YYYY-MM-DD: reason`
if: matrix.python-version == '3.12'
run: pip-audit

- name: Test (secfoo core)
run: pytest tests
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ Requires Python 3.10+.

## Running the tests

Run the full pre-PR checklist before opening a pull request:

```sh
pytest tests
ruff check .
bandit -r src/secfoo -c .bandit -ll
pip-audit
```

CI runs both on every push and PR, on Python 3.10 and 3.12.
CI runs all four blocking on every push and PR, on Python 3.10 and 3.12.

The text parsers (report severities, skill frontmatter, severity filters)
also have property-based tests in `tests/test_property_parsers.py`
Expand Down
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ 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"]
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.
Expand Down Expand Up @@ -109,3 +109,19 @@ packages = ["src/secfoo"]

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.ruff.lint.flake8-bugbear]
# FastAPI and Typer use function calls (Option/Argument/Form/File/Depends) in
# parameter defaults as their standard dependency-injection syntax.
extend-immutable-calls = [
"fastapi.Depends",
"fastapi.File",
"fastapi.Form",
"fastapi.Query",
"typer.Argument",
"typer.Option",
]

[tool.ruff.lint.per-file-ignores]
# typing.Self is Python 3.11+ only and typing_extensions is not a runtime dep.
"src/secfoo/storage/repository.py" = ["PYI034"]
Empty file modified scripts/sync_design_system.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/secfoo/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from secfoo.agents.base import AgentAdapter, AgentResult
from secfoo.agents.registry import ADAPTERS, get_adapter

__all__ = ["AgentAdapter", "AgentResult", "ADAPTERS", "get_adapter"]
__all__ = ["ADAPTERS", "AgentAdapter", "AgentResult", "get_adapter"]
2 changes: 1 addition & 1 deletion src/secfoo/agents/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from secfoo.agents.api import ApiAdapter
from secfoo.agents.base import AgentAdapter
from secfoo.agents.claude import ClaudeAdapter
from secfoo.agents.copilot import CopilotAdapter
from secfoo.agents.codex import CodexAdapter
from secfoo.agents.copilot import CopilotAdapter
from secfoo.agents.cursor import CursorAdapter
from secfoo.agents.devin import DevinAdapter
from secfoo.agents.droid import DroidAdapter
Expand Down
Loading
Loading