Remove agent script execution feature#315
Draft
mrostan wants to merge 2 commits into
Draft
Conversation
Removes the /api/v1/agent/execute_script endpoint and its RestrictedPython executor, which allowed callers to send Python scripts to be run on the agent. The feature is unused and flagged by customer security reviews. - Delete apollo/agent/scripts.py (the RestrictedPython executor) - Remove Agent.execute_script / Agent._execute_script and AgentEvaluationUtils.execute_script - Remove the /api/v1/agent/execute_script Flask route - Drop the RestrictedPython dependency (requirements.in/.txt) - Remove the script tests and sample-script fixtures Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Temporarily pins agent-base to @dev (was @v0.0.2) so apollo-agent's dev build/deploy validates against the agent-base dev branch, which now has the AgentScript model/constants removed. NOTE: must be swapped back to a proper agent-base release tag before this PR merges to main. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new?
Removes the
/api/v1/agent/execute_scriptendpoint and its RestrictedPythonexecutor, which allowed callers to send Python scripts to be run on the agent.
The feature is unused and is flagged by customer security reviews.
apollo/agent/scripts.py(the RestrictedPython executor)Agent.execute_script/Agent._execute_scriptandAgentEvaluationUtils.execute_script/api/v1/agent/execute_scriptFlask routeRestrictedPythondependency (requirements.in/requirements.txt)Related PRs
AgentScriptmodel + constantsTesting
Merge ordering
Part of a 3-repo change. apollo-agent no longer imports anything from the
removed agent-base symbols, so CI passes against the currently-pinned
agent-base. Coordinated dev rollout: agent-base + apollo-agent first, then
bump data-collector's
mcd-agentpin (which dropsrestrictedpythonfrom itslockfile).
🤖 Generated with Claude Code