setup-gbrain
“Set up gbrain for this coding agent: install the CLI, initialize a local PGLite or Supabase brain, register MCP, capture per-remote trust policy. (gstack)”
aipkg.jsonLICENSE.txtmemory.mdREADME.mdSKILL.mdSKILL.md.tmpl- 01SDI-285%MEDIUM
SKILL.md.tmpl:222
detailhide
The skill collects sensitive credentials (Supabase PAT, database URLs, bearer tokens) via interactive prompts without comprehensive user warnings about the security implications. While the skill mentions token storage, the collection flow doesn't prominently warn that PATs grant full account access or that database URLs contain authentication credentials that persist in config files.
220### Path 1 (Supabase, existing URL)221222Source the secret-read helper, collect URL with `read -s` + redacted preview:223224```bashfix Add a mandatory security disclosure step BEFORE credential collection that explicitly states: (1) what credentials are being requested, (2) the scope and permissions they grant, (3) where they will be stored, (4) how to revoke them. Require explicit user acknowledgment (not just reading) before proceeding.
- 02SDI-275%MEDIUM
SKILL.md.tmpl:204
detailhide
The skill modifies PATH and shell environment variables during installation without documenting all side effects to the user. The 'gstack-gbrain-install' call has a D19 PATH-shadow validation step, but the initial installation can silently modify user's environment in ways that persist across sessions.
202For Paths 1, 2a, 2b, 3, switch — only if `gbrain_on_path=false`:203204```bash205~/.claude/skills/gstack/bin/gstack-gbrain-install206```fix Document all environment modifications explicitly. Before running gstack-gbrain-install, show the user exactly what will be added to PATH and ask for confirmation. Log all modifications to ~/.gstack/setup-gbrain-changes.log for user review.
- 03SDI-380%MEDIUM
SKILL.md.tmpl:1007
detailhide
The skill accesses and modifies ~/.gstack/ directory structure, creating lock files and configuration files across the home directory. While this is somewhat expected for a setup skill, the scope extends beyond typical configuration to include git worktrees, artifact repositories, and persistent state management across multiple sessions.
1005- **STOP points are hard.** Gbrain doctor not healthy, D19 PATH shadow, D91006 migrate timeout, smoke test failure — each is a STOP. Do not paper over.1007- **Concurrent-run lock.** At skill start, `mkdir ~/.gstack/.setup-gbrain.lock.d`1008 (atomic). If the mkdir fails, abort with: "Another `/setup-gbrain` instance1009 is running. Wait for it, or `rm -rf ~/.gstack/.setup-gbrain.lock.d` iffix Clearly document the directory structure that will be created. Require explicit user consent before creating lock directories. Provide a cleanup command to remove all skill-created artifacts.
- 04SDI-282%MEDIUM
SKILL.md.tmpl:277
detailhide
The skill makes multiple HTTP calls to Supabase API (https://api.supabase.com) to create, poll, and delete projects without explicit capability declaration in the skill metadata. These external API calls could fail, timeout, or be intercepted. The skill doesn't validate API responses thoroughly before proceeding.
275276```bash277orgs=$(~/.claude/skills/gstack/bin/gstack-gbrain-supabase-provision list-orgs --json)278```279fix Add explicit 'allowed-capabilities' section to skill metadata declaring Supabase API access. Implement robust error handling and response validation for all API calls. Add rate limiting and timeout handling. Log all API calls for audit purposes.
- 05SQP-278%MEDIUM
SKILL.md.tmpl:1126
detailhide
The CLAUDE.md file is written without explicit user confirmation, though the context suggests this is expected behavior for a setup skill. However, the skill modifies tracked git files without prompting, which could disrupt user's uncommitted state or branch. CLAUDE.md in many projects is checked into version control.
fix Before modifying CLAUDE.md, check if the file is uncommitted and warn the user. Offer options: (1) proceed and modify, (2) create a separate .gbrain-setup.md file instead, (3) skip documentation. Always show the diff before applying changes.
- 06SQP-288%MEDIUM
SKILL.md.tmpl:250
detailhide
The skill's PAT collection flow presents a disclosure statement but then immediately collects the token without requiring explicit user acknowledgment of the security implications. The disclosure states 'Supabase doesn't currently support scoped tokens' but then uses full-account-access tokens anyway. This is a critical trust boundary violation.
248### Path 2a (Supabase, auto-provision — D7)249250Show the D11 PAT scope disclosure verbatim BEFORE collecting the token:251252> *This Supabase Personal Access Token grants full read/write/delete accessfix Require explicit user confirmation (e.g., 'I understand this PAT has full account access and will be revoked after setup') before collecting the token. Implement mandatory PAT revocation workflow that prompts user with the revocation URL at skill completion. Provide an alternative path that doesn't require PAT if possible.