From ed540dfcddc28de4cedd7725093dc0de74165e1d Mon Sep 17 00:00:00 2001 From: AkshayK Date: Thu, 27 Aug 2026 10:17:19 -0400 Subject: [PATCH 1/4] cpp: model Protocol Buffers parse/serialize taint flow Add flow summaries for the protobuf C++ API on google::protobuf::MessageLite (subtypes=true, so Message and all generated messages are covered): - ParseFrom*/MergeFrom* (string, array, Cord, istream, zero-copy and coded-stream forms) propagate taint from the encoded input to the message. - SerializeTo*/AppendTo* propagate taint from the message to the output buffer or stream; SerializeAs*/... to the return value. File-descriptor variants are omitted (the fd is an int, not a buffer). --- .../2026-08-27-protobuf-models.md | 4 + cpp/ql/lib/ext/Protobuf.model.yml | 58 +++++++++ .../dataflow/external-models/flow.expected | 47 +++++++ .../dataflow/external-models/protobuf.cpp | 122 ++++++++++++++++++ .../dataflow/external-models/steps.expected | 15 +++ 5 files changed, 246 insertions(+) create mode 100644 cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md create mode 100644 cpp/ql/lib/ext/Protobuf.model.yml create mode 100644 cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp diff --git a/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md b/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md new file mode 100644 index 000000000000..a039b28de676 --- /dev/null +++ b/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md @@ -0,0 +1,4 @@ +--- +category: minorAnalysis +--- +* Added flow summaries for the Protocol Buffers C++ API (`google::protobuf::MessageLite`, covering `Message` and all generated messages). The `ParseFrom*`/`MergeFrom*` methods (string, array, Cord, istream, and zero-copy/coded-stream forms) propagate taint from the encoded input to the message, and the `SerializeTo*`/`SerializeAs*`/`AppendTo*` methods propagate taint from the message to the output buffer, stream, or return value. diff --git a/cpp/ql/lib/ext/Protobuf.model.yml b/cpp/ql/lib/ext/Protobuf.model.yml new file mode 100644 index 000000000000..b080855536a1 --- /dev/null +++ b/cpp/ql/lib/ext/Protobuf.model.yml @@ -0,0 +1,58 @@ +extensions: + - addsTo: + pack: codeql/cpp-all + extensible: summaryModel + data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance + # Flow summaries for the Protocol Buffers C++ API. All of these methods are declared on + # `google::protobuf::MessageLite`; `subtypes` covers `Message` and every generated message. + # + # File-descriptor variants (`{Parse,Serialize}*FromFileDescriptor`) are intentionally omitted: + # the descriptor is an `int`, not a data buffer, so there is no buffer argument to model. + + # Deserialization: the encoded input (`Argument[*0]`) taints the message (`this`). + - ["google::protobuf", "MessageLite", True, "ParseFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergeFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergePartialFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParseFromArray", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromArray", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParseFromCord", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromCord", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergeFromCord", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergePartialFromCord", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParseFromIstream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromIstream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParseFromZeroCopyStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromZeroCopyStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParseFromBoundedZeroCopyStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromBoundedZeroCopyStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergeFromBoundedZeroCopyStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergePartialFromBoundedZeroCopyStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParseFromCodedStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromCodedStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergeFromCodedStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergePartialFromCodedStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + + # Serialization into an output buffer/stream: the message (`this`) taints `Argument[*0]`. + - ["google::protobuf", "MessageLite", True, "SerializeToString", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialToString", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "AppendToString", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "AppendPartialToString", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializeToArray", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialToArray", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializeToCord", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialToCord", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "AppendToCord", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "AppendPartialToCord", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializeToOstream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialToOstream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializeToZeroCopyStream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialToZeroCopyStream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializeToCodedStream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialToCodedStream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] + + # Serialization returning the bytes: the message (`this`) taints the (by-value) return value. + - ["google::protobuf", "MessageLite", True, "SerializeAsString", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialAsString", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializeAsCord", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "SerializePartialAsCord", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected index b6f5f4a4452f..5409656f7e57 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected @@ -96,6 +96,10 @@ models | 95 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual | | 96 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | | 97 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | +| 98 | Summary: google::protobuf; MessageLite; true; ParseFromArray; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 99 | Summary: google::protobuf; MessageLite; true; ParseFromString; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 100 | Summary: google::protobuf; MessageLite; true; SerializeAsString; ; ; Argument[-1]; ReturnValue; taint; manual | +| 101 | Summary: google::protobuf; MessageLite; true; SerializeToArray; ; ; Argument[-1]; Argument[*0]; taint; manual | edges | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:56 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | recv_buffer | provenance | Src:MaD:56 Sink:MaD:4 | @@ -144,6 +148,26 @@ edges | azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | | azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | | azure.cpp:295:10:295:20 | contentType | azure.cpp:295:10:295:20 | contentType | provenance | | +| protobuf.cpp:75:33:75:40 | call to source | protobuf.cpp:76:22:76:25 | *data | provenance | TaintFunction | +| protobuf.cpp:76:2:76:4 | ParseFromString output argument | protobuf.cpp:78:2:78:4 | *msg | provenance | | +| protobuf.cpp:76:22:76:25 | *data | protobuf.cpp:76:2:76:4 | ParseFromString output argument | provenance | MaD:99 | +| protobuf.cpp:78:2:78:4 | *msg | protobuf.cpp:78:23:78:25 | SerializeToArray output argument | provenance | MaD:101 | +| protobuf.cpp:78:23:78:25 | SerializeToArray output argument | protobuf.cpp:79:7:79:10 | * ... | provenance | | +| protobuf.cpp:84:33:84:40 | call to source | protobuf.cpp:85:21:85:31 | *call to data | provenance | TaintFunction | +| protobuf.cpp:85:2:85:4 | ParseFromArray output argument | protobuf.cpp:87:2:87:4 | *msg | provenance | | +| protobuf.cpp:85:21:85:31 | *call to data | protobuf.cpp:85:2:85:4 | ParseFromArray output argument | provenance | MaD:98 | +| protobuf.cpp:87:2:87:4 | *msg | protobuf.cpp:87:23:87:25 | SerializeToArray output argument | provenance | MaD:101 | +| protobuf.cpp:87:23:87:25 | SerializeToArray output argument | protobuf.cpp:88:7:88:10 | * ... | provenance | | +| protobuf.cpp:95:33:95:40 | call to source | protobuf.cpp:96:22:96:25 | *data | provenance | TaintFunction | +| protobuf.cpp:96:2:96:4 | ParseFromString output argument | protobuf.cpp:98:23:98:25 | *msg | provenance | | +| protobuf.cpp:96:22:96:25 | *data | protobuf.cpp:96:2:96:4 | ParseFromString output argument | provenance | MaD:99 | +| protobuf.cpp:98:2:98:5 | ParseFromString output argument | protobuf.cpp:100:2:100:5 | *msg2 | provenance | | +| protobuf.cpp:98:23:98:25 | *msg | protobuf.cpp:98:27:98:43 | call to SerializeAsString | provenance | MaD:100 | +| protobuf.cpp:98:23:98:45 | call to SerializeAsString | protobuf.cpp:98:2:98:5 | ParseFromString output argument | provenance | MaD:99 | +| protobuf.cpp:98:27:98:43 | call to SerializeAsString | protobuf.cpp:98:23:98:45 | call to SerializeAsString | provenance | | +| protobuf.cpp:98:27:98:43 | call to SerializeAsString | protobuf.cpp:98:27:98:43 | call to SerializeAsString | provenance | | +| protobuf.cpp:100:2:100:5 | *msg2 | protobuf.cpp:100:24:100:26 | SerializeToArray output argument | provenance | MaD:101 | +| protobuf.cpp:100:24:100:26 | SerializeToArray output argument | protobuf.cpp:101:7:101:10 | * ... | provenance | | | test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | | | test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | | | test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:48 | @@ -532,6 +556,29 @@ nodes | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | +| protobuf.cpp:75:33:75:40 | call to source | semmle.label | call to source | +| protobuf.cpp:76:2:76:4 | ParseFromString output argument | semmle.label | ParseFromString output argument | +| protobuf.cpp:76:22:76:25 | *data | semmle.label | *data | +| protobuf.cpp:78:2:78:4 | *msg | semmle.label | *msg | +| protobuf.cpp:78:23:78:25 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | +| protobuf.cpp:79:7:79:10 | * ... | semmle.label | * ... | +| protobuf.cpp:84:33:84:40 | call to source | semmle.label | call to source | +| protobuf.cpp:85:2:85:4 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | +| protobuf.cpp:85:21:85:31 | *call to data | semmle.label | *call to data | +| protobuf.cpp:87:2:87:4 | *msg | semmle.label | *msg | +| protobuf.cpp:87:23:87:25 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | +| protobuf.cpp:88:7:88:10 | * ... | semmle.label | * ... | +| protobuf.cpp:95:33:95:40 | call to source | semmle.label | call to source | +| protobuf.cpp:96:2:96:4 | ParseFromString output argument | semmle.label | ParseFromString output argument | +| protobuf.cpp:96:22:96:25 | *data | semmle.label | *data | +| protobuf.cpp:98:2:98:5 | ParseFromString output argument | semmle.label | ParseFromString output argument | +| protobuf.cpp:98:23:98:25 | *msg | semmle.label | *msg | +| protobuf.cpp:98:23:98:45 | call to SerializeAsString | semmle.label | call to SerializeAsString | +| protobuf.cpp:98:27:98:43 | call to SerializeAsString | semmle.label | call to SerializeAsString | +| protobuf.cpp:98:27:98:43 | call to SerializeAsString | semmle.label | call to SerializeAsString | +| protobuf.cpp:100:2:100:5 | *msg2 | semmle.label | *msg2 | +| protobuf.cpp:100:24:100:26 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | +| protobuf.cpp:101:7:101:10 | * ... | semmle.label | * ... | | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | semmle.label | *ymlStepGenerated_with_body | | test.cpp:7:47:7:52 | value2 | semmle.label | value2 | | test.cpp:7:64:7:69 | value2 | semmle.label | value2 | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp b/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp new file mode 100644 index 000000000000..f7bb22a4855b --- /dev/null +++ b/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp @@ -0,0 +1,122 @@ + +// --- stub library headers --- + +namespace std { + typedef unsigned long size_t; + + template class allocator { + }; + + template struct char_traits { + }; + + template, class Allocator = allocator > + class basic_string { + public: + basic_string(); + basic_string(const charT* s, const Allocator& a = Allocator()); + const charT* data() const; + size_t size() const; + }; + + typedef basic_string string; + + class istream { + public: + istream(); + }; + + class ostream { + public: + ostream(); + }; +} + +namespace google { +namespace protobuf { + // A faithful subset of `MessageLite`; every method below is declared on `MessageLite` + // in the real headers (message_lite.h), including the iostream-based ones. + class MessageLite { + public: + bool ParseFromString(const std::string &data); + bool MergeFromString(const std::string &data); + bool ParsePartialFromString(const std::string &data); + bool ParseFromArray(const void *data, int size); + bool ParseFromIstream(std::istream *input); + bool SerializeToString(std::string *output) const; + bool SerializePartialToString(std::string *output) const; + bool AppendToString(std::string *output) const; + bool SerializeToArray(void *data, int size) const; + bool SerializeToOstream(std::ostream *output) const; + std::string SerializeAsString() const; + }; + + class Message : public MessageLite { + }; +} +} + +// A generated message type derives from `Message`. +class Person : public google::protobuf::Message { +}; + +// --- test code --- + +char *source(); +void sink(char); + +// Message taint is observed through `SerializeToArray`, whose scalar output flows cleanly +// to a sink. The object-typed serialize outputs (String/Ostream/...) and the input-stream +// parse methods are checked directly by `steps.ql`, which asserts each summary step exists. + +// Deserialization: the encoded input taints the message (`this`). +void test_ParseFromString() { + Person msg; + std::string data = std::string(source()); + msg.ParseFromString(data); + char buf[64]; + msg.SerializeToArray(buf, sizeof(buf)); + sink(*buf); // $ ir +} + +void test_ParseFromArray() { + Person msg; + std::string data = std::string(source()); + msg.ParseFromArray(data.data(), data.size()); + char buf[64]; + msg.SerializeToArray(buf, sizeof(buf)); + sink(*buf); // $ ir +} + +// Serialization returning the bytes: the message taints the returned string, observed by +// parsing it into a second message and serializing that back out. +void test_SerializeAsString() { + Person msg; + std::string data = std::string(source()); + msg.ParseFromString(data); + Person msg2; + msg2.ParseFromString(msg.SerializeAsString()); + char buf[64]; + msg2.SerializeToArray(buf, sizeof(buf)); + sink(*buf); // $ ir +} + +// Additional modeled methods, exercised so their summary steps are covered by `steps.ql`. +void test_step_coverage() { + Person msg; + std::string data = std::string(source()); + + msg.MergeFromString(data); + msg.ParsePartialFromString(data); + + std::istream in; + msg.ParseFromIstream(&in); + + std::string out; + msg.SerializeToString(&out); + msg.SerializePartialToString(&out); + msg.AppendToString(&out); + + std::ostream os; + msg.SerializeToOstream(&os); +} diff --git a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected index 0fe13460cfbf..a1cfc6e1c3d9 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected @@ -4,6 +4,21 @@ | azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | | azure.cpp:287:79:287:98 | call to string | azure.cpp:287:62:287:99 | call to Url | | azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | +| protobuf.cpp:76:22:76:25 | *data | protobuf.cpp:76:2:76:4 | ParseFromString output argument | +| protobuf.cpp:78:2:78:4 | *msg | protobuf.cpp:78:23:78:25 | SerializeToArray output argument | +| protobuf.cpp:85:21:85:31 | *call to data | protobuf.cpp:85:2:85:4 | ParseFromArray output argument | +| protobuf.cpp:87:2:87:4 | *msg | protobuf.cpp:87:23:87:25 | SerializeToArray output argument | +| protobuf.cpp:96:22:96:25 | *data | protobuf.cpp:96:2:96:4 | ParseFromString output argument | +| protobuf.cpp:98:23:98:25 | *msg | protobuf.cpp:98:27:98:43 | call to SerializeAsString | +| protobuf.cpp:98:23:98:45 | call to SerializeAsString | protobuf.cpp:98:2:98:5 | ParseFromString output argument | +| protobuf.cpp:100:2:100:5 | *msg2 | protobuf.cpp:100:24:100:26 | SerializeToArray output argument | +| protobuf.cpp:109:22:109:25 | *data | protobuf.cpp:109:2:109:4 | MergeFromString output argument | +| protobuf.cpp:110:29:110:32 | *data | protobuf.cpp:110:2:110:4 | ParsePartialFromString output argument | +| protobuf.cpp:113:23:113:25 | *& ... | protobuf.cpp:113:2:113:4 | ParseFromIstream output argument | +| protobuf.cpp:116:2:116:4 | *msg | protobuf.cpp:116:24:116:27 | SerializeToString output argument | +| protobuf.cpp:117:2:117:4 | *msg | protobuf.cpp:117:31:117:34 | SerializePartialToString output argument | +| protobuf.cpp:118:2:118:4 | *msg | protobuf.cpp:118:21:118:24 | AppendToString output argument | +| protobuf.cpp:121:2:121:4 | *msg | protobuf.cpp:121:25:121:27 | SerializeToOstream output argument | | test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | | test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | | test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | From 5f0b3dff8c28721a879e8fb97166a913e9279243 Mon Sep 17 00:00:00 2001 From: Akshay K Date: Fri, 28 Aug 2026 12:28:40 -0400 Subject: [PATCH 2/4] Update cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com> --- cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md b/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md index a039b28de676..f68eaac98cfc 100644 --- a/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md +++ b/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* Added flow summaries for the Protocol Buffers C++ API (`google::protobuf::MessageLite`, covering `Message` and all generated messages). The `ParseFrom*`/`MergeFrom*` methods (string, array, Cord, istream, and zero-copy/coded-stream forms) propagate taint from the encoded input to the message, and the `SerializeTo*`/`SerializeAs*`/`AppendTo*` methods propagate taint from the message to the output buffer, stream, or return value. +* Added flow summaries for the Protocol Buffers C++ API (`google::protobuf::MessageLite`, covering `Message` and all generated messages). From d0b3dd50b911d1682d2c3b0fbe02c41d5c5cbf2b Mon Sep 17 00:00:00 2001 From: AkshayK Date: Fri, 28 Aug 2026 13:14:39 -0400 Subject: [PATCH 3/4] fix(cpp): correct protobuf string parse models and expand test coverage --- cpp/ql/lib/ext/Protobuf.model.yml | 17 +- .../dataflow/external-models/flow.expected | 80 ++++----- .../dataflow/external-models/protobuf.cpp | 160 +++++++++++++++--- .../dataflow/external-models/steps.expected | 65 +++++-- .../external-models/validatemodels.expected | 1 + 5 files changed, 233 insertions(+), 90 deletions(-) diff --git a/cpp/ql/lib/ext/Protobuf.model.yml b/cpp/ql/lib/ext/Protobuf.model.yml index b080855536a1..08171f22e298 100644 --- a/cpp/ql/lib/ext/Protobuf.model.yml +++ b/cpp/ql/lib/ext/Protobuf.model.yml @@ -9,11 +9,18 @@ extensions: # File-descriptor variants (`{Parse,Serialize}*FromFileDescriptor`) are intentionally omitted: # the descriptor is an `int`, not a data buffer, so there is no buffer argument to model. - # Deserialization: the encoded input (`Argument[*0]`) taints the message (`this`). - - ["google::protobuf", "MessageLite", True, "ParseFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - - ["google::protobuf", "MessageLite", True, "ParsePartialFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - - ["google::protobuf", "MessageLite", True, "MergeFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - - ["google::protobuf", "MessageLite", True, "MergePartialFromString", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + # Deserialization: the encoded input taints the message (`this`). The `*FromString` methods each + # have a `string_view` overload (the buffer is the by-value argument, so `Argument[0]`) and a + # `const Cord &` overload (the buffer is behind a reference, so `Argument[*0]`). The remaining + # inputs below are pointers or references, so they take `Argument[*0]`. + - ["google::protobuf", "MessageLite", True, "ParseFromString", "(string_view)", "", "Argument[0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParseFromString", "(const Cord &)", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromString", "(string_view)", "", "Argument[0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "ParsePartialFromString", "(const Cord &)", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergeFromString", "(string_view)", "", "Argument[0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergeFromString", "(const Cord &)", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergePartialFromString", "(string_view)", "", "Argument[0]", "Argument[-1]", "taint", "manual"] + - ["google::protobuf", "MessageLite", True, "MergePartialFromString", "(const Cord &)", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "ParseFromArray", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "ParsePartialFromArray", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "ParseFromCord", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected index 5409656f7e57..d51464ea7f5b 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected @@ -97,9 +97,8 @@ models | 96 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | | 97 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | | 98 | Summary: google::protobuf; MessageLite; true; ParseFromArray; ; ; Argument[*0]; Argument[-1]; taint; manual | -| 99 | Summary: google::protobuf; MessageLite; true; ParseFromString; ; ; Argument[*0]; Argument[-1]; taint; manual | -| 100 | Summary: google::protobuf; MessageLite; true; SerializeAsString; ; ; Argument[-1]; ReturnValue; taint; manual | -| 101 | Summary: google::protobuf; MessageLite; true; SerializeToArray; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 99 | Summary: google::protobuf; MessageLite; true; SerializeAsString; ; ; Argument[-1]; ReturnValue; taint; manual | +| 100 | Summary: google::protobuf; MessageLite; true; SerializeToArray; ; ; Argument[-1]; Argument[*0]; taint; manual | edges | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:56 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | recv_buffer | provenance | Src:MaD:56 Sink:MaD:4 | @@ -148,26 +147,21 @@ edges | azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | | azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | | azure.cpp:295:10:295:20 | contentType | azure.cpp:295:10:295:20 | contentType | provenance | | -| protobuf.cpp:75:33:75:40 | call to source | protobuf.cpp:76:22:76:25 | *data | provenance | TaintFunction | -| protobuf.cpp:76:2:76:4 | ParseFromString output argument | protobuf.cpp:78:2:78:4 | *msg | provenance | | -| protobuf.cpp:76:22:76:25 | *data | protobuf.cpp:76:2:76:4 | ParseFromString output argument | provenance | MaD:99 | -| protobuf.cpp:78:2:78:4 | *msg | protobuf.cpp:78:23:78:25 | SerializeToArray output argument | provenance | MaD:101 | -| protobuf.cpp:78:23:78:25 | SerializeToArray output argument | protobuf.cpp:79:7:79:10 | * ... | provenance | | -| protobuf.cpp:84:33:84:40 | call to source | protobuf.cpp:85:21:85:31 | *call to data | provenance | TaintFunction | -| protobuf.cpp:85:2:85:4 | ParseFromArray output argument | protobuf.cpp:87:2:87:4 | *msg | provenance | | -| protobuf.cpp:85:21:85:31 | *call to data | protobuf.cpp:85:2:85:4 | ParseFromArray output argument | provenance | MaD:98 | -| protobuf.cpp:87:2:87:4 | *msg | protobuf.cpp:87:23:87:25 | SerializeToArray output argument | provenance | MaD:101 | -| protobuf.cpp:87:23:87:25 | SerializeToArray output argument | protobuf.cpp:88:7:88:10 | * ... | provenance | | -| protobuf.cpp:95:33:95:40 | call to source | protobuf.cpp:96:22:96:25 | *data | provenance | TaintFunction | -| protobuf.cpp:96:2:96:4 | ParseFromString output argument | protobuf.cpp:98:23:98:25 | *msg | provenance | | -| protobuf.cpp:96:22:96:25 | *data | protobuf.cpp:96:2:96:4 | ParseFromString output argument | provenance | MaD:99 | -| protobuf.cpp:98:2:98:5 | ParseFromString output argument | protobuf.cpp:100:2:100:5 | *msg2 | provenance | | -| protobuf.cpp:98:23:98:25 | *msg | protobuf.cpp:98:27:98:43 | call to SerializeAsString | provenance | MaD:100 | -| protobuf.cpp:98:23:98:45 | call to SerializeAsString | protobuf.cpp:98:2:98:5 | ParseFromString output argument | provenance | MaD:99 | -| protobuf.cpp:98:27:98:43 | call to SerializeAsString | protobuf.cpp:98:23:98:45 | call to SerializeAsString | provenance | | -| protobuf.cpp:98:27:98:43 | call to SerializeAsString | protobuf.cpp:98:27:98:43 | call to SerializeAsString | provenance | | -| protobuf.cpp:100:2:100:5 | *msg2 | protobuf.cpp:100:24:100:26 | SerializeToArray output argument | provenance | MaD:101 | -| protobuf.cpp:100:24:100:26 | SerializeToArray output argument | protobuf.cpp:101:7:101:10 | * ... | provenance | | +| protobuf.cpp:140:33:140:40 | call to source | protobuf.cpp:141:21:141:31 | *call to data | provenance | TaintFunction | +| protobuf.cpp:141:2:141:4 | ParseFromArray output argument | protobuf.cpp:143:2:143:4 | *msg | provenance | | +| protobuf.cpp:141:21:141:31 | *call to data | protobuf.cpp:141:2:141:4 | ParseFromArray output argument | provenance | MaD:98 | +| protobuf.cpp:143:2:143:4 | *msg | protobuf.cpp:143:23:143:25 | SerializeToArray output argument | provenance | MaD:100 | +| protobuf.cpp:143:23:143:25 | SerializeToArray output argument | protobuf.cpp:144:7:144:10 | * ... | provenance | | +| protobuf.cpp:151:33:151:40 | call to source | protobuf.cpp:152:21:152:31 | *call to data | provenance | TaintFunction | +| protobuf.cpp:152:2:152:4 | ParseFromArray output argument | protobuf.cpp:153:18:153:20 | *msg | provenance | | +| protobuf.cpp:152:21:152:31 | *call to data | protobuf.cpp:152:2:152:4 | ParseFromArray output argument | provenance | MaD:98 | +| protobuf.cpp:153:18:153:20 | *msg | protobuf.cpp:153:22:153:38 | call to SerializeAsString | provenance | MaD:99 | +| protobuf.cpp:153:22:153:38 | call to SerializeAsString | protobuf.cpp:153:22:153:38 | call to SerializeAsString | provenance | | +| protobuf.cpp:153:22:153:38 | call to SerializeAsString | protobuf.cpp:155:22:155:29 | *call to data | provenance | TaintFunction | +| protobuf.cpp:155:2:155:5 | ParseFromArray output argument | protobuf.cpp:157:2:157:5 | *msg2 | provenance | | +| protobuf.cpp:155:22:155:29 | *call to data | protobuf.cpp:155:2:155:5 | ParseFromArray output argument | provenance | MaD:98 | +| protobuf.cpp:157:2:157:5 | *msg2 | protobuf.cpp:157:24:157:26 | SerializeToArray output argument | provenance | MaD:100 | +| protobuf.cpp:157:24:157:26 | SerializeToArray output argument | protobuf.cpp:158:7:158:10 | * ... | provenance | | | test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | | | test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | | | test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:48 | @@ -556,29 +550,23 @@ nodes | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | -| protobuf.cpp:75:33:75:40 | call to source | semmle.label | call to source | -| protobuf.cpp:76:2:76:4 | ParseFromString output argument | semmle.label | ParseFromString output argument | -| protobuf.cpp:76:22:76:25 | *data | semmle.label | *data | -| protobuf.cpp:78:2:78:4 | *msg | semmle.label | *msg | -| protobuf.cpp:78:23:78:25 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | -| protobuf.cpp:79:7:79:10 | * ... | semmle.label | * ... | -| protobuf.cpp:84:33:84:40 | call to source | semmle.label | call to source | -| protobuf.cpp:85:2:85:4 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | -| protobuf.cpp:85:21:85:31 | *call to data | semmle.label | *call to data | -| protobuf.cpp:87:2:87:4 | *msg | semmle.label | *msg | -| protobuf.cpp:87:23:87:25 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | -| protobuf.cpp:88:7:88:10 | * ... | semmle.label | * ... | -| protobuf.cpp:95:33:95:40 | call to source | semmle.label | call to source | -| protobuf.cpp:96:2:96:4 | ParseFromString output argument | semmle.label | ParseFromString output argument | -| protobuf.cpp:96:22:96:25 | *data | semmle.label | *data | -| protobuf.cpp:98:2:98:5 | ParseFromString output argument | semmle.label | ParseFromString output argument | -| protobuf.cpp:98:23:98:25 | *msg | semmle.label | *msg | -| protobuf.cpp:98:23:98:45 | call to SerializeAsString | semmle.label | call to SerializeAsString | -| protobuf.cpp:98:27:98:43 | call to SerializeAsString | semmle.label | call to SerializeAsString | -| protobuf.cpp:98:27:98:43 | call to SerializeAsString | semmle.label | call to SerializeAsString | -| protobuf.cpp:100:2:100:5 | *msg2 | semmle.label | *msg2 | -| protobuf.cpp:100:24:100:26 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | -| protobuf.cpp:101:7:101:10 | * ... | semmle.label | * ... | +| protobuf.cpp:140:33:140:40 | call to source | semmle.label | call to source | +| protobuf.cpp:141:2:141:4 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | +| protobuf.cpp:141:21:141:31 | *call to data | semmle.label | *call to data | +| protobuf.cpp:143:2:143:4 | *msg | semmle.label | *msg | +| protobuf.cpp:143:23:143:25 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | +| protobuf.cpp:144:7:144:10 | * ... | semmle.label | * ... | +| protobuf.cpp:151:33:151:40 | call to source | semmle.label | call to source | +| protobuf.cpp:152:2:152:4 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | +| protobuf.cpp:152:21:152:31 | *call to data | semmle.label | *call to data | +| protobuf.cpp:153:18:153:20 | *msg | semmle.label | *msg | +| protobuf.cpp:153:22:153:38 | call to SerializeAsString | semmle.label | call to SerializeAsString | +| protobuf.cpp:153:22:153:38 | call to SerializeAsString | semmle.label | call to SerializeAsString | +| protobuf.cpp:155:2:155:5 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | +| protobuf.cpp:155:22:155:29 | *call to data | semmle.label | *call to data | +| protobuf.cpp:157:2:157:5 | *msg2 | semmle.label | *msg2 | +| protobuf.cpp:157:24:157:26 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | +| protobuf.cpp:158:7:158:10 | * ... | semmle.label | * ... | | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | semmle.label | *ymlStepGenerated_with_body | | test.cpp:7:47:7:52 | value2 | semmle.label | value2 | | test.cpp:7:64:7:69 | value2 | semmle.label | value2 | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp b/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp index f7bb22a4855b..bc9a29ce45a0 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp +++ b/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp @@ -32,23 +32,86 @@ namespace std { }; } +namespace absl { + // `absl::string_view` is passed by value; `absl::Cord` is passed by const reference. + class string_view { + public: + string_view(); + string_view(const char *s); + string_view(const std::string &s); + }; + + class Cord { + public: + Cord(); + }; +} + namespace google { namespace protobuf { - // A faithful subset of `MessageLite`; every method below is declared on `MessageLite` - // in the real headers (message_lite.h), including the iostream-based ones. + namespace io { + class ZeroCopyInputStream {}; + class ZeroCopyOutputStream {}; + class CodedInputStream {}; + class CodedOutputStream {}; + } + + // A faithful subset of `MessageLite`. The string/Cord/stream signatures mirror the real + // `message_lite.h`; the iostream-based methods are declared on `Message` in the real headers + // but are modeled here on `MessageLite` (with `subtypes` covering `Message`). class MessageLite { public: - bool ParseFromString(const std::string &data); - bool MergeFromString(const std::string &data); - bool ParsePartialFromString(const std::string &data); + // Deserialization: input taints the message. + bool ParseFromString(absl::string_view data); + bool ParseFromString(const absl::Cord &data); + bool ParsePartialFromString(absl::string_view data); + bool ParsePartialFromString(const absl::Cord &data); + bool MergeFromString(absl::string_view data); + bool MergeFromString(const absl::Cord &data); + bool MergePartialFromString(absl::string_view data); + bool MergePartialFromString(const absl::Cord &data); bool ParseFromArray(const void *data, int size); + bool ParsePartialFromArray(const void *data, int size); + bool ParseFromCord(const absl::Cord &data); + bool ParsePartialFromCord(const absl::Cord &data); + bool MergeFromCord(const absl::Cord &data); + bool MergePartialFromCord(const absl::Cord &data); bool ParseFromIstream(std::istream *input); + bool ParsePartialFromIstream(std::istream *input); + bool ParseFromZeroCopyStream(io::ZeroCopyInputStream *input); + bool ParsePartialFromZeroCopyStream(io::ZeroCopyInputStream *input); + bool ParseFromBoundedZeroCopyStream(io::ZeroCopyInputStream *input, int size); + bool ParsePartialFromBoundedZeroCopyStream(io::ZeroCopyInputStream *input, int size); + bool MergeFromBoundedZeroCopyStream(io::ZeroCopyInputStream *input, int size); + bool MergePartialFromBoundedZeroCopyStream(io::ZeroCopyInputStream *input, int size); + bool ParseFromCodedStream(io::CodedInputStream *input); + bool ParsePartialFromCodedStream(io::CodedInputStream *input); + bool MergeFromCodedStream(io::CodedInputStream *input); + bool MergePartialFromCodedStream(io::CodedInputStream *input); + + // Serialization into an output buffer/stream: the message taints the output argument. bool SerializeToString(std::string *output) const; bool SerializePartialToString(std::string *output) const; bool AppendToString(std::string *output) const; + bool AppendPartialToString(std::string *output) const; bool SerializeToArray(void *data, int size) const; + bool SerializePartialToArray(void *data, int size) const; + bool SerializeToCord(absl::Cord *output) const; + bool SerializePartialToCord(absl::Cord *output) const; + bool AppendToCord(absl::Cord *output) const; + bool AppendPartialToCord(absl::Cord *output) const; bool SerializeToOstream(std::ostream *output) const; + bool SerializePartialToOstream(std::ostream *output) const; + bool SerializeToZeroCopyStream(io::ZeroCopyOutputStream *output) const; + bool SerializePartialToZeroCopyStream(io::ZeroCopyOutputStream *output) const; + bool SerializeToCodedStream(io::CodedOutputStream *output) const; + bool SerializePartialToCodedStream(io::CodedOutputStream *output) const; + + // Serialization returning the bytes. std::string SerializeAsString() const; + std::string SerializePartialAsString() const; + absl::Cord SerializeAsCord() const; + absl::Cord SerializePartialAsCord() const; }; class Message : public MessageLite { @@ -65,20 +128,13 @@ class Person : public google::protobuf::Message { char *source(); void sink(char); -// Message taint is observed through `SerializeToArray`, whose scalar output flows cleanly -// to a sink. The object-typed serialize outputs (String/Ostream/...) and the input-stream -// parse methods are checked directly by `steps.ql`, which asserts each summary step exists. +// End-to-end flow is demonstrated through the pointer-to-buffer methods, where content taint +// flows naturally: `ParseFromArray` reads a tainted buffer into the message, and `SerializeToArray` +// writes the message back out to a scalar buffer that reaches the sink. The `string_view`, `Cord`, +// and stream overloads do not carry content taint through their argument conversions without further +// library models, so they are exercised for summary-step coverage (`steps.ql`) rather than flow. // Deserialization: the encoded input taints the message (`this`). -void test_ParseFromString() { - Person msg; - std::string data = std::string(source()); - msg.ParseFromString(data); - char buf[64]; - msg.SerializeToArray(buf, sizeof(buf)); - sink(*buf); // $ ir -} - void test_ParseFromArray() { Person msg; std::string data = std::string(source()); @@ -88,35 +144,91 @@ void test_ParseFromArray() { sink(*buf); // $ ir } -// Serialization returning the bytes: the message taints the returned string, observed by -// parsing it into a second message and serializing that back out. +// Serialization returning the bytes: the message taints the returned string, observed by parsing it +// into a second message and serializing that back out. void test_SerializeAsString() { Person msg; std::string data = std::string(source()); - msg.ParseFromString(data); + msg.ParseFromArray(data.data(), data.size()); + std::string s = msg.SerializeAsString(); Person msg2; - msg2.ParseFromString(msg.SerializeAsString()); + msg2.ParseFromArray(s.data(), s.size()); char buf[64]; msg2.SerializeToArray(buf, sizeof(buf)); sink(*buf); // $ ir } -// Additional modeled methods, exercised so their summary steps are covered by `steps.ql`. +// Every modeled method is called below so its summary step is covered by `steps.ql`. Endpoint +// mistakes and rows that fail to bind show up as missing lines in `steps.expected`. void test_step_coverage() { Person msg; std::string data = std::string(source()); + absl::string_view sv = data; + absl::Cord cord; + + msg.ParseFromString(sv); + msg.ParseFromString(cord); + msg.ParsePartialFromString(sv); + msg.ParsePartialFromString(cord); + msg.MergeFromString(sv); + msg.MergeFromString(cord); + msg.MergePartialFromString(sv); + msg.MergePartialFromString(cord); + + msg.ParsePartialFromArray(data.data(), data.size()); - msg.MergeFromString(data); - msg.ParsePartialFromString(data); + msg.ParseFromCord(cord); + msg.ParsePartialFromCord(cord); + msg.MergeFromCord(cord); + msg.MergePartialFromCord(cord); std::istream in; msg.ParseFromIstream(&in); + msg.ParsePartialFromIstream(&in); + + google::protobuf::io::ZeroCopyInputStream zin; + msg.ParseFromZeroCopyStream(&zin); + msg.ParsePartialFromZeroCopyStream(&zin); + msg.ParseFromBoundedZeroCopyStream(&zin, 1); + msg.ParsePartialFromBoundedZeroCopyStream(&zin, 1); + msg.MergeFromBoundedZeroCopyStream(&zin, 1); + msg.MergePartialFromBoundedZeroCopyStream(&zin, 1); + + google::protobuf::io::CodedInputStream cin; + msg.ParseFromCodedStream(&cin); + msg.ParsePartialFromCodedStream(&cin); + msg.MergeFromCodedStream(&cin); + msg.MergePartialFromCodedStream(&cin); std::string out; msg.SerializeToString(&out); msg.SerializePartialToString(&out); msg.AppendToString(&out); + msg.AppendPartialToString(&out); + + char buf[64]; + msg.SerializePartialToArray(buf, sizeof(buf)); + + absl::Cord cordout; + msg.SerializeToCord(&cordout); + msg.SerializePartialToCord(&cordout); + msg.AppendToCord(&cordout); + msg.AppendPartialToCord(&cordout); std::ostream os; msg.SerializeToOstream(&os); + msg.SerializePartialToOstream(&os); + + google::protobuf::io::ZeroCopyOutputStream zout; + msg.SerializeToZeroCopyStream(&zout); + msg.SerializePartialToZeroCopyStream(&zout); + + google::protobuf::io::CodedOutputStream cout; + msg.SerializeToCodedStream(&cout); + msg.SerializePartialToCodedStream(&cout); + + msg.SerializeAsString(); + msg.SerializePartialAsString(); + msg.SerializeAsCord(); + msg.SerializePartialAsCord(); } diff --git a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected index a1cfc6e1c3d9..833c526bce9c 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected @@ -4,21 +4,56 @@ | azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | | azure.cpp:287:79:287:98 | call to string | azure.cpp:287:62:287:99 | call to Url | | azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | -| protobuf.cpp:76:22:76:25 | *data | protobuf.cpp:76:2:76:4 | ParseFromString output argument | -| protobuf.cpp:78:2:78:4 | *msg | protobuf.cpp:78:23:78:25 | SerializeToArray output argument | -| protobuf.cpp:85:21:85:31 | *call to data | protobuf.cpp:85:2:85:4 | ParseFromArray output argument | -| protobuf.cpp:87:2:87:4 | *msg | protobuf.cpp:87:23:87:25 | SerializeToArray output argument | -| protobuf.cpp:96:22:96:25 | *data | protobuf.cpp:96:2:96:4 | ParseFromString output argument | -| protobuf.cpp:98:23:98:25 | *msg | protobuf.cpp:98:27:98:43 | call to SerializeAsString | -| protobuf.cpp:98:23:98:45 | call to SerializeAsString | protobuf.cpp:98:2:98:5 | ParseFromString output argument | -| protobuf.cpp:100:2:100:5 | *msg2 | protobuf.cpp:100:24:100:26 | SerializeToArray output argument | -| protobuf.cpp:109:22:109:25 | *data | protobuf.cpp:109:2:109:4 | MergeFromString output argument | -| protobuf.cpp:110:29:110:32 | *data | protobuf.cpp:110:2:110:4 | ParsePartialFromString output argument | -| protobuf.cpp:113:23:113:25 | *& ... | protobuf.cpp:113:2:113:4 | ParseFromIstream output argument | -| protobuf.cpp:116:2:116:4 | *msg | protobuf.cpp:116:24:116:27 | SerializeToString output argument | -| protobuf.cpp:117:2:117:4 | *msg | protobuf.cpp:117:31:117:34 | SerializePartialToString output argument | -| protobuf.cpp:118:2:118:4 | *msg | protobuf.cpp:118:21:118:24 | AppendToString output argument | -| protobuf.cpp:121:2:121:4 | *msg | protobuf.cpp:121:25:121:27 | SerializeToOstream output argument | +| protobuf.cpp:141:21:141:31 | *call to data | protobuf.cpp:141:2:141:4 | ParseFromArray output argument | +| protobuf.cpp:143:2:143:4 | *msg | protobuf.cpp:143:23:143:25 | SerializeToArray output argument | +| protobuf.cpp:152:21:152:31 | *call to data | protobuf.cpp:152:2:152:4 | ParseFromArray output argument | +| protobuf.cpp:153:18:153:20 | *msg | protobuf.cpp:153:22:153:38 | call to SerializeAsString | +| protobuf.cpp:155:22:155:29 | *call to data | protobuf.cpp:155:2:155:5 | ParseFromArray output argument | +| protobuf.cpp:157:2:157:5 | *msg2 | protobuf.cpp:157:24:157:26 | SerializeToArray output argument | +| protobuf.cpp:169:22:169:23 | sv | protobuf.cpp:169:2:169:4 | ParseFromString output argument | +| protobuf.cpp:170:22:170:25 | *cord | protobuf.cpp:170:2:170:4 | ParseFromString output argument | +| protobuf.cpp:171:29:171:30 | sv | protobuf.cpp:171:2:171:4 | ParsePartialFromString output argument | +| protobuf.cpp:172:29:172:32 | *cord | protobuf.cpp:172:2:172:4 | ParsePartialFromString output argument | +| protobuf.cpp:173:22:173:23 | sv | protobuf.cpp:173:2:173:4 | MergeFromString output argument | +| protobuf.cpp:174:22:174:25 | *cord | protobuf.cpp:174:2:174:4 | MergeFromString output argument | +| protobuf.cpp:175:29:175:30 | sv | protobuf.cpp:175:2:175:4 | MergePartialFromString output argument | +| protobuf.cpp:176:29:176:32 | *cord | protobuf.cpp:176:2:176:4 | MergePartialFromString output argument | +| protobuf.cpp:178:28:178:38 | *call to data | protobuf.cpp:178:2:178:4 | ParsePartialFromArray output argument | +| protobuf.cpp:180:20:180:23 | *cord | protobuf.cpp:180:2:180:4 | ParseFromCord output argument | +| protobuf.cpp:181:27:181:30 | *cord | protobuf.cpp:181:2:181:4 | ParsePartialFromCord output argument | +| protobuf.cpp:182:20:182:23 | *cord | protobuf.cpp:182:2:182:4 | MergeFromCord output argument | +| protobuf.cpp:183:27:183:30 | *cord | protobuf.cpp:183:2:183:4 | MergePartialFromCord output argument | +| protobuf.cpp:186:23:186:25 | *& ... | protobuf.cpp:186:2:186:4 | ParseFromIstream output argument | +| protobuf.cpp:187:30:187:32 | *& ... | protobuf.cpp:187:2:187:4 | ParsePartialFromIstream output argument | +| protobuf.cpp:190:30:190:33 | *& ... | protobuf.cpp:190:2:190:4 | ParseFromZeroCopyStream output argument | +| protobuf.cpp:191:37:191:40 | *& ... | protobuf.cpp:191:2:191:4 | ParsePartialFromZeroCopyStream output argument | +| protobuf.cpp:192:37:192:40 | *& ... | protobuf.cpp:192:2:192:4 | ParseFromBoundedZeroCopyStream output argument | +| protobuf.cpp:193:44:193:47 | *& ... | protobuf.cpp:193:2:193:4 | ParsePartialFromBoundedZeroCopyStream output argument | +| protobuf.cpp:194:37:194:40 | *& ... | protobuf.cpp:194:2:194:4 | MergeFromBoundedZeroCopyStream output argument | +| protobuf.cpp:195:44:195:47 | *& ... | protobuf.cpp:195:2:195:4 | MergePartialFromBoundedZeroCopyStream output argument | +| protobuf.cpp:198:27:198:30 | *& ... | protobuf.cpp:198:2:198:4 | ParseFromCodedStream output argument | +| protobuf.cpp:199:34:199:37 | *& ... | protobuf.cpp:199:2:199:4 | ParsePartialFromCodedStream output argument | +| protobuf.cpp:200:27:200:30 | *& ... | protobuf.cpp:200:2:200:4 | MergeFromCodedStream output argument | +| protobuf.cpp:201:34:201:37 | *& ... | protobuf.cpp:201:2:201:4 | MergePartialFromCodedStream output argument | +| protobuf.cpp:204:2:204:4 | *msg | protobuf.cpp:204:24:204:27 | SerializeToString output argument | +| protobuf.cpp:205:2:205:4 | *msg | protobuf.cpp:205:31:205:34 | SerializePartialToString output argument | +| protobuf.cpp:206:2:206:4 | *msg | protobuf.cpp:206:21:206:24 | AppendToString output argument | +| protobuf.cpp:207:2:207:4 | *msg | protobuf.cpp:207:28:207:31 | AppendPartialToString output argument | +| protobuf.cpp:210:2:210:4 | *msg | protobuf.cpp:210:30:210:32 | SerializePartialToArray output argument | +| protobuf.cpp:213:2:213:4 | *msg | protobuf.cpp:213:22:213:29 | SerializeToCord output argument | +| protobuf.cpp:214:2:214:4 | *msg | protobuf.cpp:214:29:214:36 | SerializePartialToCord output argument | +| protobuf.cpp:215:2:215:4 | *msg | protobuf.cpp:215:19:215:26 | AppendToCord output argument | +| protobuf.cpp:216:2:216:4 | *msg | protobuf.cpp:216:26:216:33 | AppendPartialToCord output argument | +| protobuf.cpp:219:2:219:4 | *msg | protobuf.cpp:219:25:219:27 | SerializeToOstream output argument | +| protobuf.cpp:220:2:220:4 | *msg | protobuf.cpp:220:32:220:34 | SerializePartialToOstream output argument | +| protobuf.cpp:223:2:223:4 | *msg | protobuf.cpp:223:32:223:36 | SerializeToZeroCopyStream output argument | +| protobuf.cpp:224:2:224:4 | *msg | protobuf.cpp:224:39:224:43 | SerializePartialToZeroCopyStream output argument | +| protobuf.cpp:227:2:227:4 | *msg | protobuf.cpp:227:29:227:33 | SerializeToCodedStream output argument | +| protobuf.cpp:228:2:228:4 | *msg | protobuf.cpp:228:36:228:40 | SerializePartialToCodedStream output argument | +| protobuf.cpp:230:2:230:4 | *msg | protobuf.cpp:230:6:230:22 | call to SerializeAsString | +| protobuf.cpp:231:2:231:4 | *msg | protobuf.cpp:231:6:231:29 | call to SerializePartialAsString | +| protobuf.cpp:232:2:232:4 | *msg | protobuf.cpp:232:6:232:20 | call to SerializeAsCord | +| protobuf.cpp:233:2:233:4 | *msg | protobuf.cpp:233:6:233:27 | call to SerializePartialAsCord | | test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | | test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | | test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected b/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected index 15ae50bddc26..b2f2e364a6b7 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/validatemodels.expected @@ -3164,6 +3164,7 @@ | Dubious signature "(const CURLU *,CURLUPart,char **,unsigned int)" in summary model. | | Dubious signature "(const ComPtr &)" in summary model. | | Dubious signature "(const Command *,const size_t,const BlockSplit *,const BlockSplit *,const BlockSplit *,const uint8_t *,size_t,size_t,uint8_t,uint8_t,const ContextType *,HistogramLiteral *,HistogramCommand *,HistogramDistance *)" in summary model. | +| Dubious signature "(const Cord &)" in summary model. | | Dubious signature "(const Curl_easy *,const connectdata *,int)" in summary model. | | Dubious signature "(const DH *)" in summary model. | | Dubious signature "(const DH *,const BIGNUM *)" in summary model. | From 49ffde7103f27ee3e5e7e4e081b7b24e6f061054 Mon Sep 17 00:00:00 2001 From: AkshayK Date: Thu, 3 Sep 2026 05:29:47 -0400 Subject: [PATCH 4/4] test(cpp): add sink-based protobuf model tests and trim comments Replace the step-coverage function with one sink test per model row using a template source, declare the Cord overloads of the ToString methods in the stub, drop the incorrect istream comment from the fixture, and shorten the model-file and change-note comments per review. --- .../2026-08-27-protobuf-models.md | 2 +- cpp/ql/lib/ext/Protobuf.model.yml | 12 +- .../dataflow/external-models/flow.expected | 519 ++++++++++++++++-- .../dataflow/external-models/protobuf.cpp | 414 +++++++++++--- .../dataflow/external-models/steps.expected | 102 ++-- 5 files changed, 874 insertions(+), 175 deletions(-) diff --git a/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md b/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md index f68eaac98cfc..952a1e2a0e33 100644 --- a/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md +++ b/cpp/ql/lib/change-notes/2026-08-27-protobuf-models.md @@ -1,4 +1,4 @@ --- category: minorAnalysis --- -* Added flow summaries for the Protocol Buffers C++ API (`google::protobuf::MessageLite`, covering `Message` and all generated messages). +* Added flow summaries for the Protocol Buffers `google::protobuf::MessageLite` C++ API. diff --git a/cpp/ql/lib/ext/Protobuf.model.yml b/cpp/ql/lib/ext/Protobuf.model.yml index 08171f22e298..02bbad0b1282 100644 --- a/cpp/ql/lib/ext/Protobuf.model.yml +++ b/cpp/ql/lib/ext/Protobuf.model.yml @@ -3,16 +3,10 @@ extensions: pack: codeql/cpp-all extensible: summaryModel data: # namespace, type, subtypes, name, signature, ext, input, output, kind, provenance - # Flow summaries for the Protocol Buffers C++ API. All of these methods are declared on - # `google::protobuf::MessageLite`; `subtypes` covers `Message` and every generated message. - # # File-descriptor variants (`{Parse,Serialize}*FromFileDescriptor`) are intentionally omitted: # the descriptor is an `int`, not a data buffer, so there is no buffer argument to model. - # Deserialization: the encoded input taints the message (`this`). The `*FromString` methods each - # have a `string_view` overload (the buffer is the by-value argument, so `Argument[0]`) and a - # `const Cord &` overload (the buffer is behind a reference, so `Argument[*0]`). The remaining - # inputs below are pointers or references, so they take `Argument[*0]`. + # Deserialization - ["google::protobuf", "MessageLite", True, "ParseFromString", "(string_view)", "", "Argument[0]", "Argument[-1]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "ParseFromString", "(const Cord &)", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "ParsePartialFromString", "(string_view)", "", "Argument[0]", "Argument[-1]", "taint", "manual"] @@ -40,7 +34,7 @@ extensions: - ["google::protobuf", "MessageLite", True, "MergeFromCodedStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "MergePartialFromCodedStream", "", "", "Argument[*0]", "Argument[-1]", "taint", "manual"] - # Serialization into an output buffer/stream: the message (`this`) taints `Argument[*0]`. + # Serialization - ["google::protobuf", "MessageLite", True, "SerializeToString", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "SerializePartialToString", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "AppendToString", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] @@ -58,7 +52,7 @@ extensions: - ["google::protobuf", "MessageLite", True, "SerializeToCodedStream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "SerializePartialToCodedStream", "", "", "Argument[-1]", "Argument[*0]", "taint", "manual"] - # Serialization returning the bytes: the message (`this`) taints the (by-value) return value. + # Serialization returning bytes - ["google::protobuf", "MessageLite", True, "SerializeAsString", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "SerializePartialAsString", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] - ["google::protobuf", "MessageLite", True, "SerializeAsCord", "", "", "Argument[-1]", "ReturnValue", "taint", "manual"] diff --git a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected index d51464ea7f5b..02fe4c876241 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/flow.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/flow.expected @@ -96,9 +96,52 @@ models | 95 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual | | 96 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual | | 97 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual | -| 98 | Summary: google::protobuf; MessageLite; true; ParseFromArray; ; ; Argument[*0]; Argument[-1]; taint; manual | -| 99 | Summary: google::protobuf; MessageLite; true; SerializeAsString; ; ; Argument[-1]; ReturnValue; taint; manual | -| 100 | Summary: google::protobuf; MessageLite; true; SerializeToArray; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 98 | Summary: google::protobuf; MessageLite; true; AppendPartialToCord; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 99 | Summary: google::protobuf; MessageLite; true; AppendPartialToString; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 100 | Summary: google::protobuf; MessageLite; true; AppendToCord; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 101 | Summary: google::protobuf; MessageLite; true; AppendToString; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 102 | Summary: google::protobuf; MessageLite; true; MergeFromBoundedZeroCopyStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 103 | Summary: google::protobuf; MessageLite; true; MergeFromCodedStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 104 | Summary: google::protobuf; MessageLite; true; MergeFromCord; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 105 | Summary: google::protobuf; MessageLite; true; MergeFromString; (const Cord &); ; Argument[*0]; Argument[-1]; taint; manual | +| 106 | Summary: google::protobuf; MessageLite; true; MergeFromString; (string_view); ; Argument[0]; Argument[-1]; taint; manual | +| 107 | Summary: google::protobuf; MessageLite; true; MergePartialFromBoundedZeroCopyStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 108 | Summary: google::protobuf; MessageLite; true; MergePartialFromCodedStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 109 | Summary: google::protobuf; MessageLite; true; MergePartialFromCord; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 110 | Summary: google::protobuf; MessageLite; true; MergePartialFromString; (const Cord &); ; Argument[*0]; Argument[-1]; taint; manual | +| 111 | Summary: google::protobuf; MessageLite; true; MergePartialFromString; (string_view); ; Argument[0]; Argument[-1]; taint; manual | +| 112 | Summary: google::protobuf; MessageLite; true; ParseFromArray; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 113 | Summary: google::protobuf; MessageLite; true; ParseFromBoundedZeroCopyStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 114 | Summary: google::protobuf; MessageLite; true; ParseFromCodedStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 115 | Summary: google::protobuf; MessageLite; true; ParseFromCord; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 116 | Summary: google::protobuf; MessageLite; true; ParseFromIstream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 117 | Summary: google::protobuf; MessageLite; true; ParseFromString; (const Cord &); ; Argument[*0]; Argument[-1]; taint; manual | +| 118 | Summary: google::protobuf; MessageLite; true; ParseFromString; (string_view); ; Argument[0]; Argument[-1]; taint; manual | +| 119 | Summary: google::protobuf; MessageLite; true; ParseFromZeroCopyStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 120 | Summary: google::protobuf; MessageLite; true; ParsePartialFromArray; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 121 | Summary: google::protobuf; MessageLite; true; ParsePartialFromBoundedZeroCopyStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 122 | Summary: google::protobuf; MessageLite; true; ParsePartialFromCodedStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 123 | Summary: google::protobuf; MessageLite; true; ParsePartialFromCord; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 124 | Summary: google::protobuf; MessageLite; true; ParsePartialFromIstream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 125 | Summary: google::protobuf; MessageLite; true; ParsePartialFromString; (const Cord &); ; Argument[*0]; Argument[-1]; taint; manual | +| 126 | Summary: google::protobuf; MessageLite; true; ParsePartialFromString; (string_view); ; Argument[0]; Argument[-1]; taint; manual | +| 127 | Summary: google::protobuf; MessageLite; true; ParsePartialFromZeroCopyStream; ; ; Argument[*0]; Argument[-1]; taint; manual | +| 128 | Summary: google::protobuf; MessageLite; true; SerializeAsCord; ; ; Argument[-1]; ReturnValue; taint; manual | +| 129 | Summary: google::protobuf; MessageLite; true; SerializeAsString; ; ; Argument[-1]; ReturnValue; taint; manual | +| 130 | Summary: google::protobuf; MessageLite; true; SerializePartialAsCord; ; ; Argument[-1]; ReturnValue; taint; manual | +| 131 | Summary: google::protobuf; MessageLite; true; SerializePartialAsString; ; ; Argument[-1]; ReturnValue; taint; manual | +| 132 | Summary: google::protobuf; MessageLite; true; SerializePartialToArray; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 133 | Summary: google::protobuf; MessageLite; true; SerializePartialToCodedStream; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 134 | Summary: google::protobuf; MessageLite; true; SerializePartialToCord; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 135 | Summary: google::protobuf; MessageLite; true; SerializePartialToOstream; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 136 | Summary: google::protobuf; MessageLite; true; SerializePartialToString; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 137 | Summary: google::protobuf; MessageLite; true; SerializePartialToZeroCopyStream; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 138 | Summary: google::protobuf; MessageLite; true; SerializeToArray; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 139 | Summary: google::protobuf; MessageLite; true; SerializeToCodedStream; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 140 | Summary: google::protobuf; MessageLite; true; SerializeToCord; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 141 | Summary: google::protobuf; MessageLite; true; SerializeToOstream; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 142 | Summary: google::protobuf; MessageLite; true; SerializeToString; ; ; Argument[-1]; Argument[*0]; taint; manual | +| 143 | Summary: google::protobuf; MessageLite; true; SerializeToZeroCopyStream; ; ; Argument[-1]; Argument[*0]; taint; manual | edges | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:56 | | asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | recv_buffer | provenance | Src:MaD:56 Sink:MaD:4 | @@ -147,21 +190,200 @@ edges | azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | | azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | | | azure.cpp:295:10:295:20 | contentType | azure.cpp:295:10:295:20 | contentType | provenance | | -| protobuf.cpp:140:33:140:40 | call to source | protobuf.cpp:141:21:141:31 | *call to data | provenance | TaintFunction | -| protobuf.cpp:141:2:141:4 | ParseFromArray output argument | protobuf.cpp:143:2:143:4 | *msg | provenance | | -| protobuf.cpp:141:21:141:31 | *call to data | protobuf.cpp:141:2:141:4 | ParseFromArray output argument | provenance | MaD:98 | -| protobuf.cpp:143:2:143:4 | *msg | protobuf.cpp:143:23:143:25 | SerializeToArray output argument | provenance | MaD:100 | -| protobuf.cpp:143:23:143:25 | SerializeToArray output argument | protobuf.cpp:144:7:144:10 | * ... | provenance | | -| protobuf.cpp:151:33:151:40 | call to source | protobuf.cpp:152:21:152:31 | *call to data | provenance | TaintFunction | -| protobuf.cpp:152:2:152:4 | ParseFromArray output argument | protobuf.cpp:153:18:153:20 | *msg | provenance | | -| protobuf.cpp:152:21:152:31 | *call to data | protobuf.cpp:152:2:152:4 | ParseFromArray output argument | provenance | MaD:98 | -| protobuf.cpp:153:18:153:20 | *msg | protobuf.cpp:153:22:153:38 | call to SerializeAsString | provenance | MaD:99 | -| protobuf.cpp:153:22:153:38 | call to SerializeAsString | protobuf.cpp:153:22:153:38 | call to SerializeAsString | provenance | | -| protobuf.cpp:153:22:153:38 | call to SerializeAsString | protobuf.cpp:155:22:155:29 | *call to data | provenance | TaintFunction | -| protobuf.cpp:155:2:155:5 | ParseFromArray output argument | protobuf.cpp:157:2:157:5 | *msg2 | provenance | | -| protobuf.cpp:155:22:155:29 | *call to data | protobuf.cpp:155:2:155:5 | ParseFromArray output argument | provenance | MaD:98 | -| protobuf.cpp:157:2:157:5 | *msg2 | protobuf.cpp:157:24:157:26 | SerializeToArray output argument | provenance | MaD:100 | -| protobuf.cpp:157:24:157:26 | SerializeToArray output argument | protobuf.cpp:158:7:158:10 | * ... | provenance | | +| protobuf.cpp:134:27:134:51 | call to source | protobuf.cpp:134:27:134:51 | call to source | provenance | | +| protobuf.cpp:134:27:134:51 | call to source | protobuf.cpp:135:22:135:25 | data | provenance | | +| protobuf.cpp:135:2:135:4 | ParseFromString output argument | protobuf.cpp:136:7:136:9 | msg | provenance | | +| protobuf.cpp:135:22:135:25 | data | protobuf.cpp:135:2:135:4 | ParseFromString output argument | provenance | MaD:118 | +| protobuf.cpp:141:20:141:37 | call to source | protobuf.cpp:141:20:141:37 | call to source | provenance | | +| protobuf.cpp:141:20:141:37 | call to source | protobuf.cpp:142:22:142:25 | *data | provenance | | +| protobuf.cpp:142:2:142:4 | ParseFromString output argument | protobuf.cpp:143:7:143:9 | msg | provenance | | +| protobuf.cpp:142:22:142:25 | *data | protobuf.cpp:142:2:142:4 | ParseFromString output argument | provenance | MaD:117 | +| protobuf.cpp:148:27:148:51 | call to source | protobuf.cpp:148:27:148:51 | call to source | provenance | | +| protobuf.cpp:148:27:148:51 | call to source | protobuf.cpp:149:29:149:32 | data | provenance | | +| protobuf.cpp:149:2:149:4 | ParsePartialFromString output argument | protobuf.cpp:150:7:150:9 | msg | provenance | | +| protobuf.cpp:149:29:149:32 | data | protobuf.cpp:149:2:149:4 | ParsePartialFromString output argument | provenance | MaD:126 | +| protobuf.cpp:155:20:155:37 | call to source | protobuf.cpp:155:20:155:37 | call to source | provenance | | +| protobuf.cpp:155:20:155:37 | call to source | protobuf.cpp:156:29:156:32 | *data | provenance | | +| protobuf.cpp:156:2:156:4 | ParsePartialFromString output argument | protobuf.cpp:157:7:157:9 | msg | provenance | | +| protobuf.cpp:156:29:156:32 | *data | protobuf.cpp:156:2:156:4 | ParsePartialFromString output argument | provenance | MaD:125 | +| protobuf.cpp:162:27:162:51 | call to source | protobuf.cpp:162:27:162:51 | call to source | provenance | | +| protobuf.cpp:162:27:162:51 | call to source | protobuf.cpp:163:22:163:25 | data | provenance | | +| protobuf.cpp:163:2:163:4 | MergeFromString output argument | protobuf.cpp:164:7:164:9 | msg | provenance | | +| protobuf.cpp:163:22:163:25 | data | protobuf.cpp:163:2:163:4 | MergeFromString output argument | provenance | MaD:106 | +| protobuf.cpp:169:20:169:37 | call to source | protobuf.cpp:169:20:169:37 | call to source | provenance | | +| protobuf.cpp:169:20:169:37 | call to source | protobuf.cpp:170:22:170:25 | *data | provenance | | +| protobuf.cpp:170:2:170:4 | MergeFromString output argument | protobuf.cpp:171:7:171:9 | msg | provenance | | +| protobuf.cpp:170:22:170:25 | *data | protobuf.cpp:170:2:170:4 | MergeFromString output argument | provenance | MaD:105 | +| protobuf.cpp:176:27:176:51 | call to source | protobuf.cpp:176:27:176:51 | call to source | provenance | | +| protobuf.cpp:176:27:176:51 | call to source | protobuf.cpp:177:29:177:32 | data | provenance | | +| protobuf.cpp:177:2:177:4 | MergePartialFromString output argument | protobuf.cpp:178:7:178:9 | msg | provenance | | +| protobuf.cpp:177:29:177:32 | data | protobuf.cpp:177:2:177:4 | MergePartialFromString output argument | provenance | MaD:111 | +| protobuf.cpp:183:20:183:37 | call to source | protobuf.cpp:183:20:183:37 | call to source | provenance | | +| protobuf.cpp:183:20:183:37 | call to source | protobuf.cpp:184:29:184:32 | *data | provenance | | +| protobuf.cpp:184:2:184:4 | MergePartialFromString output argument | protobuf.cpp:185:7:185:9 | msg | provenance | | +| protobuf.cpp:184:29:184:32 | *data | protobuf.cpp:184:2:184:4 | MergePartialFromString output argument | provenance | MaD:110 | +| protobuf.cpp:190:19:190:38 | call to source | protobuf.cpp:191:21:191:31 | *call to data | provenance | TaintFunction | +| protobuf.cpp:191:2:191:4 | ParseFromArray output argument | protobuf.cpp:192:7:192:9 | msg | provenance | | +| protobuf.cpp:191:21:191:31 | *call to data | protobuf.cpp:191:2:191:4 | ParseFromArray output argument | provenance | MaD:112 | +| protobuf.cpp:197:19:197:38 | call to source | protobuf.cpp:198:28:198:38 | *call to data | provenance | TaintFunction | +| protobuf.cpp:198:2:198:4 | ParsePartialFromArray output argument | protobuf.cpp:199:7:199:9 | msg | provenance | | +| protobuf.cpp:198:28:198:38 | *call to data | protobuf.cpp:198:2:198:4 | ParsePartialFromArray output argument | provenance | MaD:120 | +| protobuf.cpp:204:20:204:37 | call to source | protobuf.cpp:204:20:204:37 | call to source | provenance | | +| protobuf.cpp:204:20:204:37 | call to source | protobuf.cpp:205:20:205:23 | *data | provenance | | +| protobuf.cpp:205:2:205:4 | ParseFromCord output argument | protobuf.cpp:206:7:206:9 | msg | provenance | | +| protobuf.cpp:205:20:205:23 | *data | protobuf.cpp:205:2:205:4 | ParseFromCord output argument | provenance | MaD:115 | +| protobuf.cpp:211:20:211:37 | call to source | protobuf.cpp:211:20:211:37 | call to source | provenance | | +| protobuf.cpp:211:20:211:37 | call to source | protobuf.cpp:212:27:212:30 | *data | provenance | | +| protobuf.cpp:212:2:212:4 | ParsePartialFromCord output argument | protobuf.cpp:213:7:213:9 | msg | provenance | | +| protobuf.cpp:212:27:212:30 | *data | protobuf.cpp:212:2:212:4 | ParsePartialFromCord output argument | provenance | MaD:123 | +| protobuf.cpp:218:20:218:37 | call to source | protobuf.cpp:218:20:218:37 | call to source | provenance | | +| protobuf.cpp:218:20:218:37 | call to source | protobuf.cpp:219:20:219:23 | *data | provenance | | +| protobuf.cpp:219:2:219:4 | MergeFromCord output argument | protobuf.cpp:220:7:220:9 | msg | provenance | | +| protobuf.cpp:219:20:219:23 | *data | protobuf.cpp:219:2:219:4 | MergeFromCord output argument | provenance | MaD:104 | +| protobuf.cpp:225:20:225:37 | call to source | protobuf.cpp:225:20:225:37 | call to source | provenance | | +| protobuf.cpp:225:20:225:37 | call to source | protobuf.cpp:226:27:226:30 | *data | provenance | | +| protobuf.cpp:226:2:226:4 | MergePartialFromCord output argument | protobuf.cpp:227:7:227:9 | msg | provenance | | +| protobuf.cpp:226:27:226:30 | *data | protobuf.cpp:226:2:226:4 | MergePartialFromCord output argument | provenance | MaD:109 | +| protobuf.cpp:232:20:232:39 | call to source | protobuf.cpp:232:20:232:39 | call to source | provenance | | +| protobuf.cpp:232:20:232:39 | call to source | protobuf.cpp:233:23:233:25 | *& ... | provenance | | +| protobuf.cpp:233:2:233:4 | ParseFromIstream output argument | protobuf.cpp:234:7:234:9 | msg | provenance | | +| protobuf.cpp:233:23:233:25 | *& ... | protobuf.cpp:233:2:233:4 | ParseFromIstream output argument | provenance | MaD:116 | +| protobuf.cpp:239:20:239:39 | call to source | protobuf.cpp:239:20:239:39 | call to source | provenance | | +| protobuf.cpp:239:20:239:39 | call to source | protobuf.cpp:240:30:240:32 | *& ... | provenance | | +| protobuf.cpp:240:2:240:4 | ParsePartialFromIstream output argument | protobuf.cpp:241:7:241:9 | msg | provenance | | +| protobuf.cpp:240:30:240:32 | *& ... | protobuf.cpp:240:2:240:4 | ParsePartialFromIstream output argument | provenance | MaD:124 | +| protobuf.cpp:246:27:246:53 | call to source | protobuf.cpp:246:27:246:53 | call to source | provenance | | +| protobuf.cpp:246:27:246:53 | call to source | protobuf.cpp:247:30:247:32 | *& ... | provenance | | +| protobuf.cpp:247:2:247:4 | ParseFromZeroCopyStream output argument | protobuf.cpp:248:7:248:9 | msg | provenance | | +| protobuf.cpp:247:30:247:32 | *& ... | protobuf.cpp:247:2:247:4 | ParseFromZeroCopyStream output argument | provenance | MaD:119 | +| protobuf.cpp:253:27:253:53 | call to source | protobuf.cpp:253:27:253:53 | call to source | provenance | | +| protobuf.cpp:253:27:253:53 | call to source | protobuf.cpp:254:37:254:39 | *& ... | provenance | | +| protobuf.cpp:254:2:254:4 | ParsePartialFromZeroCopyStream output argument | protobuf.cpp:255:7:255:9 | msg | provenance | | +| protobuf.cpp:254:37:254:39 | *& ... | protobuf.cpp:254:2:254:4 | ParsePartialFromZeroCopyStream output argument | provenance | MaD:127 | +| protobuf.cpp:260:27:260:53 | call to source | protobuf.cpp:260:27:260:53 | call to source | provenance | | +| protobuf.cpp:260:27:260:53 | call to source | protobuf.cpp:261:37:261:39 | *& ... | provenance | | +| protobuf.cpp:261:2:261:4 | ParseFromBoundedZeroCopyStream output argument | protobuf.cpp:262:7:262:9 | msg | provenance | | +| protobuf.cpp:261:37:261:39 | *& ... | protobuf.cpp:261:2:261:4 | ParseFromBoundedZeroCopyStream output argument | provenance | MaD:113 | +| protobuf.cpp:267:27:267:53 | call to source | protobuf.cpp:267:27:267:53 | call to source | provenance | | +| protobuf.cpp:267:27:267:53 | call to source | protobuf.cpp:268:44:268:46 | *& ... | provenance | | +| protobuf.cpp:268:2:268:4 | ParsePartialFromBoundedZeroCopyStream output argument | protobuf.cpp:269:7:269:9 | msg | provenance | | +| protobuf.cpp:268:44:268:46 | *& ... | protobuf.cpp:268:2:268:4 | ParsePartialFromBoundedZeroCopyStream output argument | provenance | MaD:121 | +| protobuf.cpp:274:27:274:53 | call to source | protobuf.cpp:274:27:274:53 | call to source | provenance | | +| protobuf.cpp:274:27:274:53 | call to source | protobuf.cpp:275:37:275:39 | *& ... | provenance | | +| protobuf.cpp:275:2:275:4 | MergeFromBoundedZeroCopyStream output argument | protobuf.cpp:276:7:276:9 | msg | provenance | | +| protobuf.cpp:275:37:275:39 | *& ... | protobuf.cpp:275:2:275:4 | MergeFromBoundedZeroCopyStream output argument | provenance | MaD:102 | +| protobuf.cpp:281:27:281:53 | call to source | protobuf.cpp:281:27:281:53 | call to source | provenance | | +| protobuf.cpp:281:27:281:53 | call to source | protobuf.cpp:282:44:282:46 | *& ... | provenance | | +| protobuf.cpp:282:2:282:4 | MergePartialFromBoundedZeroCopyStream output argument | protobuf.cpp:283:7:283:9 | msg | provenance | | +| protobuf.cpp:282:44:282:46 | *& ... | protobuf.cpp:282:2:282:4 | MergePartialFromBoundedZeroCopyStream output argument | provenance | MaD:107 | +| protobuf.cpp:288:24:288:47 | call to source | protobuf.cpp:288:24:288:47 | call to source | provenance | | +| protobuf.cpp:288:24:288:47 | call to source | protobuf.cpp:289:27:289:29 | *& ... | provenance | | +| protobuf.cpp:289:2:289:4 | ParseFromCodedStream output argument | protobuf.cpp:290:7:290:9 | msg | provenance | | +| protobuf.cpp:289:27:289:29 | *& ... | protobuf.cpp:289:2:289:4 | ParseFromCodedStream output argument | provenance | MaD:114 | +| protobuf.cpp:295:24:295:47 | call to source | protobuf.cpp:295:24:295:47 | call to source | provenance | | +| protobuf.cpp:295:24:295:47 | call to source | protobuf.cpp:296:34:296:36 | *& ... | provenance | | +| protobuf.cpp:296:2:296:4 | ParsePartialFromCodedStream output argument | protobuf.cpp:297:7:297:9 | msg | provenance | | +| protobuf.cpp:296:34:296:36 | *& ... | protobuf.cpp:296:2:296:4 | ParsePartialFromCodedStream output argument | provenance | MaD:122 | +| protobuf.cpp:302:24:302:47 | call to source | protobuf.cpp:302:24:302:47 | call to source | provenance | | +| protobuf.cpp:302:24:302:47 | call to source | protobuf.cpp:303:27:303:29 | *& ... | provenance | | +| protobuf.cpp:303:2:303:4 | MergeFromCodedStream output argument | protobuf.cpp:304:7:304:9 | msg | provenance | | +| protobuf.cpp:303:27:303:29 | *& ... | protobuf.cpp:303:2:303:4 | MergeFromCodedStream output argument | provenance | MaD:103 | +| protobuf.cpp:309:24:309:47 | call to source | protobuf.cpp:309:24:309:47 | call to source | provenance | | +| protobuf.cpp:309:24:309:47 | call to source | protobuf.cpp:310:34:310:36 | *& ... | provenance | | +| protobuf.cpp:310:2:310:4 | MergePartialFromCodedStream output argument | protobuf.cpp:311:7:311:9 | msg | provenance | | +| protobuf.cpp:310:34:310:36 | *& ... | protobuf.cpp:310:2:310:4 | MergePartialFromCodedStream output argument | provenance | MaD:108 | +| protobuf.cpp:324:15:324:28 | call to source | protobuf.cpp:324:15:324:28 | call to source | provenance | | +| protobuf.cpp:324:15:324:28 | call to source | protobuf.cpp:326:2:326:4 | *msg | provenance | | +| protobuf.cpp:326:2:326:4 | *msg | protobuf.cpp:326:24:326:27 | SerializeToString output argument | provenance | MaD:142 | +| protobuf.cpp:326:24:326:27 | SerializeToString output argument | protobuf.cpp:327:7:327:9 | out | provenance | | +| protobuf.cpp:331:15:331:28 | call to source | protobuf.cpp:331:15:331:28 | call to source | provenance | | +| protobuf.cpp:331:15:331:28 | call to source | protobuf.cpp:333:2:333:4 | *msg | provenance | | +| protobuf.cpp:333:2:333:4 | *msg | protobuf.cpp:333:31:333:34 | SerializePartialToString output argument | provenance | MaD:136 | +| protobuf.cpp:333:31:333:34 | SerializePartialToString output argument | protobuf.cpp:334:7:334:9 | out | provenance | | +| protobuf.cpp:338:15:338:28 | call to source | protobuf.cpp:338:15:338:28 | call to source | provenance | | +| protobuf.cpp:338:15:338:28 | call to source | protobuf.cpp:340:2:340:4 | *msg | provenance | | +| protobuf.cpp:340:2:340:4 | *msg | protobuf.cpp:340:21:340:24 | AppendToString output argument | provenance | MaD:101 | +| protobuf.cpp:340:21:340:24 | AppendToString output argument | protobuf.cpp:341:7:341:9 | out | provenance | | +| protobuf.cpp:345:15:345:28 | call to source | protobuf.cpp:345:15:345:28 | call to source | provenance | | +| protobuf.cpp:345:15:345:28 | call to source | protobuf.cpp:347:2:347:4 | *msg | provenance | | +| protobuf.cpp:347:2:347:4 | *msg | protobuf.cpp:347:28:347:31 | AppendPartialToString output argument | provenance | MaD:99 | +| protobuf.cpp:347:28:347:31 | AppendPartialToString output argument | protobuf.cpp:348:7:348:9 | out | provenance | | +| protobuf.cpp:352:15:352:28 | call to source | protobuf.cpp:352:15:352:28 | call to source | provenance | | +| protobuf.cpp:352:15:352:28 | call to source | protobuf.cpp:354:2:354:4 | *msg | provenance | | +| protobuf.cpp:354:2:354:4 | *msg | protobuf.cpp:354:24:354:27 | SerializeToString output argument | provenance | MaD:142 | +| protobuf.cpp:354:24:354:27 | SerializeToString output argument | protobuf.cpp:355:7:355:9 | out | provenance | | +| protobuf.cpp:359:15:359:28 | call to source | protobuf.cpp:359:15:359:28 | call to source | provenance | | +| protobuf.cpp:359:15:359:28 | call to source | protobuf.cpp:361:2:361:4 | *msg | provenance | | +| protobuf.cpp:361:2:361:4 | *msg | protobuf.cpp:361:31:361:34 | SerializePartialToString output argument | provenance | MaD:136 | +| protobuf.cpp:361:31:361:34 | SerializePartialToString output argument | protobuf.cpp:362:7:362:9 | out | provenance | | +| protobuf.cpp:366:15:366:28 | call to source | protobuf.cpp:366:15:366:28 | call to source | provenance | | +| protobuf.cpp:366:15:366:28 | call to source | protobuf.cpp:368:2:368:4 | *msg | provenance | | +| protobuf.cpp:368:2:368:4 | *msg | protobuf.cpp:368:21:368:24 | AppendToString output argument | provenance | MaD:101 | +| protobuf.cpp:368:21:368:24 | AppendToString output argument | protobuf.cpp:369:7:369:9 | out | provenance | | +| protobuf.cpp:373:15:373:28 | call to source | protobuf.cpp:373:15:373:28 | call to source | provenance | | +| protobuf.cpp:373:15:373:28 | call to source | protobuf.cpp:375:2:375:4 | *msg | provenance | | +| protobuf.cpp:375:2:375:4 | *msg | protobuf.cpp:375:28:375:31 | AppendPartialToString output argument | provenance | MaD:99 | +| protobuf.cpp:375:28:375:31 | AppendPartialToString output argument | protobuf.cpp:376:7:376:9 | out | provenance | | +| protobuf.cpp:380:15:380:28 | call to source | protobuf.cpp:380:15:380:28 | call to source | provenance | | +| protobuf.cpp:380:15:380:28 | call to source | protobuf.cpp:382:2:382:4 | *msg | provenance | | +| protobuf.cpp:382:2:382:4 | *msg | protobuf.cpp:382:23:382:25 | SerializeToArray output argument | provenance | MaD:138 | +| protobuf.cpp:382:23:382:25 | SerializeToArray output argument | protobuf.cpp:383:7:383:10 | * ... | provenance | | +| protobuf.cpp:387:15:387:28 | call to source | protobuf.cpp:387:15:387:28 | call to source | provenance | | +| protobuf.cpp:387:15:387:28 | call to source | protobuf.cpp:389:2:389:4 | *msg | provenance | | +| protobuf.cpp:389:2:389:4 | *msg | protobuf.cpp:389:30:389:32 | SerializePartialToArray output argument | provenance | MaD:132 | +| protobuf.cpp:389:30:389:32 | SerializePartialToArray output argument | protobuf.cpp:390:7:390:10 | * ... | provenance | | +| protobuf.cpp:394:15:394:28 | call to source | protobuf.cpp:394:15:394:28 | call to source | provenance | | +| protobuf.cpp:394:15:394:28 | call to source | protobuf.cpp:396:2:396:4 | *msg | provenance | | +| protobuf.cpp:396:2:396:4 | *msg | protobuf.cpp:396:22:396:25 | SerializeToCord output argument | provenance | MaD:140 | +| protobuf.cpp:396:22:396:25 | SerializeToCord output argument | protobuf.cpp:397:7:397:9 | out | provenance | | +| protobuf.cpp:401:15:401:28 | call to source | protobuf.cpp:401:15:401:28 | call to source | provenance | | +| protobuf.cpp:401:15:401:28 | call to source | protobuf.cpp:403:2:403:4 | *msg | provenance | | +| protobuf.cpp:403:2:403:4 | *msg | protobuf.cpp:403:29:403:32 | SerializePartialToCord output argument | provenance | MaD:134 | +| protobuf.cpp:403:29:403:32 | SerializePartialToCord output argument | protobuf.cpp:404:7:404:9 | out | provenance | | +| protobuf.cpp:408:15:408:28 | call to source | protobuf.cpp:408:15:408:28 | call to source | provenance | | +| protobuf.cpp:408:15:408:28 | call to source | protobuf.cpp:410:2:410:4 | *msg | provenance | | +| protobuf.cpp:410:2:410:4 | *msg | protobuf.cpp:410:19:410:22 | AppendToCord output argument | provenance | MaD:100 | +| protobuf.cpp:410:19:410:22 | AppendToCord output argument | protobuf.cpp:411:7:411:9 | out | provenance | | +| protobuf.cpp:415:15:415:28 | call to source | protobuf.cpp:415:15:415:28 | call to source | provenance | | +| protobuf.cpp:415:15:415:28 | call to source | protobuf.cpp:417:2:417:4 | *msg | provenance | | +| protobuf.cpp:417:2:417:4 | *msg | protobuf.cpp:417:26:417:29 | AppendPartialToCord output argument | provenance | MaD:98 | +| protobuf.cpp:417:26:417:29 | AppendPartialToCord output argument | protobuf.cpp:418:7:418:9 | out | provenance | | +| protobuf.cpp:422:15:422:28 | call to source | protobuf.cpp:422:15:422:28 | call to source | provenance | | +| protobuf.cpp:422:15:422:28 | call to source | protobuf.cpp:424:2:424:4 | *msg | provenance | | +| protobuf.cpp:424:2:424:4 | *msg | protobuf.cpp:424:25:424:28 | SerializeToOstream output argument | provenance | MaD:141 | +| protobuf.cpp:424:25:424:28 | SerializeToOstream output argument | protobuf.cpp:425:7:425:9 | out | provenance | | +| protobuf.cpp:429:15:429:28 | call to source | protobuf.cpp:429:15:429:28 | call to source | provenance | | +| protobuf.cpp:429:15:429:28 | call to source | protobuf.cpp:431:2:431:4 | *msg | provenance | | +| protobuf.cpp:431:2:431:4 | *msg | protobuf.cpp:431:32:431:35 | SerializePartialToOstream output argument | provenance | MaD:135 | +| protobuf.cpp:431:32:431:35 | SerializePartialToOstream output argument | protobuf.cpp:432:7:432:9 | out | provenance | | +| protobuf.cpp:436:15:436:28 | call to source | protobuf.cpp:436:15:436:28 | call to source | provenance | | +| protobuf.cpp:436:15:436:28 | call to source | protobuf.cpp:438:2:438:4 | *msg | provenance | | +| protobuf.cpp:438:2:438:4 | *msg | protobuf.cpp:438:32:438:35 | SerializeToZeroCopyStream output argument | provenance | MaD:143 | +| protobuf.cpp:438:32:438:35 | SerializeToZeroCopyStream output argument | protobuf.cpp:439:7:439:9 | out | provenance | | +| protobuf.cpp:443:15:443:28 | call to source | protobuf.cpp:443:15:443:28 | call to source | provenance | | +| protobuf.cpp:443:15:443:28 | call to source | protobuf.cpp:445:2:445:4 | *msg | provenance | | +| protobuf.cpp:445:2:445:4 | *msg | protobuf.cpp:445:39:445:42 | SerializePartialToZeroCopyStream output argument | provenance | MaD:137 | +| protobuf.cpp:445:39:445:42 | SerializePartialToZeroCopyStream output argument | protobuf.cpp:446:7:446:9 | out | provenance | | +| protobuf.cpp:450:15:450:28 | call to source | protobuf.cpp:450:15:450:28 | call to source | provenance | | +| protobuf.cpp:450:15:450:28 | call to source | protobuf.cpp:452:2:452:4 | *msg | provenance | | +| protobuf.cpp:452:2:452:4 | *msg | protobuf.cpp:452:29:452:32 | SerializeToCodedStream output argument | provenance | MaD:139 | +| protobuf.cpp:452:29:452:32 | SerializeToCodedStream output argument | protobuf.cpp:453:7:453:9 | out | provenance | | +| protobuf.cpp:457:15:457:28 | call to source | protobuf.cpp:457:15:457:28 | call to source | provenance | | +| protobuf.cpp:457:15:457:28 | call to source | protobuf.cpp:459:2:459:4 | *msg | provenance | | +| protobuf.cpp:459:2:459:4 | *msg | protobuf.cpp:459:36:459:39 | SerializePartialToCodedStream output argument | provenance | MaD:133 | +| protobuf.cpp:459:36:459:39 | SerializePartialToCodedStream output argument | protobuf.cpp:460:7:460:9 | out | provenance | | +| protobuf.cpp:466:15:466:28 | call to source | protobuf.cpp:466:15:466:28 | call to source | provenance | | +| protobuf.cpp:466:15:466:28 | call to source | protobuf.cpp:467:7:467:9 | *msg | provenance | | +| protobuf.cpp:467:7:467:9 | *msg | protobuf.cpp:467:11:467:27 | call to SerializeAsString | provenance | MaD:129 | +| protobuf.cpp:471:15:471:28 | call to source | protobuf.cpp:471:15:471:28 | call to source | provenance | | +| protobuf.cpp:471:15:471:28 | call to source | protobuf.cpp:472:7:472:9 | *msg | provenance | | +| protobuf.cpp:472:7:472:9 | *msg | protobuf.cpp:472:11:472:34 | call to SerializePartialAsString | provenance | MaD:131 | +| protobuf.cpp:476:15:476:28 | call to source | protobuf.cpp:476:15:476:28 | call to source | provenance | | +| protobuf.cpp:476:15:476:28 | call to source | protobuf.cpp:477:7:477:9 | *msg | provenance | | +| protobuf.cpp:477:7:477:9 | *msg | protobuf.cpp:477:11:477:25 | call to SerializeAsCord | provenance | MaD:128 | +| protobuf.cpp:481:15:481:28 | call to source | protobuf.cpp:481:15:481:28 | call to source | provenance | | +| protobuf.cpp:481:15:481:28 | call to source | protobuf.cpp:482:7:482:9 | *msg | provenance | | +| protobuf.cpp:482:7:482:9 | *msg | protobuf.cpp:482:11:482:32 | call to SerializePartialAsCord | provenance | MaD:130 | | test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | | | test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | | | test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:48 | @@ -550,23 +772,250 @@ nodes | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | | azure.cpp:295:10:295:20 | contentType | semmle.label | contentType | -| protobuf.cpp:140:33:140:40 | call to source | semmle.label | call to source | -| protobuf.cpp:141:2:141:4 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | -| protobuf.cpp:141:21:141:31 | *call to data | semmle.label | *call to data | -| protobuf.cpp:143:2:143:4 | *msg | semmle.label | *msg | -| protobuf.cpp:143:23:143:25 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | -| protobuf.cpp:144:7:144:10 | * ... | semmle.label | * ... | -| protobuf.cpp:151:33:151:40 | call to source | semmle.label | call to source | -| protobuf.cpp:152:2:152:4 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | -| protobuf.cpp:152:21:152:31 | *call to data | semmle.label | *call to data | -| protobuf.cpp:153:18:153:20 | *msg | semmle.label | *msg | -| protobuf.cpp:153:22:153:38 | call to SerializeAsString | semmle.label | call to SerializeAsString | -| protobuf.cpp:153:22:153:38 | call to SerializeAsString | semmle.label | call to SerializeAsString | -| protobuf.cpp:155:2:155:5 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | -| protobuf.cpp:155:22:155:29 | *call to data | semmle.label | *call to data | -| protobuf.cpp:157:2:157:5 | *msg2 | semmle.label | *msg2 | -| protobuf.cpp:157:24:157:26 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | -| protobuf.cpp:158:7:158:10 | * ... | semmle.label | * ... | +| protobuf.cpp:134:27:134:51 | call to source | semmle.label | call to source | +| protobuf.cpp:134:27:134:51 | call to source | semmle.label | call to source | +| protobuf.cpp:135:2:135:4 | ParseFromString output argument | semmle.label | ParseFromString output argument | +| protobuf.cpp:135:22:135:25 | data | semmle.label | data | +| protobuf.cpp:136:7:136:9 | msg | semmle.label | msg | +| protobuf.cpp:141:20:141:37 | call to source | semmle.label | call to source | +| protobuf.cpp:141:20:141:37 | call to source | semmle.label | call to source | +| protobuf.cpp:142:2:142:4 | ParseFromString output argument | semmle.label | ParseFromString output argument | +| protobuf.cpp:142:22:142:25 | *data | semmle.label | *data | +| protobuf.cpp:143:7:143:9 | msg | semmle.label | msg | +| protobuf.cpp:148:27:148:51 | call to source | semmle.label | call to source | +| protobuf.cpp:148:27:148:51 | call to source | semmle.label | call to source | +| protobuf.cpp:149:2:149:4 | ParsePartialFromString output argument | semmle.label | ParsePartialFromString output argument | +| protobuf.cpp:149:29:149:32 | data | semmle.label | data | +| protobuf.cpp:150:7:150:9 | msg | semmle.label | msg | +| protobuf.cpp:155:20:155:37 | call to source | semmle.label | call to source | +| protobuf.cpp:155:20:155:37 | call to source | semmle.label | call to source | +| protobuf.cpp:156:2:156:4 | ParsePartialFromString output argument | semmle.label | ParsePartialFromString output argument | +| protobuf.cpp:156:29:156:32 | *data | semmle.label | *data | +| protobuf.cpp:157:7:157:9 | msg | semmle.label | msg | +| protobuf.cpp:162:27:162:51 | call to source | semmle.label | call to source | +| protobuf.cpp:162:27:162:51 | call to source | semmle.label | call to source | +| protobuf.cpp:163:2:163:4 | MergeFromString output argument | semmle.label | MergeFromString output argument | +| protobuf.cpp:163:22:163:25 | data | semmle.label | data | +| protobuf.cpp:164:7:164:9 | msg | semmle.label | msg | +| protobuf.cpp:169:20:169:37 | call to source | semmle.label | call to source | +| protobuf.cpp:169:20:169:37 | call to source | semmle.label | call to source | +| protobuf.cpp:170:2:170:4 | MergeFromString output argument | semmle.label | MergeFromString output argument | +| protobuf.cpp:170:22:170:25 | *data | semmle.label | *data | +| protobuf.cpp:171:7:171:9 | msg | semmle.label | msg | +| protobuf.cpp:176:27:176:51 | call to source | semmle.label | call to source | +| protobuf.cpp:176:27:176:51 | call to source | semmle.label | call to source | +| protobuf.cpp:177:2:177:4 | MergePartialFromString output argument | semmle.label | MergePartialFromString output argument | +| protobuf.cpp:177:29:177:32 | data | semmle.label | data | +| protobuf.cpp:178:7:178:9 | msg | semmle.label | msg | +| protobuf.cpp:183:20:183:37 | call to source | semmle.label | call to source | +| protobuf.cpp:183:20:183:37 | call to source | semmle.label | call to source | +| protobuf.cpp:184:2:184:4 | MergePartialFromString output argument | semmle.label | MergePartialFromString output argument | +| protobuf.cpp:184:29:184:32 | *data | semmle.label | *data | +| protobuf.cpp:185:7:185:9 | msg | semmle.label | msg | +| protobuf.cpp:190:19:190:38 | call to source | semmle.label | call to source | +| protobuf.cpp:191:2:191:4 | ParseFromArray output argument | semmle.label | ParseFromArray output argument | +| protobuf.cpp:191:21:191:31 | *call to data | semmle.label | *call to data | +| protobuf.cpp:192:7:192:9 | msg | semmle.label | msg | +| protobuf.cpp:197:19:197:38 | call to source | semmle.label | call to source | +| protobuf.cpp:198:2:198:4 | ParsePartialFromArray output argument | semmle.label | ParsePartialFromArray output argument | +| protobuf.cpp:198:28:198:38 | *call to data | semmle.label | *call to data | +| protobuf.cpp:199:7:199:9 | msg | semmle.label | msg | +| protobuf.cpp:204:20:204:37 | call to source | semmle.label | call to source | +| protobuf.cpp:204:20:204:37 | call to source | semmle.label | call to source | +| protobuf.cpp:205:2:205:4 | ParseFromCord output argument | semmle.label | ParseFromCord output argument | +| protobuf.cpp:205:20:205:23 | *data | semmle.label | *data | +| protobuf.cpp:206:7:206:9 | msg | semmle.label | msg | +| protobuf.cpp:211:20:211:37 | call to source | semmle.label | call to source | +| protobuf.cpp:211:20:211:37 | call to source | semmle.label | call to source | +| protobuf.cpp:212:2:212:4 | ParsePartialFromCord output argument | semmle.label | ParsePartialFromCord output argument | +| protobuf.cpp:212:27:212:30 | *data | semmle.label | *data | +| protobuf.cpp:213:7:213:9 | msg | semmle.label | msg | +| protobuf.cpp:218:20:218:37 | call to source | semmle.label | call to source | +| protobuf.cpp:218:20:218:37 | call to source | semmle.label | call to source | +| protobuf.cpp:219:2:219:4 | MergeFromCord output argument | semmle.label | MergeFromCord output argument | +| protobuf.cpp:219:20:219:23 | *data | semmle.label | *data | +| protobuf.cpp:220:7:220:9 | msg | semmle.label | msg | +| protobuf.cpp:225:20:225:37 | call to source | semmle.label | call to source | +| protobuf.cpp:225:20:225:37 | call to source | semmle.label | call to source | +| protobuf.cpp:226:2:226:4 | MergePartialFromCord output argument | semmle.label | MergePartialFromCord output argument | +| protobuf.cpp:226:27:226:30 | *data | semmle.label | *data | +| protobuf.cpp:227:7:227:9 | msg | semmle.label | msg | +| protobuf.cpp:232:20:232:39 | call to source | semmle.label | call to source | +| protobuf.cpp:232:20:232:39 | call to source | semmle.label | call to source | +| protobuf.cpp:233:2:233:4 | ParseFromIstream output argument | semmle.label | ParseFromIstream output argument | +| protobuf.cpp:233:23:233:25 | *& ... | semmle.label | *& ... | +| protobuf.cpp:234:7:234:9 | msg | semmle.label | msg | +| protobuf.cpp:239:20:239:39 | call to source | semmle.label | call to source | +| protobuf.cpp:239:20:239:39 | call to source | semmle.label | call to source | +| protobuf.cpp:240:2:240:4 | ParsePartialFromIstream output argument | semmle.label | ParsePartialFromIstream output argument | +| protobuf.cpp:240:30:240:32 | *& ... | semmle.label | *& ... | +| protobuf.cpp:241:7:241:9 | msg | semmle.label | msg | +| protobuf.cpp:246:27:246:53 | call to source | semmle.label | call to source | +| protobuf.cpp:246:27:246:53 | call to source | semmle.label | call to source | +| protobuf.cpp:247:2:247:4 | ParseFromZeroCopyStream output argument | semmle.label | ParseFromZeroCopyStream output argument | +| protobuf.cpp:247:30:247:32 | *& ... | semmle.label | *& ... | +| protobuf.cpp:248:7:248:9 | msg | semmle.label | msg | +| protobuf.cpp:253:27:253:53 | call to source | semmle.label | call to source | +| protobuf.cpp:253:27:253:53 | call to source | semmle.label | call to source | +| protobuf.cpp:254:2:254:4 | ParsePartialFromZeroCopyStream output argument | semmle.label | ParsePartialFromZeroCopyStream output argument | +| protobuf.cpp:254:37:254:39 | *& ... | semmle.label | *& ... | +| protobuf.cpp:255:7:255:9 | msg | semmle.label | msg | +| protobuf.cpp:260:27:260:53 | call to source | semmle.label | call to source | +| protobuf.cpp:260:27:260:53 | call to source | semmle.label | call to source | +| protobuf.cpp:261:2:261:4 | ParseFromBoundedZeroCopyStream output argument | semmle.label | ParseFromBoundedZeroCopyStream output argument | +| protobuf.cpp:261:37:261:39 | *& ... | semmle.label | *& ... | +| protobuf.cpp:262:7:262:9 | msg | semmle.label | msg | +| protobuf.cpp:267:27:267:53 | call to source | semmle.label | call to source | +| protobuf.cpp:267:27:267:53 | call to source | semmle.label | call to source | +| protobuf.cpp:268:2:268:4 | ParsePartialFromBoundedZeroCopyStream output argument | semmle.label | ParsePartialFromBoundedZeroCopyStream output argument | +| protobuf.cpp:268:44:268:46 | *& ... | semmle.label | *& ... | +| protobuf.cpp:269:7:269:9 | msg | semmle.label | msg | +| protobuf.cpp:274:27:274:53 | call to source | semmle.label | call to source | +| protobuf.cpp:274:27:274:53 | call to source | semmle.label | call to source | +| protobuf.cpp:275:2:275:4 | MergeFromBoundedZeroCopyStream output argument | semmle.label | MergeFromBoundedZeroCopyStream output argument | +| protobuf.cpp:275:37:275:39 | *& ... | semmle.label | *& ... | +| protobuf.cpp:276:7:276:9 | msg | semmle.label | msg | +| protobuf.cpp:281:27:281:53 | call to source | semmle.label | call to source | +| protobuf.cpp:281:27:281:53 | call to source | semmle.label | call to source | +| protobuf.cpp:282:2:282:4 | MergePartialFromBoundedZeroCopyStream output argument | semmle.label | MergePartialFromBoundedZeroCopyStream output argument | +| protobuf.cpp:282:44:282:46 | *& ... | semmle.label | *& ... | +| protobuf.cpp:283:7:283:9 | msg | semmle.label | msg | +| protobuf.cpp:288:24:288:47 | call to source | semmle.label | call to source | +| protobuf.cpp:288:24:288:47 | call to source | semmle.label | call to source | +| protobuf.cpp:289:2:289:4 | ParseFromCodedStream output argument | semmle.label | ParseFromCodedStream output argument | +| protobuf.cpp:289:27:289:29 | *& ... | semmle.label | *& ... | +| protobuf.cpp:290:7:290:9 | msg | semmle.label | msg | +| protobuf.cpp:295:24:295:47 | call to source | semmle.label | call to source | +| protobuf.cpp:295:24:295:47 | call to source | semmle.label | call to source | +| protobuf.cpp:296:2:296:4 | ParsePartialFromCodedStream output argument | semmle.label | ParsePartialFromCodedStream output argument | +| protobuf.cpp:296:34:296:36 | *& ... | semmle.label | *& ... | +| protobuf.cpp:297:7:297:9 | msg | semmle.label | msg | +| protobuf.cpp:302:24:302:47 | call to source | semmle.label | call to source | +| protobuf.cpp:302:24:302:47 | call to source | semmle.label | call to source | +| protobuf.cpp:303:2:303:4 | MergeFromCodedStream output argument | semmle.label | MergeFromCodedStream output argument | +| protobuf.cpp:303:27:303:29 | *& ... | semmle.label | *& ... | +| protobuf.cpp:304:7:304:9 | msg | semmle.label | msg | +| protobuf.cpp:309:24:309:47 | call to source | semmle.label | call to source | +| protobuf.cpp:309:24:309:47 | call to source | semmle.label | call to source | +| protobuf.cpp:310:2:310:4 | MergePartialFromCodedStream output argument | semmle.label | MergePartialFromCodedStream output argument | +| protobuf.cpp:310:34:310:36 | *& ... | semmle.label | *& ... | +| protobuf.cpp:311:7:311:9 | msg | semmle.label | msg | +| protobuf.cpp:324:15:324:28 | call to source | semmle.label | call to source | +| protobuf.cpp:324:15:324:28 | call to source | semmle.label | call to source | +| protobuf.cpp:326:2:326:4 | *msg | semmle.label | *msg | +| protobuf.cpp:326:24:326:27 | SerializeToString output argument | semmle.label | SerializeToString output argument | +| protobuf.cpp:327:7:327:9 | out | semmle.label | out | +| protobuf.cpp:331:15:331:28 | call to source | semmle.label | call to source | +| protobuf.cpp:331:15:331:28 | call to source | semmle.label | call to source | +| protobuf.cpp:333:2:333:4 | *msg | semmle.label | *msg | +| protobuf.cpp:333:31:333:34 | SerializePartialToString output argument | semmle.label | SerializePartialToString output argument | +| protobuf.cpp:334:7:334:9 | out | semmle.label | out | +| protobuf.cpp:338:15:338:28 | call to source | semmle.label | call to source | +| protobuf.cpp:338:15:338:28 | call to source | semmle.label | call to source | +| protobuf.cpp:340:2:340:4 | *msg | semmle.label | *msg | +| protobuf.cpp:340:21:340:24 | AppendToString output argument | semmle.label | AppendToString output argument | +| protobuf.cpp:341:7:341:9 | out | semmle.label | out | +| protobuf.cpp:345:15:345:28 | call to source | semmle.label | call to source | +| protobuf.cpp:345:15:345:28 | call to source | semmle.label | call to source | +| protobuf.cpp:347:2:347:4 | *msg | semmle.label | *msg | +| protobuf.cpp:347:28:347:31 | AppendPartialToString output argument | semmle.label | AppendPartialToString output argument | +| protobuf.cpp:348:7:348:9 | out | semmle.label | out | +| protobuf.cpp:352:15:352:28 | call to source | semmle.label | call to source | +| protobuf.cpp:352:15:352:28 | call to source | semmle.label | call to source | +| protobuf.cpp:354:2:354:4 | *msg | semmle.label | *msg | +| protobuf.cpp:354:24:354:27 | SerializeToString output argument | semmle.label | SerializeToString output argument | +| protobuf.cpp:355:7:355:9 | out | semmle.label | out | +| protobuf.cpp:359:15:359:28 | call to source | semmle.label | call to source | +| protobuf.cpp:359:15:359:28 | call to source | semmle.label | call to source | +| protobuf.cpp:361:2:361:4 | *msg | semmle.label | *msg | +| protobuf.cpp:361:31:361:34 | SerializePartialToString output argument | semmle.label | SerializePartialToString output argument | +| protobuf.cpp:362:7:362:9 | out | semmle.label | out | +| protobuf.cpp:366:15:366:28 | call to source | semmle.label | call to source | +| protobuf.cpp:366:15:366:28 | call to source | semmle.label | call to source | +| protobuf.cpp:368:2:368:4 | *msg | semmle.label | *msg | +| protobuf.cpp:368:21:368:24 | AppendToString output argument | semmle.label | AppendToString output argument | +| protobuf.cpp:369:7:369:9 | out | semmle.label | out | +| protobuf.cpp:373:15:373:28 | call to source | semmle.label | call to source | +| protobuf.cpp:373:15:373:28 | call to source | semmle.label | call to source | +| protobuf.cpp:375:2:375:4 | *msg | semmle.label | *msg | +| protobuf.cpp:375:28:375:31 | AppendPartialToString output argument | semmle.label | AppendPartialToString output argument | +| protobuf.cpp:376:7:376:9 | out | semmle.label | out | +| protobuf.cpp:380:15:380:28 | call to source | semmle.label | call to source | +| protobuf.cpp:380:15:380:28 | call to source | semmle.label | call to source | +| protobuf.cpp:382:2:382:4 | *msg | semmle.label | *msg | +| protobuf.cpp:382:23:382:25 | SerializeToArray output argument | semmle.label | SerializeToArray output argument | +| protobuf.cpp:383:7:383:10 | * ... | semmle.label | * ... | +| protobuf.cpp:387:15:387:28 | call to source | semmle.label | call to source | +| protobuf.cpp:387:15:387:28 | call to source | semmle.label | call to source | +| protobuf.cpp:389:2:389:4 | *msg | semmle.label | *msg | +| protobuf.cpp:389:30:389:32 | SerializePartialToArray output argument | semmle.label | SerializePartialToArray output argument | +| protobuf.cpp:390:7:390:10 | * ... | semmle.label | * ... | +| protobuf.cpp:394:15:394:28 | call to source | semmle.label | call to source | +| protobuf.cpp:394:15:394:28 | call to source | semmle.label | call to source | +| protobuf.cpp:396:2:396:4 | *msg | semmle.label | *msg | +| protobuf.cpp:396:22:396:25 | SerializeToCord output argument | semmle.label | SerializeToCord output argument | +| protobuf.cpp:397:7:397:9 | out | semmle.label | out | +| protobuf.cpp:401:15:401:28 | call to source | semmle.label | call to source | +| protobuf.cpp:401:15:401:28 | call to source | semmle.label | call to source | +| protobuf.cpp:403:2:403:4 | *msg | semmle.label | *msg | +| protobuf.cpp:403:29:403:32 | SerializePartialToCord output argument | semmle.label | SerializePartialToCord output argument | +| protobuf.cpp:404:7:404:9 | out | semmle.label | out | +| protobuf.cpp:408:15:408:28 | call to source | semmle.label | call to source | +| protobuf.cpp:408:15:408:28 | call to source | semmle.label | call to source | +| protobuf.cpp:410:2:410:4 | *msg | semmle.label | *msg | +| protobuf.cpp:410:19:410:22 | AppendToCord output argument | semmle.label | AppendToCord output argument | +| protobuf.cpp:411:7:411:9 | out | semmle.label | out | +| protobuf.cpp:415:15:415:28 | call to source | semmle.label | call to source | +| protobuf.cpp:415:15:415:28 | call to source | semmle.label | call to source | +| protobuf.cpp:417:2:417:4 | *msg | semmle.label | *msg | +| protobuf.cpp:417:26:417:29 | AppendPartialToCord output argument | semmle.label | AppendPartialToCord output argument | +| protobuf.cpp:418:7:418:9 | out | semmle.label | out | +| protobuf.cpp:422:15:422:28 | call to source | semmle.label | call to source | +| protobuf.cpp:422:15:422:28 | call to source | semmle.label | call to source | +| protobuf.cpp:424:2:424:4 | *msg | semmle.label | *msg | +| protobuf.cpp:424:25:424:28 | SerializeToOstream output argument | semmle.label | SerializeToOstream output argument | +| protobuf.cpp:425:7:425:9 | out | semmle.label | out | +| protobuf.cpp:429:15:429:28 | call to source | semmle.label | call to source | +| protobuf.cpp:429:15:429:28 | call to source | semmle.label | call to source | +| protobuf.cpp:431:2:431:4 | *msg | semmle.label | *msg | +| protobuf.cpp:431:32:431:35 | SerializePartialToOstream output argument | semmle.label | SerializePartialToOstream output argument | +| protobuf.cpp:432:7:432:9 | out | semmle.label | out | +| protobuf.cpp:436:15:436:28 | call to source | semmle.label | call to source | +| protobuf.cpp:436:15:436:28 | call to source | semmle.label | call to source | +| protobuf.cpp:438:2:438:4 | *msg | semmle.label | *msg | +| protobuf.cpp:438:32:438:35 | SerializeToZeroCopyStream output argument | semmle.label | SerializeToZeroCopyStream output argument | +| protobuf.cpp:439:7:439:9 | out | semmle.label | out | +| protobuf.cpp:443:15:443:28 | call to source | semmle.label | call to source | +| protobuf.cpp:443:15:443:28 | call to source | semmle.label | call to source | +| protobuf.cpp:445:2:445:4 | *msg | semmle.label | *msg | +| protobuf.cpp:445:39:445:42 | SerializePartialToZeroCopyStream output argument | semmle.label | SerializePartialToZeroCopyStream output argument | +| protobuf.cpp:446:7:446:9 | out | semmle.label | out | +| protobuf.cpp:450:15:450:28 | call to source | semmle.label | call to source | +| protobuf.cpp:450:15:450:28 | call to source | semmle.label | call to source | +| protobuf.cpp:452:2:452:4 | *msg | semmle.label | *msg | +| protobuf.cpp:452:29:452:32 | SerializeToCodedStream output argument | semmle.label | SerializeToCodedStream output argument | +| protobuf.cpp:453:7:453:9 | out | semmle.label | out | +| protobuf.cpp:457:15:457:28 | call to source | semmle.label | call to source | +| protobuf.cpp:457:15:457:28 | call to source | semmle.label | call to source | +| protobuf.cpp:459:2:459:4 | *msg | semmle.label | *msg | +| protobuf.cpp:459:36:459:39 | SerializePartialToCodedStream output argument | semmle.label | SerializePartialToCodedStream output argument | +| protobuf.cpp:460:7:460:9 | out | semmle.label | out | +| protobuf.cpp:466:15:466:28 | call to source | semmle.label | call to source | +| protobuf.cpp:466:15:466:28 | call to source | semmle.label | call to source | +| protobuf.cpp:467:7:467:9 | *msg | semmle.label | *msg | +| protobuf.cpp:467:11:467:27 | call to SerializeAsString | semmle.label | call to SerializeAsString | +| protobuf.cpp:471:15:471:28 | call to source | semmle.label | call to source | +| protobuf.cpp:471:15:471:28 | call to source | semmle.label | call to source | +| protobuf.cpp:472:7:472:9 | *msg | semmle.label | *msg | +| protobuf.cpp:472:11:472:34 | call to SerializePartialAsString | semmle.label | call to SerializePartialAsString | +| protobuf.cpp:476:15:476:28 | call to source | semmle.label | call to source | +| protobuf.cpp:476:15:476:28 | call to source | semmle.label | call to source | +| protobuf.cpp:477:7:477:9 | *msg | semmle.label | *msg | +| protobuf.cpp:477:11:477:25 | call to SerializeAsCord | semmle.label | call to SerializeAsCord | +| protobuf.cpp:481:15:481:28 | call to source | semmle.label | call to source | +| protobuf.cpp:481:15:481:28 | call to source | semmle.label | call to source | +| protobuf.cpp:482:7:482:9 | *msg | semmle.label | *msg | +| protobuf.cpp:482:11:482:32 | call to SerializePartialAsCord | semmle.label | call to SerializePartialAsCord | | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | semmle.label | *ymlStepGenerated_with_body | | test.cpp:7:47:7:52 | value2 | semmle.label | value2 | | test.cpp:7:64:7:69 | value2 | semmle.label | value2 | diff --git a/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp b/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp index bc9a29ce45a0..9e2a86790381 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp +++ b/cpp/ql/test/library-tests/dataflow/external-models/protobuf.cpp @@ -33,7 +33,6 @@ namespace std { } namespace absl { - // `absl::string_view` is passed by value; `absl::Cord` is passed by const reference. class string_view { public: string_view(); @@ -56,12 +55,8 @@ namespace protobuf { class CodedOutputStream {}; } - // A faithful subset of `MessageLite`. The string/Cord/stream signatures mirror the real - // `message_lite.h`; the iostream-based methods are declared on `Message` in the real headers - // but are modeled here on `MessageLite` (with `subtypes` covering `Message`). class MessageLite { public: - // Deserialization: input taints the message. bool ParseFromString(absl::string_view data); bool ParseFromString(const absl::Cord &data); bool ParsePartialFromString(absl::string_view data); @@ -89,11 +84,14 @@ namespace protobuf { bool MergeFromCodedStream(io::CodedInputStream *input); bool MergePartialFromCodedStream(io::CodedInputStream *input); - // Serialization into an output buffer/stream: the message taints the output argument. bool SerializeToString(std::string *output) const; bool SerializePartialToString(std::string *output) const; bool AppendToString(std::string *output) const; bool AppendPartialToString(std::string *output) const; + bool SerializeToString(absl::Cord *output) const; + bool SerializePartialToString(absl::Cord *output) const; + bool AppendToString(absl::Cord *output) const; + bool AppendPartialToString(absl::Cord *output) const; bool SerializeToArray(void *data, int size) const; bool SerializePartialToArray(void *data, int size) const; bool SerializeToCord(absl::Cord *output) const; @@ -107,7 +105,6 @@ namespace protobuf { bool SerializeToCodedStream(io::CodedOutputStream *output) const; bool SerializePartialToCodedStream(io::CodedOutputStream *output) const; - // Serialization returning the bytes. std::string SerializeAsString() const; std::string SerializePartialAsString() const; absl::Cord SerializeAsCord() const; @@ -125,110 +122,367 @@ class Person : public google::protobuf::Message { // --- test code --- -char *source(); -void sink(char); +template T source(); +void sink(...); -// End-to-end flow is demonstrated through the pointer-to-buffer methods, where content taint -// flows naturally: `ParseFromArray` reads a tainted buffer into the message, and `SerializeToArray` -// writes the message back out to a scalar buffer that reaches the sink. The `string_view`, `Cord`, -// and stream overloads do not carry content taint through their argument conversions without further -// library models, so they are exercised for summary-step coverage (`steps.ql`) rather than flow. +using namespace google::protobuf::io; + +// Deserialization: the input taints the message. + +void test_ParseFromString_string_view() { + Person msg; + absl::string_view data = source(); + msg.ParseFromString(data); + sink(msg); // $ ir +} + +void test_ParseFromString_Cord() { + Person msg; + absl::Cord data = source(); + msg.ParseFromString(data); + sink(msg); // $ ir +} + +void test_ParsePartialFromString_string_view() { + Person msg; + absl::string_view data = source(); + msg.ParsePartialFromString(data); + sink(msg); // $ ir +} + +void test_ParsePartialFromString_Cord() { + Person msg; + absl::Cord data = source(); + msg.ParsePartialFromString(data); + sink(msg); // $ ir +} + +void test_MergeFromString_string_view() { + Person msg; + absl::string_view data = source(); + msg.MergeFromString(data); + sink(msg); // $ ir +} + +void test_MergeFromString_Cord() { + Person msg; + absl::Cord data = source(); + msg.MergeFromString(data); + sink(msg); // $ ir +} + +void test_MergePartialFromString_string_view() { + Person msg; + absl::string_view data = source(); + msg.MergePartialFromString(data); + sink(msg); // $ ir +} + +void test_MergePartialFromString_Cord() { + Person msg; + absl::Cord data = source(); + msg.MergePartialFromString(data); + sink(msg); // $ ir +} -// Deserialization: the encoded input taints the message (`this`). void test_ParseFromArray() { Person msg; - std::string data = std::string(source()); + std::string data(source()); msg.ParseFromArray(data.data(), data.size()); - char buf[64]; - msg.SerializeToArray(buf, sizeof(buf)); - sink(*buf); // $ ir + sink(msg); // $ ir } -// Serialization returning the bytes: the message taints the returned string, observed by parsing it -// into a second message and serializing that back out. -void test_SerializeAsString() { +void test_ParsePartialFromArray() { Person msg; - std::string data = std::string(source()); - msg.ParseFromArray(data.data(), data.size()); - std::string s = msg.SerializeAsString(); - Person msg2; - msg2.ParseFromArray(s.data(), s.size()); - char buf[64]; - msg2.SerializeToArray(buf, sizeof(buf)); - sink(*buf); // $ ir + std::string data(source()); + msg.ParsePartialFromArray(data.data(), data.size()); + sink(msg); // $ ir } -// Every modeled method is called below so its summary step is covered by `steps.ql`. Endpoint -// mistakes and rows that fail to bind show up as missing lines in `steps.expected`. -void test_step_coverage() { +void test_ParseFromCord() { Person msg; - std::string data = std::string(source()); - absl::string_view sv = data; - absl::Cord cord; + absl::Cord data = source(); + msg.ParseFromCord(data); + sink(msg); // $ ir +} - msg.ParseFromString(sv); - msg.ParseFromString(cord); - msg.ParsePartialFromString(sv); - msg.ParsePartialFromString(cord); - msg.MergeFromString(sv); - msg.MergeFromString(cord); - msg.MergePartialFromString(sv); - msg.MergePartialFromString(cord); +void test_ParsePartialFromCord() { + Person msg; + absl::Cord data = source(); + msg.ParsePartialFromCord(data); + sink(msg); // $ ir +} - msg.ParsePartialFromArray(data.data(), data.size()); +void test_MergeFromCord() { + Person msg; + absl::Cord data = source(); + msg.MergeFromCord(data); + sink(msg); // $ ir +} - msg.ParseFromCord(cord); - msg.ParsePartialFromCord(cord); - msg.MergeFromCord(cord); - msg.MergePartialFromCord(cord); +void test_MergePartialFromCord() { + Person msg; + absl::Cord data = source(); + msg.MergePartialFromCord(data); + sink(msg); // $ ir +} - std::istream in; +void test_ParseFromIstream() { + Person msg; + std::istream in = source(); msg.ParseFromIstream(&in); + sink(msg); // $ ir +} + +void test_ParsePartialFromIstream() { + Person msg; + std::istream in = source(); msg.ParsePartialFromIstream(&in); + sink(msg); // $ ir +} + +void test_ParseFromZeroCopyStream() { + Person msg; + ZeroCopyInputStream in = source(); + msg.ParseFromZeroCopyStream(&in); + sink(msg); // $ ir +} + +void test_ParsePartialFromZeroCopyStream() { + Person msg; + ZeroCopyInputStream in = source(); + msg.ParsePartialFromZeroCopyStream(&in); + sink(msg); // $ ir +} + +void test_ParseFromBoundedZeroCopyStream() { + Person msg; + ZeroCopyInputStream in = source(); + msg.ParseFromBoundedZeroCopyStream(&in, 1); + sink(msg); // $ ir +} + +void test_ParsePartialFromBoundedZeroCopyStream() { + Person msg; + ZeroCopyInputStream in = source(); + msg.ParsePartialFromBoundedZeroCopyStream(&in, 1); + sink(msg); // $ ir +} + +void test_MergeFromBoundedZeroCopyStream() { + Person msg; + ZeroCopyInputStream in = source(); + msg.MergeFromBoundedZeroCopyStream(&in, 1); + sink(msg); // $ ir +} + +void test_MergePartialFromBoundedZeroCopyStream() { + Person msg; + ZeroCopyInputStream in = source(); + msg.MergePartialFromBoundedZeroCopyStream(&in, 1); + sink(msg); // $ ir +} + +void test_ParseFromCodedStream() { + Person msg; + CodedInputStream in = source(); + msg.ParseFromCodedStream(&in); + sink(msg); // $ ir +} - google::protobuf::io::ZeroCopyInputStream zin; - msg.ParseFromZeroCopyStream(&zin); - msg.ParsePartialFromZeroCopyStream(&zin); - msg.ParseFromBoundedZeroCopyStream(&zin, 1); - msg.ParsePartialFromBoundedZeroCopyStream(&zin, 1); - msg.MergeFromBoundedZeroCopyStream(&zin, 1); - msg.MergePartialFromBoundedZeroCopyStream(&zin, 1); +void test_ParsePartialFromCodedStream() { + Person msg; + CodedInputStream in = source(); + msg.ParsePartialFromCodedStream(&in); + sink(msg); // $ ir +} + +void test_MergeFromCodedStream() { + Person msg; + CodedInputStream in = source(); + msg.MergeFromCodedStream(&in); + sink(msg); // $ ir +} + +void test_MergePartialFromCodedStream() { + Person msg; + CodedInputStream in = source(); + msg.MergePartialFromCodedStream(&in); + sink(msg); // $ ir +} + +void test_untainted_input() { + Person msg; + absl::Cord data; + msg.ParseFromString(data); + sink(msg); // clean +} + +// Serialization: the message taints the output argument. + +void test_SerializeToString() { + Person msg = source(); + std::string out; + msg.SerializeToString(&out); + sink(out); // $ ir +} + +void test_SerializePartialToString() { + Person msg = source(); + std::string out; + msg.SerializePartialToString(&out); + sink(out); // $ ir +} - google::protobuf::io::CodedInputStream cin; - msg.ParseFromCodedStream(&cin); - msg.ParsePartialFromCodedStream(&cin); - msg.MergeFromCodedStream(&cin); - msg.MergePartialFromCodedStream(&cin); +void test_AppendToString() { + Person msg = source(); + std::string out; + msg.AppendToString(&out); + sink(out); // $ ir +} +void test_AppendPartialToString() { + Person msg = source(); std::string out; + msg.AppendPartialToString(&out); + sink(out); // $ ir +} + +void test_SerializeToString_Cord() { + Person msg = source(); + absl::Cord out; msg.SerializeToString(&out); + sink(out); // $ ir +} + +void test_SerializePartialToString_Cord() { + Person msg = source(); + absl::Cord out; msg.SerializePartialToString(&out); + sink(out); // $ ir +} + +void test_AppendToString_Cord() { + Person msg = source(); + absl::Cord out; msg.AppendToString(&out); + sink(out); // $ ir +} + +void test_AppendPartialToString_Cord() { + Person msg = source(); + absl::Cord out; msg.AppendPartialToString(&out); + sink(out); // $ ir +} +void test_SerializeToArray() { + Person msg = source(); + char buf[64]; + msg.SerializeToArray(buf, sizeof(buf)); + sink(*buf); // $ ir +} + +void test_SerializePartialToArray() { + Person msg = source(); char buf[64]; msg.SerializePartialToArray(buf, sizeof(buf)); + sink(*buf); // $ ir +} - absl::Cord cordout; - msg.SerializeToCord(&cordout); - msg.SerializePartialToCord(&cordout); - msg.AppendToCord(&cordout); - msg.AppendPartialToCord(&cordout); +void test_SerializeToCord() { + Person msg = source(); + absl::Cord out; + msg.SerializeToCord(&out); + sink(out); // $ ir +} - std::ostream os; - msg.SerializeToOstream(&os); - msg.SerializePartialToOstream(&os); +void test_SerializePartialToCord() { + Person msg = source(); + absl::Cord out; + msg.SerializePartialToCord(&out); + sink(out); // $ ir +} - google::protobuf::io::ZeroCopyOutputStream zout; - msg.SerializeToZeroCopyStream(&zout); - msg.SerializePartialToZeroCopyStream(&zout); +void test_AppendToCord() { + Person msg = source(); + absl::Cord out; + msg.AppendToCord(&out); + sink(out); // $ ir +} - google::protobuf::io::CodedOutputStream cout; - msg.SerializeToCodedStream(&cout); - msg.SerializePartialToCodedStream(&cout); +void test_AppendPartialToCord() { + Person msg = source(); + absl::Cord out; + msg.AppendPartialToCord(&out); + sink(out); // $ ir +} + +void test_SerializeToOstream() { + Person msg = source(); + std::ostream out; + msg.SerializeToOstream(&out); + sink(out); // $ ir +} + +void test_SerializePartialToOstream() { + Person msg = source(); + std::ostream out; + msg.SerializePartialToOstream(&out); + sink(out); // $ ir +} + +void test_SerializeToZeroCopyStream() { + Person msg = source(); + ZeroCopyOutputStream out; + msg.SerializeToZeroCopyStream(&out); + sink(out); // $ ir +} - msg.SerializeAsString(); - msg.SerializePartialAsString(); - msg.SerializeAsCord(); - msg.SerializePartialAsCord(); +void test_SerializePartialToZeroCopyStream() { + Person msg = source(); + ZeroCopyOutputStream out; + msg.SerializePartialToZeroCopyStream(&out); + sink(out); // $ ir +} + +void test_SerializeToCodedStream() { + Person msg = source(); + CodedOutputStream out; + msg.SerializeToCodedStream(&out); + sink(out); // $ ir +} + +void test_SerializePartialToCodedStream() { + Person msg = source(); + CodedOutputStream out; + msg.SerializePartialToCodedStream(&out); + sink(out); // $ ir +} + +// Serialization: the message taints the returned bytes. + +void test_SerializeAsString() { + Person msg = source(); + sink(msg.SerializeAsString()); // $ ir +} + +void test_SerializePartialAsString() { + Person msg = source(); + sink(msg.SerializePartialAsString()); // $ ir +} + +void test_SerializeAsCord() { + Person msg = source(); + sink(msg.SerializeAsCord()); // $ ir +} + +void test_SerializePartialAsCord() { + Person msg = source(); + sink(msg.SerializePartialAsCord()); // $ ir +} + +void test_untainted_message() { + Person msg; + sink(msg.SerializeAsString()); // clean } diff --git a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected index 833c526bce9c..12584f5788e1 100644 --- a/cpp/ql/test/library-tests/dataflow/external-models/steps.expected +++ b/cpp/ql/test/library-tests/dataflow/external-models/steps.expected @@ -4,56 +4,58 @@ | azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | | azure.cpp:287:79:287:98 | call to string | azure.cpp:287:62:287:99 | call to Url | | azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | -| protobuf.cpp:141:21:141:31 | *call to data | protobuf.cpp:141:2:141:4 | ParseFromArray output argument | -| protobuf.cpp:143:2:143:4 | *msg | protobuf.cpp:143:23:143:25 | SerializeToArray output argument | -| protobuf.cpp:152:21:152:31 | *call to data | protobuf.cpp:152:2:152:4 | ParseFromArray output argument | -| protobuf.cpp:153:18:153:20 | *msg | protobuf.cpp:153:22:153:38 | call to SerializeAsString | -| protobuf.cpp:155:22:155:29 | *call to data | protobuf.cpp:155:2:155:5 | ParseFromArray output argument | -| protobuf.cpp:157:2:157:5 | *msg2 | protobuf.cpp:157:24:157:26 | SerializeToArray output argument | -| protobuf.cpp:169:22:169:23 | sv | protobuf.cpp:169:2:169:4 | ParseFromString output argument | -| protobuf.cpp:170:22:170:25 | *cord | protobuf.cpp:170:2:170:4 | ParseFromString output argument | -| protobuf.cpp:171:29:171:30 | sv | protobuf.cpp:171:2:171:4 | ParsePartialFromString output argument | -| protobuf.cpp:172:29:172:32 | *cord | protobuf.cpp:172:2:172:4 | ParsePartialFromString output argument | -| protobuf.cpp:173:22:173:23 | sv | protobuf.cpp:173:2:173:4 | MergeFromString output argument | -| protobuf.cpp:174:22:174:25 | *cord | protobuf.cpp:174:2:174:4 | MergeFromString output argument | -| protobuf.cpp:175:29:175:30 | sv | protobuf.cpp:175:2:175:4 | MergePartialFromString output argument | -| protobuf.cpp:176:29:176:32 | *cord | protobuf.cpp:176:2:176:4 | MergePartialFromString output argument | -| protobuf.cpp:178:28:178:38 | *call to data | protobuf.cpp:178:2:178:4 | ParsePartialFromArray output argument | -| protobuf.cpp:180:20:180:23 | *cord | protobuf.cpp:180:2:180:4 | ParseFromCord output argument | -| protobuf.cpp:181:27:181:30 | *cord | protobuf.cpp:181:2:181:4 | ParsePartialFromCord output argument | -| protobuf.cpp:182:20:182:23 | *cord | protobuf.cpp:182:2:182:4 | MergeFromCord output argument | -| protobuf.cpp:183:27:183:30 | *cord | protobuf.cpp:183:2:183:4 | MergePartialFromCord output argument | -| protobuf.cpp:186:23:186:25 | *& ... | protobuf.cpp:186:2:186:4 | ParseFromIstream output argument | -| protobuf.cpp:187:30:187:32 | *& ... | protobuf.cpp:187:2:187:4 | ParsePartialFromIstream output argument | -| protobuf.cpp:190:30:190:33 | *& ... | protobuf.cpp:190:2:190:4 | ParseFromZeroCopyStream output argument | -| protobuf.cpp:191:37:191:40 | *& ... | protobuf.cpp:191:2:191:4 | ParsePartialFromZeroCopyStream output argument | -| protobuf.cpp:192:37:192:40 | *& ... | protobuf.cpp:192:2:192:4 | ParseFromBoundedZeroCopyStream output argument | -| protobuf.cpp:193:44:193:47 | *& ... | protobuf.cpp:193:2:193:4 | ParsePartialFromBoundedZeroCopyStream output argument | -| protobuf.cpp:194:37:194:40 | *& ... | protobuf.cpp:194:2:194:4 | MergeFromBoundedZeroCopyStream output argument | -| protobuf.cpp:195:44:195:47 | *& ... | protobuf.cpp:195:2:195:4 | MergePartialFromBoundedZeroCopyStream output argument | -| protobuf.cpp:198:27:198:30 | *& ... | protobuf.cpp:198:2:198:4 | ParseFromCodedStream output argument | -| protobuf.cpp:199:34:199:37 | *& ... | protobuf.cpp:199:2:199:4 | ParsePartialFromCodedStream output argument | -| protobuf.cpp:200:27:200:30 | *& ... | protobuf.cpp:200:2:200:4 | MergeFromCodedStream output argument | -| protobuf.cpp:201:34:201:37 | *& ... | protobuf.cpp:201:2:201:4 | MergePartialFromCodedStream output argument | -| protobuf.cpp:204:2:204:4 | *msg | protobuf.cpp:204:24:204:27 | SerializeToString output argument | -| protobuf.cpp:205:2:205:4 | *msg | protobuf.cpp:205:31:205:34 | SerializePartialToString output argument | -| protobuf.cpp:206:2:206:4 | *msg | protobuf.cpp:206:21:206:24 | AppendToString output argument | -| protobuf.cpp:207:2:207:4 | *msg | protobuf.cpp:207:28:207:31 | AppendPartialToString output argument | -| protobuf.cpp:210:2:210:4 | *msg | protobuf.cpp:210:30:210:32 | SerializePartialToArray output argument | -| protobuf.cpp:213:2:213:4 | *msg | protobuf.cpp:213:22:213:29 | SerializeToCord output argument | -| protobuf.cpp:214:2:214:4 | *msg | protobuf.cpp:214:29:214:36 | SerializePartialToCord output argument | -| protobuf.cpp:215:2:215:4 | *msg | protobuf.cpp:215:19:215:26 | AppendToCord output argument | -| protobuf.cpp:216:2:216:4 | *msg | protobuf.cpp:216:26:216:33 | AppendPartialToCord output argument | -| protobuf.cpp:219:2:219:4 | *msg | protobuf.cpp:219:25:219:27 | SerializeToOstream output argument | -| protobuf.cpp:220:2:220:4 | *msg | protobuf.cpp:220:32:220:34 | SerializePartialToOstream output argument | -| protobuf.cpp:223:2:223:4 | *msg | protobuf.cpp:223:32:223:36 | SerializeToZeroCopyStream output argument | -| protobuf.cpp:224:2:224:4 | *msg | protobuf.cpp:224:39:224:43 | SerializePartialToZeroCopyStream output argument | -| protobuf.cpp:227:2:227:4 | *msg | protobuf.cpp:227:29:227:33 | SerializeToCodedStream output argument | -| protobuf.cpp:228:2:228:4 | *msg | protobuf.cpp:228:36:228:40 | SerializePartialToCodedStream output argument | -| protobuf.cpp:230:2:230:4 | *msg | protobuf.cpp:230:6:230:22 | call to SerializeAsString | -| protobuf.cpp:231:2:231:4 | *msg | protobuf.cpp:231:6:231:29 | call to SerializePartialAsString | -| protobuf.cpp:232:2:232:4 | *msg | protobuf.cpp:232:6:232:20 | call to SerializeAsCord | -| protobuf.cpp:233:2:233:4 | *msg | protobuf.cpp:233:6:233:27 | call to SerializePartialAsCord | +| protobuf.cpp:135:22:135:25 | data | protobuf.cpp:135:2:135:4 | ParseFromString output argument | +| protobuf.cpp:142:22:142:25 | *data | protobuf.cpp:142:2:142:4 | ParseFromString output argument | +| protobuf.cpp:149:29:149:32 | data | protobuf.cpp:149:2:149:4 | ParsePartialFromString output argument | +| protobuf.cpp:156:29:156:32 | *data | protobuf.cpp:156:2:156:4 | ParsePartialFromString output argument | +| protobuf.cpp:163:22:163:25 | data | protobuf.cpp:163:2:163:4 | MergeFromString output argument | +| protobuf.cpp:170:22:170:25 | *data | protobuf.cpp:170:2:170:4 | MergeFromString output argument | +| protobuf.cpp:177:29:177:32 | data | protobuf.cpp:177:2:177:4 | MergePartialFromString output argument | +| protobuf.cpp:184:29:184:32 | *data | protobuf.cpp:184:2:184:4 | MergePartialFromString output argument | +| protobuf.cpp:191:21:191:31 | *call to data | protobuf.cpp:191:2:191:4 | ParseFromArray output argument | +| protobuf.cpp:198:28:198:38 | *call to data | protobuf.cpp:198:2:198:4 | ParsePartialFromArray output argument | +| protobuf.cpp:205:20:205:23 | *data | protobuf.cpp:205:2:205:4 | ParseFromCord output argument | +| protobuf.cpp:212:27:212:30 | *data | protobuf.cpp:212:2:212:4 | ParsePartialFromCord output argument | +| protobuf.cpp:219:20:219:23 | *data | protobuf.cpp:219:2:219:4 | MergeFromCord output argument | +| protobuf.cpp:226:27:226:30 | *data | protobuf.cpp:226:2:226:4 | MergePartialFromCord output argument | +| protobuf.cpp:233:23:233:25 | *& ... | protobuf.cpp:233:2:233:4 | ParseFromIstream output argument | +| protobuf.cpp:240:30:240:32 | *& ... | protobuf.cpp:240:2:240:4 | ParsePartialFromIstream output argument | +| protobuf.cpp:247:30:247:32 | *& ... | protobuf.cpp:247:2:247:4 | ParseFromZeroCopyStream output argument | +| protobuf.cpp:254:37:254:39 | *& ... | protobuf.cpp:254:2:254:4 | ParsePartialFromZeroCopyStream output argument | +| protobuf.cpp:261:37:261:39 | *& ... | protobuf.cpp:261:2:261:4 | ParseFromBoundedZeroCopyStream output argument | +| protobuf.cpp:268:44:268:46 | *& ... | protobuf.cpp:268:2:268:4 | ParsePartialFromBoundedZeroCopyStream output argument | +| protobuf.cpp:275:37:275:39 | *& ... | protobuf.cpp:275:2:275:4 | MergeFromBoundedZeroCopyStream output argument | +| protobuf.cpp:282:44:282:46 | *& ... | protobuf.cpp:282:2:282:4 | MergePartialFromBoundedZeroCopyStream output argument | +| protobuf.cpp:289:27:289:29 | *& ... | protobuf.cpp:289:2:289:4 | ParseFromCodedStream output argument | +| protobuf.cpp:296:34:296:36 | *& ... | protobuf.cpp:296:2:296:4 | ParsePartialFromCodedStream output argument | +| protobuf.cpp:303:27:303:29 | *& ... | protobuf.cpp:303:2:303:4 | MergeFromCodedStream output argument | +| protobuf.cpp:310:34:310:36 | *& ... | protobuf.cpp:310:2:310:4 | MergePartialFromCodedStream output argument | +| protobuf.cpp:317:22:317:25 | *data | protobuf.cpp:317:2:317:4 | ParseFromString output argument | +| protobuf.cpp:326:2:326:4 | *msg | protobuf.cpp:326:24:326:27 | SerializeToString output argument | +| protobuf.cpp:333:2:333:4 | *msg | protobuf.cpp:333:31:333:34 | SerializePartialToString output argument | +| protobuf.cpp:340:2:340:4 | *msg | protobuf.cpp:340:21:340:24 | AppendToString output argument | +| protobuf.cpp:347:2:347:4 | *msg | protobuf.cpp:347:28:347:31 | AppendPartialToString output argument | +| protobuf.cpp:354:2:354:4 | *msg | protobuf.cpp:354:24:354:27 | SerializeToString output argument | +| protobuf.cpp:361:2:361:4 | *msg | protobuf.cpp:361:31:361:34 | SerializePartialToString output argument | +| protobuf.cpp:368:2:368:4 | *msg | protobuf.cpp:368:21:368:24 | AppendToString output argument | +| protobuf.cpp:375:2:375:4 | *msg | protobuf.cpp:375:28:375:31 | AppendPartialToString output argument | +| protobuf.cpp:382:2:382:4 | *msg | protobuf.cpp:382:23:382:25 | SerializeToArray output argument | +| protobuf.cpp:389:2:389:4 | *msg | protobuf.cpp:389:30:389:32 | SerializePartialToArray output argument | +| protobuf.cpp:396:2:396:4 | *msg | protobuf.cpp:396:22:396:25 | SerializeToCord output argument | +| protobuf.cpp:403:2:403:4 | *msg | protobuf.cpp:403:29:403:32 | SerializePartialToCord output argument | +| protobuf.cpp:410:2:410:4 | *msg | protobuf.cpp:410:19:410:22 | AppendToCord output argument | +| protobuf.cpp:417:2:417:4 | *msg | protobuf.cpp:417:26:417:29 | AppendPartialToCord output argument | +| protobuf.cpp:424:2:424:4 | *msg | protobuf.cpp:424:25:424:28 | SerializeToOstream output argument | +| protobuf.cpp:431:2:431:4 | *msg | protobuf.cpp:431:32:431:35 | SerializePartialToOstream output argument | +| protobuf.cpp:438:2:438:4 | *msg | protobuf.cpp:438:32:438:35 | SerializeToZeroCopyStream output argument | +| protobuf.cpp:445:2:445:4 | *msg | protobuf.cpp:445:39:445:42 | SerializePartialToZeroCopyStream output argument | +| protobuf.cpp:452:2:452:4 | *msg | protobuf.cpp:452:29:452:32 | SerializeToCodedStream output argument | +| protobuf.cpp:459:2:459:4 | *msg | protobuf.cpp:459:36:459:39 | SerializePartialToCodedStream output argument | +| protobuf.cpp:467:7:467:9 | *msg | protobuf.cpp:467:11:467:27 | call to SerializeAsString | +| protobuf.cpp:472:7:472:9 | *msg | protobuf.cpp:472:11:472:34 | call to SerializePartialAsString | +| protobuf.cpp:477:7:477:9 | *msg | protobuf.cpp:477:11:477:25 | call to SerializeAsCord | +| protobuf.cpp:482:7:482:9 | *msg | protobuf.cpp:482:11:482:32 | call to SerializePartialAsCord | +| protobuf.cpp:487:7:487:9 | *msg | protobuf.cpp:487:11:487:27 | call to SerializeAsString | | test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | | test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | | test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body |