[Self-Improve] signalpilot/improvements-round-2026-04-03-2cd68d#67
Open
[Self-Improve] signalpilot/improvements-round-2026-04-03-2cd68d#67
Conversation
- Add API key authentication (SP_API_KEY) to all monitor and agent API endpoints. Auth is opt-in: when SP_API_KEY is unset, all routes pass through for backwards compatibility. Uses timing-safe hmac.compare_digest. - Forward API key header in all monitor-to-agent proxy calls so internal communication works when auth is enabled. - Remove hardcoded PostgreSQL credentials from migrate-pg-to-sqlite.py, read from PG_DSN env var instead. - Strip sensitive env vars (CLAUDE_CODE_OAUTH_TOKEN, GIT_TOKEN, GH_TOKEN, FGAT_GIT_TOKEN) from process environment before agent interaction starts, preventing exfiltration via bash commands. - Harden permissions.py: add bash path confinement check for file-accessing commands, expand token exposure detection (generic env dumping via interpreters, /proc access, encoding tools, exfiltration via curl/wget), widen dangerous command patterns (rm -rf /*, chmod 777 on sensitive dirs). - Replace direct Docker socket mount with tecnativa/docker-socket-proxy, restricting API access to containers and volumes only. Remove dangerous chmod 666 /var/run/docker.sock from entrypoint. - Sanitize all error messages in monitor API — return generic messages to clients, log details server-side via logger.error(). - Restrict CORS to specific methods (GET/POST/PUT/DELETE) and headers (Content-Type, X-API-Key) instead of wildcards. - Add Pydantic Field max_length constraints on all request body string fields to prevent memory exhaustion from oversized payloads. - Remove dangerous chmod -R a+rw /data fallback from agent entrypoint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Self-Improvement Run
Branch:
signalpilot/improvements-round-2026-04-03-2cd68dRun ID:
d46f42b6-96b3-4d0f-b171-ca519d4af191This PR was created by the self-improvement agent.
Review all changes carefully before merging to
main.Generated by Self-Improve Framework