Repository navigation
feat(mcp): add secfoo mcp serve stdio server, single-source plugin builder, and server.json - #229
SriRamkunamsetty wants to merge 1 commit into
Conversation
vsn411
left a comment
There was a problem hiding this comment.
Thanks, this is a strong foundation for #224. The workspace-root check, view keys never uploading, keys never appearing in tool output, and the --check drift test for generated skills are exactly what we wanted.
Before we merge (#230 and #231 are stacked on this, so they'll pick up the fixes):
- Failing test on all 4 platforms.
test_mcp_serve_cli_help_and_root_forwardinglooks for--rootin Rich-formatted help, and the color codes split the string. Invoke withenv={"NO_COLOR": "1", "TERM": "dumb"}(or strip ANSI) before asserting. - Version pins.
server.json(and the plugin/mcpb manifests in #230/#231) pin0.3.2, which is the latest on PyPI and has nomcp serve, so the MCP Registry entry would install a version that can't start. Use the release that will ship this (0.3.3), and add a test that the manifest versions equalsecfoo.__about__.__version__without the.devNsuffix, so they can't drift again. run_skillblocks the server, and the host agent can spend money with it.execute_runsis synchronous inside anasync def, so the stdio server stops answering (pings included) for the length of a run. Please:- run it with
anyio.to_thread.run_sync(or make the tool sync so FastMCP offloads it); - pass a
timeout; - add a
max_cost_usdargument with a conservative default, enforced the same way as the CLI's--max-cost. The host agent, which reads untrusted repo text, chooses when to call this tool.
- run it with
SECFOO_CLOUD_API_KEYonly works forsubmit_report. Runs started byrun_skillsync throughrunner._try_cloud_sync→cloud.load_cloud_config(), which reads onlycloud.toml. Either teachcloud.load_cloud_config()the env var (one place, so the CLI, runner and MCP server agree), or drop the env var and documentsecfoo cloud loginonly. Then_read_raw_cloud_credentialscan go, along with the use of the privatecloud._portal_origin.
Small: submit_report doesn't store overall_rating for Responsible AI reports (the runner does). Copy rai_report.overall_rating into complete_run.
8cab13a to
a4ca93a
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Rebased onto latest
Verified locally: 116 passed, 5 skipped (Windows POSIX-mode skips), |
Part of #224
Summary
un_skill, list_findings, get_run, export_findings, cloud_status) and one MCP prompt per built-in skill from load_all_skills().
Verification
uff check . & �andit -c .bandit -ll -r src/secfoo -q -> passed.