Security: Rate limiting, prototype pollution, registration hardening#10
Open
kai-agent-free wants to merge 5 commits intomainfrom
Open
Security: Rate limiting, prototype pollution, registration hardening#10kai-agent-free wants to merge 5 commits intomainfrom
kai-agent-free wants to merge 5 commits intomainfrom
Conversation
- ReputationProvider interface for pluggable DID reputation sources - CoinPayReputationProvider stub (7-dimension trust vector) - ReputationAggregator that converts to ExternalAttestation format - 3 passing tests - Spec at specs/coinpay-did-reputation.md
- Add /reputation/* API routes (get reputation, trust vector, badge proxy, submit receipt, claim DID, register platform issuer) - Update CoinPayReputationProvider in core to use real SDK API paths (Authorization: Bearer, /reputation/agent/:did/reputation, etc.) - Install @profullstack/coinpay@0.6.10 in api-server - Fix pre-existing TS build errors (trust.ts unused var, captcha-service, aggregator import path) Routes require COINPAY_API_KEY env var. Public endpoints: GET /reputation/:did GET /reputation/:did/trust GET /reputation/:did/badge Auth-protected: POST /reputation/receipt GET /reputation/did/me POST /reputation/did/claim POST /reputation/issuer
- Added CoinPayDID section with live trust score from CoinPay API - Shows DID, trust tier, score, and trust vector dimensions - Added 'Trust Score' nav link in header - Section placed between Architecture and MCP Tools sections
- Strip version and uptime from /health endpoint (info leak) - Remove hardcoded IP 38.49.210.10 from landing page demo - Update health endpoint tests to verify no data leakage Note: vault.ts exec() is better-sqlite3 Database.exec() (SQL DDL), not child_process.exec() — no RCE risk (false positive).
…tion hardening - Add strict rate limit (5 req/min) on /auth/register and /auth/login - Add sanitizeBody middleware to strip __proto__, constructor, prototype keys - Increase password minimum length from 8 to 12, require number + special char - Replace 'Email already registered' with generic 'Registration failed' to prevent enumeration - JWT secret startup check already present (warn in dev, throw in prod)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security Hardening
Changes
All 733 tests pass. Build passes.