Skip to content

fix(security): marketplace token scoping, WebUI/setup hardening, atom…#1

Merged
gioooton merged 1 commit into
mainfrom
fix/security-race-marketplace-webui-pin
Mar 25, 2026
Merged

fix(security): marketplace token scoping, WebUI/setup hardening, atom…#1
gioooton merged 1 commit into
mainfrom
fix/security-race-marketplace-webui-pin

Conversation

@Vudi

@Vudi Vudi commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

…ic PIN lockout

  • Market.app: remove global API token; pass token via ToolContext and createMarketAppAdapter(token) to prevent cross-user leakage under concurrency.
  • WebUI: drop ?token= auth for /api/*; avoid logging full exchange URL with secret.
  • Setup: require x-teleclaw-launch-nonce for /api/setup/launch; web fetches nonce first.
  • Wallet PIN: atomic failed_attempts increment + lockout via single UPDATE RETURNING.
  • Remove unsafe unused MemoryDatabase.asyncTransaction (await breaks transaction).
  • pretest: build SDK so @teleclaw-agent/sdk resolves for npm test.
  • Tests: marketapp token scope, security PIN flow.

Made-with: Cursor

Description

Brief description of the changes and their motivation.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Checklist

  • I have read the Contributing Guide
  • My PR targets the dev branch (not main)
  • npm run typecheck passes
  • npm run lint passes
  • npm test passes
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)

Related Issues

Closes #(issue number)

…ic PIN lockout

- Market.app: remove global API token; pass token via ToolContext and
  createMarketAppAdapter(token) to prevent cross-user leakage under concurrency.
- WebUI: drop ?token= auth for /api/*; avoid logging full exchange URL with secret.
- Setup: require x-teleclaw-launch-nonce for /api/setup/launch; web fetches nonce first.
- Wallet PIN: atomic failed_attempts increment + lockout via single UPDATE RETURNING.
- Remove unsafe unused MemoryDatabase.asyncTransaction (await breaks transaction).
- pretest: build SDK so @teleclaw-agent/sdk resolves for npm test.
- Tests: marketapp token scope, security PIN flow.

Made-with: Cursor

@gioooton gioooton left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid security work. Token scoping fixes a real concurrency bug, atomic PIN lockout eliminates the race condition, WebUI hardening removes token-in-URL leaks, and the setup nonce is a nice touch. Tests included. Clean and well-scoped. ✅

@gioooton gioooton merged commit 4faab79 into main Mar 25, 2026
0 of 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.

2 participants