The vulnerability, as described, is that update response information was not sent to the Data Converter for transformations like encryption when using the proxy package. The provided commit dad8b169ada911d3778e070484d1ae78a58bd22b fixes this issue.
The core of the fix lies in modifying the visitPayloads and visitFailures functions within proxy/interceptor.go. These functions are responsible for traversing protobuf messages and applying visitor functions to payloads and failures, respectively. The visitor functions are where Data Converter logic would be invoked.
Before the patch, these two functions lacked specific case statements in their switch blocks to handle messages of type *update.Response. The patch adds these missing cases, ensuring that when an update.Response is encountered, its Outcome (which can contain payloads or failures) is recursively processed by visitPayloads or visitFailures.
Therefore, the vulnerable functions are proxy.visitPayloads and proxy.visitFailures in their pre-patch state, as their omission of handling update.Response directly caused the sensitive information within these responses to bypass the Data Converter. These functions would be in the call stack when the gRPC proxy interceptor processes an UpdateWorkflowExecution API response.
The changes in cmd/proxygenerator/interceptor.go are to the code generator that produces the interceptor logic, ensuring that the generated code (which includes visitPayloads and visitFailures) correctly handles update.Response and other update-related types. While this generator is the root cause of the bug in the generated code, the runtime functions exhibiting the vulnerability are visitPayloads and visitFailures.