Skip to content

Harden Go SDK against process crashes and sensitive-data disclosure#185

Merged
KGronek-Pubnub merged 6 commits into
masterfrom
CLEN-3564_high_security_issues
Jul 2, 2026
Merged

Harden Go SDK against process crashes and sensitive-data disclosure#185
KGronek-Pubnub merged 6 commits into
masterfrom
CLEN-3564_high_security_issues

Conversation

@KGronek-Pubnub

Copy link
Copy Markdown
Contributor

fix: Add recover guards to SDK-owned goroutines (subscribe worker, request workers, job enqueue) so panics fail the request instead of crashing the host process.

fix: Replace panic-based CheckUUID with ValidateUUID and validate the UUID in buildURL, surfacing invalid UUIDs as handled errors; CheckUUID is kept but deprecated.

fix: Harden subscribe response parsing against malformed payloads with checked type assertions that announce a parse error instead of panicking.

fix: Harden Access Manager grant response parsing to validate all fields and return descriptive errors, and fix TTL parsing to accept JSON numbers.

refactor: Return a single generic error on LegacyCryptor decryption failures to prevent padding-oracle-style information disclosure.

refactor: Change redaction of SecretKey to show only first 8 characters and total length of the key.

Validate malformed subscribe event and PAM grant response shapes before type conversion so bad payloads return SDK errors/statuses instead of panicking. Add regression coverage for malformed payloads while preserving valid event behavior.
@pubnub-ops-terraform

pubnub-ops-terraform commented Jul 1, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@jakub-grzesiowski jakub-grzesiowski left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KGronek-Pubnub

Copy link
Copy Markdown
Contributor Author

@pubnub-release-bot release as v9.0.3

@KGronek-Pubnub KGronek-Pubnub merged commit e73b235 into master Jul 2, 2026
8 checks passed
@KGronek-Pubnub KGronek-Pubnub deleted the CLEN-3564_high_security_issues branch July 2, 2026 07:57
@pubnub-release-bot

Copy link
Copy Markdown
Contributor

🚀 Release successfully completed 🚀

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.

4 participants