SEZ9 commented on PR #11559: URL: https://github.com/apache/seatunnel/pull/11559#issuecomment-7071339721
Following up on the unsafe Java deserialization finding in `KafkaSourceReader`. On head `e31e7ef7eaa7`, split state still uses Java serialization, but no longer through an unrestricted `ObjectInputStream`. `deserializeSplit` now constructs `KafkaGateObjectInputStream`, which does three things: - `resolveClass` accepts exact class names only. - Every array descriptor except `byte[]` is rejected. - `resolveProxyClass` rejects proxies. The allowlist test became production-path based in `8909a67fce2`, and the proxy/array hardening landed in `5458405ede0`. `KafkaSourceReaderGateTest` covers a valid split round trip plus rejection of `HashMap`, a same-package subclass, arrays and proxies. That addresses the pattern this finding was about, and it no longer relies only on trusting the payload. Two remaining asks on this point: 1. **Test evidence:** the earlier comment said these tests had not been run locally, and the latest review says the production-path decoder tests have passed. Please link the run where `KafkaSourceReaderGateTest` passed on `e31e7ef7eaa7`, so the evidence is on the thread. 2. **Keeping the allowlist strict:** please keep it exact-name. If split state later needs a new class, add it explicitly with a matching accept/reject test rather than widening to package or prefix matching. Once the link is posted, I'm happy to treat this finding as resolved. Thanks for the hardening work here. <!-- streview-comment:2521 --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
