Open
Conversation
fda028c to
df4ad7d
Compare
- Transport reuse causes 400 errors when reconnecting after server restart - Defer connection until first request, consistent with new session init - Create fresh transport for each reconnection attempt - Verified with manual reconnection test scenario
- Log method, session ID, and content headers for each request - Uses console.log for visibility in pm2 logs - Non-destructive to request handling (no body reading)
- Add string pattern detection for fork bomb (:(){ :|:& };:)
- Re-enable fork bomb test case
- Part of sec-1 security hardening implementation
- AgentLog: 032-security-hardening-sec1-fork-bomb-detection.md
- Mark sec-1~6 as completed - Reorganize sec-7~26 priorities based on risk assessment - Add rejected section for unnecessary items - Update roadmap with current status AgentLog: 032-security-hardening-sec1-fork-bomb-detection.md
- Update sec-2 to include sh -c argument validation - Update sec-3 to specify AST-based recursive validation - Addresses potential bypass via sh -c 'malicious'
…source limits) - Add environment variable sanitization to remove dangerous vars (LD_PRELOAD, etc.) - Implement recursive AST validation for sh -c arguments to prevent bypass attacks - Add PTY count limit per session (10 max) to prevent resource exhaustion - Add execution timeout for PTY processes with activity-based reset - Add comprehensive tests for all security features
- Add comprehensive agentlog documenting all security measures - Minor style fixes: import reordering, test cleanup
- Remove PATH from DANGEROUS_ENV_VARS as it breaks basic commands like ls - Rely on existing validateCommandAST for security instead - Maintains usability while preventing library injection attacks
4638008 to
a2d51d7
Compare
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
Umbrella PR for Phase 6.2 Security Hardening implementation.
This PR covers all security hardening tasks from issue #23, including command injection prevention, privilege escalation bypass fixes, PTY write injection filtering, shell metachar attacks protection, and environment variable pollution mitigation.
Tasks
Stacked PRs will be created under this umbrella for individual task implementations.