Skip to content

Require Socket API token before running attach-guard#7

Merged
hammadtq merged 1 commit intomainfrom
fix/require-socket-token
Apr 2, 2026
Merged

Require Socket API token before running attach-guard#7
hammadtq merged 1 commit intomainfrom
fix/require-socket-token

Conversation

@hammadtq
Copy link
Copy Markdown
Collaborator

@hammadtq hammadtq commented Apr 2, 2026

Summary

  • Adds a pre-flight check in bootstrap.sh that fails with a clear error if no Socket API token is configured
  • Without a token, every risk lookup silently returns "provider unavailable" — this makes the failure obvious and actionable

Error message shown

attach-guard: error: Socket API token not configured. Run: claude plugin config set attach-guard@attach-dev socket_api_token <your-token>  (get a free token at https://socket.dev)

Test plan

  • bash -n plugin/hooks/bootstrap.sh — syntax check passes
  • Unset SOCKET_API_TOKEN, run bootstrap — should fail with the message above
  • Set token, run bootstrap — should proceed normally

🤖 Generated with Claude Code

Without a token, every risk lookup returns "provider unavailable" which
is confusing. Fail early with a clear message telling the user how to
configure it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hammadtq hammadtq merged commit 8930f30 into main Apr 2, 2026
2 checks passed
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