Skip to content

AI support copilot Phase 2: gated artisan changes over SSH#3581

Merged
bernardhanna merged 2 commits into
masterfrom
dev
Jun 23, 2026
Merged

AI support copilot Phase 2: gated artisan changes over SSH#3581
bernardhanna merged 2 commits into
masterfrom
dev

Conversation

@bernardhanna

Copy link
Copy Markdown
Collaborator

No description provided.

bernardhanna and others added 2 commits June 23, 2026 10:32
Lets the support copilot run server maintenance commands through the same
dry-run -> APPROVE -> execute -> report pipeline as other write actions.
Disabled by default (SUPPORT_AI_ARTISAN_ENABLED=false).

- ArtisanActionRegistry: allowlist of permitted commands with per-argument
  type validation (email/token/name). Seeded with support:user-audit,
  support:event-audit, support:user-restore, support:user-update-profile.
- ArtisanCommandRunner: builds/validates a plan, dry-runs (write commands get
  --dry-run; read-only run as-is; raw is never auto-simulated), and executes via
  the Process array form so values can't be shell-interpreted. Re-validates at
  execution time rather than trusting the stored approval payload.
- Guarded raw fallback (SUPPORT_AI_ARTISAN_ALLOW_RAW): AI-proposed artisan
  commands are rejected on shell metacharacters and a destructive deny-list
  (migrate:fresh, db:wipe, tinker, down, ...), treated as writes, APPROVE-gated.
- Triage gains the artisan_command case type (only offered when enabled) plus
  artisan_command_name/artisan_args/artisan_raw_command fields.
- Wired into diagnostics (dry-run preview), the approval email (exact command +
  preview), execute job, and completion email (command + output). setup-check
  now reports artisan status; allowed_write_actions includes artisan_command.
- Tests for registry validation and the raw-command guard; docs updated.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add AI support copilot Phase 2: gated artisan changes over SSH
@bernardhanna bernardhanna merged commit d033023 into master Jun 23, 2026
1 check failed
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