fix: security hardening — webhook auth, bounded limits, talent role types#1658
Merged
Conversation
…ypes - Return 401 (not 500) when WORKOS_WEBHOOK_SECRET is unset (#1633) - Add WORKOS_WEBHOOK_SECRET to env-validation startup warnings - Bound all admin endpoint limit/offset params with clampLimit/clampOffset (#1634) - Type-constrain training agent talent roles to enum values (#1635) Closes #1633, #1634, #1635 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Raise clampOffset max to 1M (avoid silent truncation on large tables) - Use `as const` array for TalentRole (enables runtime validation) - Add changeset description Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
WORKOS_WEBHOOK_SECRETwas unset. Now returns 401. Added env-validation startup warning.limitandoffsetquery params, enabling resource exhaustion. AddedclampLimit/clampOffsethelpers applied to all endpoints.stringinstead of constrained to thetalent-role.jsonenum. AddedTalentRoleunion type.validateOutputis already called for clarifying questions and flagged content is dropped. No code change needed.Test plan
npm run typecheck)npm test)Closes #1633, #1634, #1635
🤖 Generated with Claude Code