Repository navigation
Conversation
Strix Security Review✅ No open security findings. PR summary: `Agent.copy()` rebuilt the agent from `model_dump()`, which flattened an authenticated A2A client config into a plain dict that failed validation against the abstract `ClientAuthScheme`, so copying such an agent raised. The PR excludes `a2a` from the dump and passes a `deepcopy` of the config to the constructor, with a regression test asserting the auth scheme and token survive the copy as distinct objects. Review summaryThis PR fixes No security issues were confirmed. Every candidate was traced and rejected: the copy path performs no network I/O and never persists or logs the dumped data, so the preserved credential is a per-instance deepcopy that stays inside the same object graph; the copy neither reads nor re-derives Ruled out (6)
Review 1 on this PR · Reviewed by Strix |
Related issue
Fixes #9447
Summary
Agent.copy() rebuilt the agent from model_dump(). An authenticated A2A
config became a plain dict and could not be validated against the abstract
ClientAuthScheme. Keep a2a out of the dump and pass a deep copy through,
the same way llm, tools, and knowledge are already passed.
Verification
uv run pytest lib/crewai/tests/agents/test_agent.py::test_agent_copy_keeps_a2a_auth -q --allowed-hosts=127.0.0.1
Additional context
None.