diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c2bbec..f43eb29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,10 @@ jobs: python -m pip install --upgrade "pip>=26.1" python -m pip install -e ".[dev]" python -m pip install pip-audit + python -m pip install bandit[toml] - name: Run pip-audit run: python -m pip_audit --progress-spinner off + + - name: Run Bandit + run: python -m bandit -r forge_cli -q --severity-level medium diff --git a/forge_cli/mcp_sse.py b/forge_cli/mcp_sse.py index 24e6de5..19ebb19 100644 --- a/forge_cli/mcp_sse.py +++ b/forge_cli/mcp_sse.py @@ -22,7 +22,8 @@ def main() -> None: serve_mcp_http( options_from_env( - default_host="0.0.0.0", + # Legacy private-network wrapper; see module docstring. + default_host="0.0.0.0", # nosec B104 default_port=8765, allow_remote=True, disable_dns_rebinding_protection=True, diff --git a/tests/test_ci_workflow.py b/tests/test_ci_workflow.py index d739b14..c140a0b 100644 --- a/tests/test_ci_workflow.py +++ b/tests/test_ci_workflow.py @@ -18,6 +18,8 @@ def test_ci_workflow_has_dependency_security_gate() -> None: assert 'python -m pip install --upgrade "pip>=26.1"' in workflow assert "python -m pip install pip-audit" in workflow assert "python -m pip_audit --progress-spinner off" in workflow + assert "python -m pip install bandit[toml]" in workflow + assert "python -m bandit -r forge_cli -q --severity-level medium" in workflow def test_github_actions_are_pinned_to_commit_shas() -> None: