Skip to content

feat: regenerate client from openapi-v241.7.0 - #126

Merged
mogita merged 1 commit into
mainfrom
feat/regen-openapi-v241.7.0
Nov 13, 2026
Merged

mogita merged 1 commit into
mainfrom
feat/regen-openapi-v241.7.0

Conversation

@mogita

@mogita mogita commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Problem

Webhook.gunzipPayload inflated a gzip body with no size limit before the signature check, so an unsigned request of a few hundred KB could expand to hundreds of MB and exhaust memory on a webhook endpoint.

Solution

Regenerated from chat tag v241.7.0 (protocol openapi-v241.7.0) with generate.sh. Decompression now stops at 10 MiB and throws InvalidWebhookError ("payload exceeds ... bytes"); raise Webhook.maxPayloadBytes if your events are larger. The same helper backs the SQS and SNS decode paths. A shared _invalid/oversized_compression fixture covers it.

The regen also brings the spec changes since openapi-v240.7.1, all additive: agent review and agent feedback methods, countReviewQueue, expected_value on the custom-property rule parameters, severities on text, OCR, IP flag count and closed caption rules, and new optional query parameters. No removed classes or fields, no changed method signatures. EventHook.sqsRoleArn and snsRoleArn are marked deprecated.

How to verify

  1. ./gradlew spotlessCheck build (passes locally).
  2. WebhookTest runs the oversized_compression fixture and expects "payload exceeds".

BEGIN_COMMIT_OVERRIDE
fix: limit decompressed webhook payloads to 10 MiB, configurable with Webhook.maxPayloadBytes

feat: add countReviewQueue

feat: add getAgentReviewStatus

feat: add listAgentFeedback

feat: add submitAgentFeedback

feat: add include_soft_deleted_channel to GetChannel

feat: add skip_viewer_visibility to GetActivity

feat: add limit and offset to ListImports

feat: add remove_future_channels_ban to Unban

feat: add agent_recommendation to ActionLogResponse and SubmitActionRequest

feat: add agent_review to AppResponseFields, UpdateAppRequest, GetReviewQueueItemResponse and ReviewQueueItemResponse

feat: add effective_agent_review to AppResponseFields

feat: add diversify to ArrangeConfig

feat: add expected_value to CallCustomPropertyParameters, ContentCustomPropertyParameters, ContentCustomPropertyCountParameters and UserCustomPropertyParameters

feat: add severities to TextRuleParameters, TextContentParameters, OCRContentParameters, IPFlagCountRuleParameters and ClosedCaptionRuleParameters

feat: add custom_format to ImportV2TaskSettings

feat: add reasoning_effort and strictness to ModerationEngineConfigRequest and ModerationEngineConfigResponse

feat: add item_count_capped and item_count_pending to ModerationQueueResponse

feat: add matched_blocklists to ModerationRulesTriggeredEvent

feat: deprecate sqs_role_arn and sns_role_arn on EventHook
END_COMMIT_OVERRIDE


Note

Medium Risk
Security-sensitive webhook decompression change is intentional and tested; the bulk is generated additive API surface, but moderation/agent endpoints affect production moderation workflows.

Overview
Webhook hardening: gunzipPayload now enforces a 10 MiB decompressed size limit via configurable Webhook.maxPayloadBytes, throwing InvalidWebhookError when exceeded. This runs before signature verification, closing a gzip-bomb memory exhaustion vector on HTTP/SQS/SNS decode paths. Tests and fixtures cover the oversized case.

OpenAPI v241.7.0 regeneration (additive): The client gains Nora agent moderation surface area—listAgentFeedback, submitAgentFeedback, getAgentReviewStatus, countReviewQueue, plus related request/response models and agent_review / agent_recommendation fields on app settings, review queue items, and submit action payloads.

Other spec deltas include rule expected_value and severities fields, diversify arrange config, import custom_format, moderation engine reasoning_effort / strictness, queue count metadata (item_count_capped / pending), matched_blocklists on rule-triggered events, and new query params (include_soft_deleted_channel, skip_viewer_visibility, list imports pagination, remove_future_channels_ban). EventHook.sqs_role_arn and sns_role_arn are deprecated.

Reviewed by Cursor Bugbot for commit 8f283e7. Bugbot is set up for automated code reviews on this repo. Configure here.

Caps gzip webhook decompression at 10 MiB (Webhook.maxPayloadBytes) and adds the spec changes since openapi-v240.7.1.
@mogita
mogita merged commit 7dbadec into main Nov 13, 2026
10 checks passed
@mogita
mogita deleted the feat/regen-openapi-v241.7.0 branch November 13, 2026 11:53
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.

1 participant