Skip to content

[Self-Improve] signalpilot/improvements-round-2026-04-03-2cd68d#67

Open
lfnandoo wants to merge 1 commit intomainfrom
signalpilot/improvements-round-2026-04-03-2cd68d
Open

[Self-Improve] signalpilot/improvements-round-2026-04-03-2cd68d#67
lfnandoo wants to merge 1 commit intomainfrom
signalpilot/improvements-round-2026-04-03-2cd68d

Conversation

@lfnandoo
Copy link
Copy Markdown
Contributor

@lfnandoo lfnandoo commented Apr 3, 2026

Self-Improvement Run

Branch: signalpilot/improvements-round-2026-04-03-2cd68d
Run ID: d46f42b6-96b3-4d0f-b171-ca519d4af191

This PR was created by the self-improvement agent.
Review all changes carefully before merging to main.


Generated by Self-Improve Framework

- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant