Skip to content

Worker retries oversized vulnerability updates indefinitely after importer drops message data #5984

Description

@keeltrace

Describe the bug

When publishUpdate produces a compressed vulnerability proto larger than maxPubSubMessageSize, it logs a warning and publishes the update with Data = nil while leaving deleted=false.

The Go worker's parseVuln treats empty message data as a valid nil vulnerability (documented there as expected for delete requests). handleMessage then constructs a TaskUpdate, and Engine.handleUpdate returns vuln not provided. The subscriber NACKs the message, so the same oversized update can be retried without a path to successful processing.

Relevant paths on current master:

  • go/internal/importer/importer.go (publishUpdate)
  • go/internal/worker/subscriber.go (parseVuln, handleMessage)
  • go/internal/worker/engine.go (handleUpdate)

To Reproduce

  1. Construct a non-deleted vulnerability whose zstd-compressed protobuf exceeds maxPubSubMessageSize.
  2. Pass it through publishUpdate.
  3. Observe that the published message has empty data and deleted=false.
  4. Deliver that message to the worker subscriber.
  5. parseVuln returns nil, nil, the task is classified as TaskUpdate, handleUpdate returns vuln not provided, and the message is NACKed.

Expected behaviour

Oversized vulnerability updates should have an explicit recoverable or terminal handling path rather than becoming an update message that deterministically fails and is retried.

A small fix could either avoid publishing this invalid update shape or make the worker/importer coordinate an explicit oversized-record path. The exact approach is probably best decided by maintainers because the importer comment currently says to let the worker decide what to do.

Additional context

I searched open/closed issues and PRs for the warning/error strings and maxPubSubMessageSize and did not find an existing report. I have not started implementation, per the repository's issue-first/assignment requirement. I am happy to work on a narrowly scoped fix and regression test if this issue is assigned to me.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions