Add SecurityAgent for OWASP Top 10 code review #17
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/17/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a dedicated security reviewer that runs alongside the existing agents, looking at the same files through an OWASP Top 10 (2021) lens.
Changes
src/wuming/agents/security.py— newSecurityAgentcovering all 10 OWASP categories (A01–A10) across code, config, and shell file typessrc/wuming/router.py— registeredSecurityAgentinAGENT_REGISTRYrun-wuming.fish— addedsecurityto the default agents list (code,docs,security)test_agents.py, 1 new test intest_router.py; all 202 tests passREADME.md,CLAUDE.md,ROADMAP.mdupdated for Phase 6 completionCloses #16
src/wuming/agents/security.pyline 38 — @marvin8🔴 Not actioning. The format instructions in the system prompt are intentional — they tell the LLM how to read the annotated diff and what JSON schema to produce. This is the same pattern used in
CodeAgent,ShellAgent, and every other agent in the codebase. The parsing logic inBaseAgent.review()consumes the output; the LLM needs to know the schema before it writes the response, so the prompt is the correct place for these instructions.src/wuming/agents/security.pyline 88 — @marvin8🔴 Not actioning.
SecurityAgentdoes not define its own__init__, so Python MRO delegates directly toBaseAgent.__init__when you callSecurityAgent(model=...). An explicitsuper().__init__()is only needed when the subclass overrides__init__. This is identical toCodeAgent,DocsAgent,ShellAgent, andConfigAgent— none of them define__init__either, and all pass their test suite.tests/test_agents.pyline 370 — @marvin8✅ Fixed in commit
2c2b079—SecurityAgentimport moved to the top oftest_agents.pyalongside the other agent imports;# noqa: E402comment removed.tests/test_agents.pyline 398 — @marvin8✅ Fixed in commit
2c2b079— addedcall_count: int = 0to_FakeBackend(incremented on eachcomplete()call) and addedexpect(backend.call_count).to_equal(0)totest_security_agent_review_no_match.CLAUDE.mdline 47 — @marvin8🔴 Not actioning. The note is accurate:
wuming.configrefers to the real module atsrc/wuming/config.py(importable aswuming.config). The comment explains why the agents config file isconfig_agent.pyrather thanconfig.py— if it were namedconfig.pyit would live atwuming.agents.config, which does not shadowwuming.config, but historically caused import confusion. The quoted text is correct as written.