Skip to content

Conversation

Sankara-Jefferson
Copy link
Contributor

Summary

This PR redacts the PrivateKey field from the response of the /wallet/create API endpoint to prevent accidental key exposure.

What Was Done

  • CreateHandler: removed PrivateKey from response payload by explicitly clearing the field before return.
  • Added a test case CreateWallet_privateKeyShouldBeRedacted to assert that PrivateKey is empty in the response.
  • Verified that all tests pass locally via go test ./api -v.

Rationale

Previously, the PrivateKey was included in plaintext in API responses. While this endpoint is useful for testing, returning secrets by default is a major security risk. This patch minimizes attack surface and sets groundwork for further key safety improvements.

Follow-ups (to be tracked)

  • Encrypt private keys at rest (symmetric key or KMS)
  • Add secure export flow (wallet export)
  • Audit other wallet-related endpoints for similar redaction
  • Add key handling docs to GitBook

Status

Ready for merge after CI passes.

web3-bot and others added 30 commits June 16, 2025 19:22
There seem to have been some manual releases which leaves version file
inconsistent with what the latest release is.
This is the version for MVP milestone
New version includes retrieval optimization.
- update go-libp2p to v0.39.1
- enable HTTP(S)_PROXY and TCP_PROXY
zachfedor and others added 10 commits June 16, 2025 19:47
- Add init function to create full current schema on brand new clean
databases and run missing migrations on any databases using old
auto-migrate strategy with existing data.
- Add CLI commands to migrate up, down, or to a specified version by ID
- Add utility functions to get list of migration IDs ran on current
database, check if migration has run by ID, etc.
Fix struct tag ordering in handler/storage/types_gen.go to match
the current code generator output. This resolves CI failures where
go generate was detecting differences between committed and generated files.
Merging this now — all tests have passed.
Copy link
Collaborator

@ianconsolata ianconsolata left a comment

Choose a reason for hiding this comment

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

LGTM, though it seems like there are some merge conflicts to resolve

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.

9 participants