fix(security): remediate findings from security assessment#33
Open
rpolysec wants to merge 10 commits into
Open
fix(security): remediate findings from security assessment#33rpolysec wants to merge 10 commits into
rpolysec wants to merge 10 commits into
Conversation
Script scorer no longer interpolates LLM output into command strings. Predicted/expected values are passed via environment variables instead of .replace() + shlex.split(), preventing argument injection from adversarial LLM responses. Replace pickle serialization with JSON in eval cache. Pickle deserialization executes arbitrary code; a crafted .pkl file from a compromised sandbox achieves RCE on the host. JSON serialization eliminates this attack vector.
…ools and validate skill names Remove dangerous tools (Bash, BashOutput, WebFetch, WebSearch) from the skill generator agent to prevent cross-agent prompt injection. Add field_validator on target_skill to enforce safe naming pattern and block path traversal via LLM-controlled skill names.
…ends Add shlex.quote() to all interpolated values in daytona.py shell commands, including git tag-derived branch names, container paths, and CLI args. Replace manual YAML string construction in launcher.py with yaml.safe_dump() to prevent injection via paths with special characters.
Add non-root 'evoskill' user to prevent container-as-root. Replace pipe-to-bash Node.js install with GPG-verified apt repo setup and pin Goose to a specific version via build arg instead of fetching /releases/latest at build time.
…safe YAML Add upper-bound version pins to all runtime dependencies. Warn when Daytona API key is loaded from config file instead of env var. Replace system-wide pkill with tracked-PID-only killing. Use yaml.safe_dump() instead of yaml.dump().
…mple
Add Security Considerations section covering the trust model, safe
configuration patterns, and vulnerability reporting. Replace the
vulnerable {predicted} interpolation example with the env-var-based
pattern that matches the actual implementation.
Update script scorer test to use env-var pattern. Remove Skill tool from skill_generator required_tools assertions to match restricted tool access.
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.
Summary
Remediate findings from an internal security assessment. The core issue is that LLM output was treated as trusted input across multiple code paths — command strings, file paths, pickle deserialization, and YAML construction.
Breaking changes
Script scorer interface: The
commandfield no longer supports{predicted}and{expected}placeholders. Predictions and expected values are now passed asPREDICTEDandEXPECTEDenvironment variables. Existing scorer scripts need to read fromos.environinstead of command-line arguments.Before:
After:
# score.py reads os.environ["PREDICTED"] and os.environ["EXPECTED"]Eval result cache format: Results are now serialized as JSON instead of pickle. Existing
.pklresult files from prior runs will not load. Re-run evaluations to regenerate results. The default output extension changed from.pklto.json.Test plan
linux/amd64cross-compile build for Daytona production target