fix: critical security hardening — trust self-manipulation, webhook auth, HKDF salt#13
Open
kai-agent-free wants to merge 1 commit intomainfrom
Open
fix: critical security hardening — trust self-manipulation, webhook auth, HKDF salt#13kai-agent-free wants to merge 1 commit intomainfrom
kai-agent-free wants to merge 1 commit intomainfrom
Conversation
…uth, HKDF salt Security fixes: 1. Trust score self-manipulation (#11): PATCH /passports/:id/trust/verify-owner and /payment-method now require admin role. Owners can no longer set trust flags on their own passports. Added 'role' column to owners table with migration for existing databases. 2. Unauthenticated webhook polling (#12): GET /webhook/email-notifications/:address and GET /webhook/sms-notifications/:phone now require Bearer token auth and scope access to the owner's own email/phone only. 3. HKDF static salt: deriveVaultKey() now supports per-vault random salt. New vaults automatically generate and store a 256-bit random salt. Existing vaults maintain backward compatibility with the legacy static salt. Also fixes pre-existing build errors (unused variables in trust.ts and captcha-service.ts).
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.
Closes #11, closes #12.
1. Trust score self-manipulation (#11)
verify-owner and payment-method now require admin role.
2. Unauthenticated webhook polling (#12)
email/sms notification polling now requires Bearer auth, scoped to owner.
3. HKDF static salt
Per-vault random salt with backward compat.
All 596 tests pass. Build clean.