Skip to content

fix: critical security hardening — trust self-manipulation, webhook auth, HKDF salt#13

Open
kai-agent-free wants to merge 1 commit intomainfrom
fix/critical-security-issues
Open

fix: critical security hardening — trust self-manipulation, webhook auth, HKDF salt#13
kai-agent-free wants to merge 1 commit intomainfrom
fix/critical-security-issues

Conversation

@kai-agent-free
Copy link
Owner

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.

…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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant