Skip to content

harden: use safe deserialization in stream.go - #918

Open
anupamme wants to merge 1 commit into
OpenRouterTeam:mainfrom
anupamme:fix-repo-go-sdk-go-lang-security-deserialization-unsafe-deserialization-interface-go-unsafe-b0a1ad78
Open

anupamme wants to merge 1 commit into
OpenRouterTeam:mainfrom
anupamme:fix-repo-go-sdk-go-lang-security-deserialization-unsafe-deserialization-interface-go-unsafe-b0a1ad78

Conversation

@anupamme

@anupamme anupamme commented Oct 3, 2026

Copy link
Copy Markdown

Deserializing into interface{} allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. This is defence-in-depth at types/stream/stream.go:238 rather than a vulnerability I can show is exploitable here — it makes the failure mode explicit and bounded. Close it freely if the pattern is intentional.

What changed

  • types/stream/stream.go

Verification

No automated check could be run against this repository, so this change is unverified beyond review. Please treat it as a suggestion.


Automated security fix by OrbisAI Security

Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502)
Resolves go.lang.security.deserialization.unsafe-deserialization-interface.go-unsafe-deserialization-interface

This branch has not been deployed

No deployments
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