mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Go: exclude protobuf read steps from cleartext-logging query
This query already treats structs differently to usual: it includes field -> whole struct taint steps, but explicitly excludes struct -> field steps. This means that a logging framework sinking an entire struct with a tainted field yields an alert, but we don't get FPs caused by writing field `x` but then reading field `y`. However, protobuf messages have a special treatment, with taint usually associated with the whole struct and getter methods propagating that taint out. Suppressing these getter method steps specifically for the cleartext-logging query mirrors its treatment of structs in general and avoids this sort of field-mismatch FP. On the downside we will miss same-field propagation like `m.field = password; Log(m.GetField())` if we don't have source code for the implementation of `m`. However this is hopefully unusual since the typical use of protobufs is to serialize and deserialize, rather than using the struct as a general-purpose datastructure.
This commit is contained in:
@@ -123,21 +123,21 @@ module Protobuf {
|
||||
}
|
||||
|
||||
/** A `Get` method of a protobuf `Message` type. */
|
||||
private class GetMethod extends DataFlow::FunctionModel, Method {
|
||||
class GetMethod extends TaintTracking::FunctionModel, Method {
|
||||
GetMethod() {
|
||||
exists(string name | name.matches("Get%") | this = any(MessageType msg).getMethod(name))
|
||||
}
|
||||
|
||||
override predicate hasDataFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
inp.isReceiver() and outp.isResult()
|
||||
}
|
||||
}
|
||||
|
||||
/** A `ProtoReflect` method of a protobuf `Message` type. */
|
||||
private class ProtoReflectMethod extends DataFlow::FunctionModel, Method {
|
||||
private class ProtoReflectMethod extends TaintTracking::FunctionModel, Method {
|
||||
ProtoReflectMethod() { this = any(MessageType msg).getMethod("ProtoReflect") }
|
||||
|
||||
override predicate hasDataFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
override predicate hasTaintFlow(FunctionInput inp, FunctionOutput outp) {
|
||||
inp.isReceiver() and outp.isResult()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
import go
|
||||
private import semmle.go.frameworks.Protobuf
|
||||
|
||||
/**
|
||||
* Provides a data-flow tracking configuration for reasoning about
|
||||
@@ -48,8 +49,12 @@ module CleartextLogging {
|
||||
write.writesField(trg.(DataFlow::PostUpdateNode).getPreUpdateNode(), _, src)
|
||||
)
|
||||
or
|
||||
// taint steps that do not include flow through fields
|
||||
TaintTracking::localTaintStep(src, trg) and not TaintTracking::fieldReadStep(src, trg)
|
||||
// taint steps that do not include flow through fields. Field reads would produce FPs due to
|
||||
// the additional taint step above that taints whole structs from individual field writes.
|
||||
TaintTracking::localTaintStep(src, trg) and
|
||||
not TaintTracking::fieldReadStep(src, trg) and
|
||||
// Also exclude protobuf field fetches, since they amount to single field reads.
|
||||
not any(Protobuf::GetMethod gm).taintStep(src, trg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,25 @@ edges
|
||||
| passwords.go:122:13:122:25 | call to getPassword : string | passwords.go:125:14:125:19 | config |
|
||||
| passwords.go:126:14:126:19 | config [x] : string | passwords.go:126:14:126:21 | selection of x |
|
||||
| passwords.go:127:14:127:19 | config [y] : string | passwords.go:127:14:127:21 | selection of y |
|
||||
| protobuf.go:11:2:11:6 | definition of query [pointer, Description] : string | protobuf.go:12:2:12:6 | query [pointer, Description] : string |
|
||||
| protobuf.go:11:2:11:6 | definition of query [pointer, Description] : string | protobuf.go:14:14:14:18 | query [pointer, Description] : string |
|
||||
| protobuf.go:11:2:11:6 | definition of query [pointer] : Query | protobuf.go:12:2:12:6 | query [pointer] : Query |
|
||||
| protobuf.go:12:2:12:6 | implicit dereference : Query | protobuf.go:11:2:11:6 | definition of query [pointer] : Query |
|
||||
| protobuf.go:12:2:12:6 | implicit dereference : Query | protobuf.go:12:2:12:6 | implicit dereference : Query |
|
||||
| protobuf.go:12:2:12:6 | implicit dereference : Query | protobuf.go:14:14:14:35 | call to GetDescription |
|
||||
| protobuf.go:12:2:12:6 | implicit dereference : Query | protobuf.go:15:14:15:26 | call to GetId |
|
||||
| protobuf.go:12:2:12:6 | implicit dereference [Description] : string | protobuf.go:11:2:11:6 | definition of query [pointer, Description] : string |
|
||||
| protobuf.go:12:2:12:6 | query [pointer, Description] : string | protobuf.go:12:2:12:6 | implicit dereference [Description] : string |
|
||||
| protobuf.go:12:2:12:6 | query [pointer] : Query | protobuf.go:12:2:12:6 | implicit dereference : Query |
|
||||
| protobuf.go:12:22:12:29 | password : string | protobuf.go:12:2:12:6 | implicit dereference : Query |
|
||||
| protobuf.go:12:22:12:29 | password : string | protobuf.go:12:2:12:6 | implicit dereference [Description] : string |
|
||||
| protobuf.go:12:22:12:29 | password : string | protobuf.go:14:14:14:35 | call to GetDescription |
|
||||
| protobuf.go:12:22:12:29 | password : string | protobuf.go:15:14:15:26 | call to GetId |
|
||||
| protobuf.go:14:14:14:18 | query [pointer, Description] : string | protobuf.go:14:14:14:35 | call to GetDescription |
|
||||
| protobuf.go:14:14:14:18 | query [pointer, Description] : string | protos/query/query.pb.go:117:7:117:7 | definition of x [pointer, Description] : string |
|
||||
| protos/query/query.pb.go:117:7:117:7 | definition of x [pointer, Description] : string | protos/query/query.pb.go:119:10:119:10 | x [pointer, Description] : string |
|
||||
| protos/query/query.pb.go:119:10:119:10 | implicit dereference [Description] : string | protos/query/query.pb.go:119:10:119:22 | selection of Description : string |
|
||||
| protos/query/query.pb.go:119:10:119:10 | x [pointer, Description] : string | protos/query/query.pb.go:119:10:119:10 | implicit dereference [Description] : string |
|
||||
| util.go:16:9:16:18 | selection of password : string | passwords.go:28:14:28:28 | call to getPassword |
|
||||
nodes
|
||||
| klog.go:20:30:20:37 | selection of Header : Header | semmle.label | selection of Header : Header |
|
||||
@@ -77,8 +96,23 @@ nodes
|
||||
| passwords.go:126:14:126:21 | selection of x | semmle.label | selection of x |
|
||||
| passwords.go:127:14:127:19 | config [y] : string | semmle.label | config [y] : string |
|
||||
| passwords.go:127:14:127:21 | selection of y | semmle.label | selection of y |
|
||||
| protobuf.go:11:2:11:6 | definition of query [pointer, Description] : string | semmle.label | definition of query [pointer, Description] : string |
|
||||
| protobuf.go:11:2:11:6 | definition of query [pointer] : Query | semmle.label | definition of query [pointer] : Query |
|
||||
| protobuf.go:12:2:12:6 | implicit dereference : Query | semmle.label | implicit dereference : Query |
|
||||
| protobuf.go:12:2:12:6 | implicit dereference [Description] : string | semmle.label | implicit dereference [Description] : string |
|
||||
| protobuf.go:12:2:12:6 | query [pointer, Description] : string | semmle.label | query [pointer, Description] : string |
|
||||
| protobuf.go:12:2:12:6 | query [pointer] : Query | semmle.label | query [pointer] : Query |
|
||||
| protobuf.go:12:22:12:29 | password : string | semmle.label | password : string |
|
||||
| protobuf.go:14:14:14:18 | query [pointer, Description] : string | semmle.label | query [pointer, Description] : string |
|
||||
| protobuf.go:14:14:14:35 | call to GetDescription | semmle.label | call to GetDescription |
|
||||
| protobuf.go:15:14:15:26 | call to GetId | semmle.label | call to GetId |
|
||||
| protos/query/query.pb.go:117:7:117:7 | definition of x [pointer, Description] : string | semmle.label | definition of x [pointer, Description] : string |
|
||||
| protos/query/query.pb.go:119:10:119:10 | implicit dereference [Description] : string | semmle.label | implicit dereference [Description] : string |
|
||||
| protos/query/query.pb.go:119:10:119:10 | x [pointer, Description] : string | semmle.label | x [pointer, Description] : string |
|
||||
| protos/query/query.pb.go:119:10:119:22 | selection of Description : string | semmle.label | selection of Description : string |
|
||||
| util.go:16:9:16:18 | selection of password : string | semmle.label | selection of password : string |
|
||||
subpaths
|
||||
| protobuf.go:14:14:14:18 | query [pointer, Description] : string | protos/query/query.pb.go:117:7:117:7 | definition of x [pointer, Description] : string | protos/query/query.pb.go:119:10:119:22 | selection of Description : string | protobuf.go:14:14:14:35 | call to GetDescription : string |
|
||||
#select
|
||||
| klog.go:22:15:22:20 | header | klog.go:20:30:20:37 | selection of Header : Header | klog.go:22:15:22:20 | header | $@ flows to a logging call. | klog.go:20:30:20:37 | selection of Header | Sensitive data returned by HTTP request headers |
|
||||
| klog.go:28:13:28:41 | call to Get | klog.go:28:13:28:20 | selection of Header : Header | klog.go:28:13:28:41 | call to Get | $@ flows to a logging call. | klog.go:28:13:28:20 | selection of Header | Sensitive data returned by HTTP request headers |
|
||||
@@ -111,3 +145,5 @@ subpaths
|
||||
| passwords.go:125:14:125:19 | config | passwords.go:122:13:122:25 | call to getPassword : string | passwords.go:125:14:125:19 | config | $@ flows to a logging call. | passwords.go:122:13:122:25 | call to getPassword | Sensitive data returned by a call to getPassword |
|
||||
| passwords.go:126:14:126:21 | selection of x | passwords.go:121:13:121:20 | password : string | passwords.go:126:14:126:21 | selection of x | $@ flows to a logging call. | passwords.go:121:13:121:20 | password | Sensitive data returned by an access to password |
|
||||
| passwords.go:127:14:127:21 | selection of y | passwords.go:122:13:122:25 | call to getPassword : string | passwords.go:127:14:127:21 | selection of y | $@ flows to a logging call. | passwords.go:122:13:122:25 | call to getPassword | Sensitive data returned by a call to getPassword |
|
||||
| protobuf.go:14:14:14:35 | call to GetDescription | protobuf.go:12:22:12:29 | password : string | protobuf.go:14:14:14:35 | call to GetDescription | $@ flows to a logging call. | protobuf.go:12:22:12:29 | password | Sensitive data returned by an access to password |
|
||||
| protobuf.go:15:14:15:26 | call to GetId | protobuf.go:12:22:12:29 | password : string | protobuf.go:15:14:15:26 | call to GetId | $@ flows to a logging call. | protobuf.go:12:22:12:29 | password | Sensitive data returned by an access to password |
|
||||
|
||||
@@ -6,4 +6,6 @@ require (
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
|
||||
github.com/sirupsen/logrus v1.5.0
|
||||
k8s.io/klog v1.0.0
|
||||
github.com/golang/protobuf v1.4.2
|
||||
google.golang.org/protobuf v1.23.0
|
||||
)
|
||||
|
||||
16
go/ql/test/query-tests/Security/CWE-312/protobuf.go
Normal file
16
go/ql/test/query-tests/Security/CWE-312/protobuf.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"main/protos/query"
|
||||
)
|
||||
|
||||
func testProtobuf() {
|
||||
password := "P@ssw0rd"
|
||||
|
||||
query := &query.Query{}
|
||||
query.Description = password
|
||||
|
||||
log.Println(query.GetDescription()) // NOT OK
|
||||
log.Println(query.GetId()) // OK
|
||||
}
|
||||
25
go/ql/test/query-tests/Security/CWE-312/protos/query.proto
Normal file
25
go/ql/test/query-tests/Security/CWE-312/protos/query.proto
Normal file
@@ -0,0 +1,25 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "protos/query";
|
||||
|
||||
message Query {
|
||||
string description = 1;
|
||||
string id = 2;
|
||||
|
||||
enum Severity {
|
||||
ERROR = 0;
|
||||
WARNING = 1;
|
||||
}
|
||||
|
||||
message Alert {
|
||||
string msg = 1;
|
||||
int64 loc = 2;
|
||||
}
|
||||
|
||||
repeated Alert alerts = 4;
|
||||
|
||||
map<int32, string> keyValuePairs = 5;
|
||||
}
|
||||
|
||||
message QuerySuite {
|
||||
repeated Query queries = 1;
|
||||
}
|
||||
371
go/ql/test/query-tests/Security/CWE-312/protos/query/query.pb.go
Normal file
371
go/ql/test/query-tests/Security/CWE-312/protos/query/query.pb.go
Normal file
@@ -0,0 +1,371 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.25.0-devel
|
||||
// protoc v3.12.4
|
||||
// source: query.proto
|
||||
|
||||
package query
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type Query_Severity int32
|
||||
|
||||
const (
|
||||
Query_ERROR Query_Severity = 0
|
||||
Query_WARNING Query_Severity = 1
|
||||
)
|
||||
|
||||
// Enum value maps for Query_Severity.
|
||||
var (
|
||||
Query_Severity_name = map[int32]string{
|
||||
0: "ERROR",
|
||||
1: "WARNING",
|
||||
}
|
||||
Query_Severity_value = map[string]int32{
|
||||
"ERROR": 0,
|
||||
"WARNING": 1,
|
||||
}
|
||||
)
|
||||
|
||||
func (x Query_Severity) Enum() *Query_Severity {
|
||||
p := new(Query_Severity)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x Query_Severity) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (Query_Severity) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_query_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (Query_Severity) Type() protoreflect.EnumType {
|
||||
return &file_query_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x Query_Severity) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Query_Severity.Descriptor instead.
|
||||
func (Query_Severity) EnumDescriptor() ([]byte, []int) {
|
||||
return file_query_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
type Query struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Alerts []*Query_Alert `protobuf:"bytes,4,rep,name=alerts,proto3" json:"alerts,omitempty"`
|
||||
KeyValuePairs map[int32]string `protobuf:"bytes,5,rep,name=keyValuePairs,proto3" json:"keyValuePairs,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (x *Query) Reset() {
|
||||
*x = Query{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_query_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Query) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Query) ProtoMessage() {}
|
||||
|
||||
func (x *Query) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_query_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Query.ProtoReflect.Descriptor instead.
|
||||
func (*Query) Descriptor() ([]byte, []int) {
|
||||
return file_query_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Query) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Query) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Query) GetAlerts() []*Query_Alert {
|
||||
if x != nil {
|
||||
return x.Alerts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Query) GetKeyValuePairs() map[int32]string {
|
||||
if x != nil {
|
||||
return x.KeyValuePairs
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type QuerySuite struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"`
|
||||
}
|
||||
|
||||
func (x *QuerySuite) Reset() {
|
||||
*x = QuerySuite{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_query_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *QuerySuite) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*QuerySuite) ProtoMessage() {}
|
||||
|
||||
func (x *QuerySuite) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_query_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use QuerySuite.ProtoReflect.Descriptor instead.
|
||||
func (*QuerySuite) Descriptor() ([]byte, []int) {
|
||||
return file_query_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *QuerySuite) GetQueries() []*Query {
|
||||
if x != nil {
|
||||
return x.Queries
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type Query_Alert struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
Loc int64 `protobuf:"varint,2,opt,name=loc,proto3" json:"loc,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Query_Alert) Reset() {
|
||||
*x = Query_Alert{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_query_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Query_Alert) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Query_Alert) ProtoMessage() {}
|
||||
|
||||
func (x *Query_Alert) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_query_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Query_Alert.ProtoReflect.Descriptor instead.
|
||||
func (*Query_Alert) Descriptor() ([]byte, []int) {
|
||||
return file_query_proto_rawDescGZIP(), []int{0, 0}
|
||||
}
|
||||
|
||||
func (x *Query_Alert) GetMsg() string {
|
||||
if x != nil {
|
||||
return x.Msg
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Query_Alert) GetLoc() int64 {
|
||||
if x != nil {
|
||||
return x.Loc
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_query_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_query_proto_rawDesc = []byte{
|
||||
0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x02,
|
||||
0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
|
||||
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
|
||||
0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x24, 0x0a, 0x06, 0x61, 0x6c, 0x65,
|
||||
0x72, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x51, 0x75, 0x65, 0x72,
|
||||
0x79, 0x2e, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x52, 0x06, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x12,
|
||||
0x3f, 0x0a, 0x0d, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73,
|
||||
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x4b,
|
||||
0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
||||
0x79, 0x52, 0x0d, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73,
|
||||
0x1a, 0x2b, 0x0a, 0x05, 0x41, 0x6c, 0x65, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x6c,
|
||||
0x6f, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6c, 0x6f, 0x63, 0x1a, 0x40, 0x0a,
|
||||
0x12, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x73, 0x45, 0x6e,
|
||||
0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22,
|
||||
0x22, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x09, 0x0a, 0x05, 0x45,
|
||||
0x52, 0x52, 0x4f, 0x52, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e,
|
||||
0x47, 0x10, 0x01, 0x22, 0x2e, 0x0a, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x75, 0x69, 0x74,
|
||||
0x65, 0x12, 0x20, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x06, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72,
|
||||
0x69, 0x65, 0x73, 0x42, 0x0e, 0x5a, 0x0c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x71, 0x75,
|
||||
0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_query_proto_rawDescOnce sync.Once
|
||||
file_query_proto_rawDescData = file_query_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_query_proto_rawDescGZIP() []byte {
|
||||
file_query_proto_rawDescOnce.Do(func() {
|
||||
file_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_query_proto_rawDescData)
|
||||
})
|
||||
return file_query_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_query_proto_goTypes = []interface{}{
|
||||
(Query_Severity)(0), // 0: Query.Severity
|
||||
(*Query)(nil), // 1: Query
|
||||
(*QuerySuite)(nil), // 2: QuerySuite
|
||||
(*Query_Alert)(nil), // 3: Query.Alert
|
||||
nil, // 4: Query.KeyValuePairsEntry
|
||||
}
|
||||
var file_query_proto_depIdxs = []int32{
|
||||
3, // 0: Query.alerts:type_name -> Query.Alert
|
||||
4, // 1: Query.keyValuePairs:type_name -> Query.KeyValuePairsEntry
|
||||
1, // 2: QuerySuite.queries:type_name -> Query
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_query_proto_init() }
|
||||
func file_query_proto_init() {
|
||||
if File_query_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Query); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QuerySuite); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Query_Alert); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_query_proto_rawDesc,
|
||||
NumEnums: 1,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_query_proto_goTypes,
|
||||
DependencyIndexes: file_query_proto_depIdxs,
|
||||
EnumInfos: file_query_proto_enumTypes,
|
||||
MessageInfos: file_query_proto_msgTypes,
|
||||
}.Build()
|
||||
File_query_proto = out.File
|
||||
file_query_proto_rawDesc = nil
|
||||
file_query_proto_goTypes = nil
|
||||
file_query_proto_depIdxs = nil
|
||||
}
|
||||
28
go/ql/test/query-tests/Security/CWE-312/vendor/github.com/golang/protobuf/LICENSE
generated
vendored
Normal file
28
go/ql/test/query-tests/Security/CWE-312/vendor/github.com/golang/protobuf/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
Copyright 2010 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
29
go/ql/test/query-tests/Security/CWE-312/vendor/github.com/golang/protobuf/proto/stub.go
generated
vendored
Normal file
29
go/ql/test/query-tests/Security/CWE-312/vendor/github.com/golang/protobuf/proto/stub.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// This is a simple stub for github.com/golang/protobuf/proto, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: github.com/golang/protobuf/proto (exports: Message; functions: Marshal,Unmarshal,ProtoPackageIsVersion4)
|
||||
|
||||
// Package proto is a stub of github.com/golang/protobuf/proto
|
||||
package proto
|
||||
|
||||
import (
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
func Marshal(_ interface{}) ([]byte, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type Message = protoiface.MessageV1
|
||||
|
||||
const ProtoPackageIsVersion4 bool = false
|
||||
|
||||
func Unmarshal(_ []byte, _ interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Clone(_ Message) Message {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Merge(_, _ Message) {}
|
||||
27
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/LICENSE
generated
vendored
Normal file
27
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright (c) 2018 The Go Authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following disclaimer
|
||||
in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
132
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/internal/impl/stub.go
generated
vendored
Normal file
132
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/internal/impl/stub.go
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
// This is a simple stub for google.golang.org/protobuf/internal/impl, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: google.golang.org/protobuf/internal/impl (exports: MessageState,Pointer; functions: )
|
||||
|
||||
// Package impl is a stub of google.golang.org/protobuf/internal/impl.
|
||||
package impl
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
)
|
||||
|
||||
type MessageState struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
DoNotCompare interface{}
|
||||
DoNotCopy interface{}
|
||||
}
|
||||
|
||||
type Pointer interface{}
|
||||
|
||||
type MessageInfo struct {
|
||||
Exporter interface{}
|
||||
}
|
||||
|
||||
func (*MessageInfo) MessageOf(_ interface{}) protoreflect.Message { return nil }
|
||||
|
||||
type EnumInfo struct{}
|
||||
|
||||
func (_ *EnumInfo) Descriptor() protoreflect.EnumDescriptor { return nil }
|
||||
func (_ *EnumInfo) New(_ protoreflect.EnumNumber) protoreflect.Enum { return nil }
|
||||
|
||||
type DescBuilder struct {
|
||||
GoPackagePath string
|
||||
RawDescriptor []byte
|
||||
NumEnums int
|
||||
NumMessages int
|
||||
NumExtensions int
|
||||
NumServices int
|
||||
}
|
||||
|
||||
type TypeBuilder struct {
|
||||
File DescBuilder
|
||||
GoTypes []interface{}
|
||||
DependencyIndexes []int32
|
||||
EnumInfos []EnumInfo
|
||||
MessageInfos []MessageInfo
|
||||
}
|
||||
|
||||
type BuilderOut struct {
|
||||
File protoreflect.FileDescriptor
|
||||
}
|
||||
|
||||
func (tb TypeBuilder) Build() BuilderOut {
|
||||
return BuilderOut{nil}
|
||||
}
|
||||
|
||||
func (ms *MessageState) LoadMessageInfo() *MessageInfo { return nil }
|
||||
func (ms *MessageState) StoreMessageInfo(mi *MessageInfo) {}
|
||||
|
||||
func (ms *MessageState) Clear(_ protoreflect.FieldDescriptor) {}
|
||||
func (ms *MessageState) Descriptor() protoreflect.MessageDescriptor { return nil }
|
||||
func (ms *MessageState) Get(_ protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
return protoreflect.Value{}
|
||||
}
|
||||
func (ms *MessageState) GetUnknown() protoreflect.RawFields { return nil }
|
||||
func (ms *MessageState) Has(_ protoreflect.FieldDescriptor) bool { return false }
|
||||
func (ms *MessageState) Interface() protoreflect.ProtoMessage { return nil }
|
||||
func (ms *MessageState) IsValid() bool { return false }
|
||||
func (ms *MessageState) Mutable(_ protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
return protoreflect.Value{}
|
||||
}
|
||||
func (ms *MessageState) New() protoreflect.Message { return nil }
|
||||
func (ms *MessageState) NewField(_ protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
return protoreflect.Value{}
|
||||
}
|
||||
func (ms *MessageState) ProtoMethods() *struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Flags uint64
|
||||
Size func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message protoreflect.Message
|
||||
Flags byte
|
||||
}) struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Size int
|
||||
}
|
||||
Marshal func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message protoreflect.Message
|
||||
Buf []byte
|
||||
Flags byte
|
||||
}) (struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Buf []byte
|
||||
}, error)
|
||||
Unmarshal func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message protoreflect.Message
|
||||
Buf []byte
|
||||
Flags byte
|
||||
Resolver interface {
|
||||
FindExtensionByName(_ protoreflect.FullName) (protoreflect.ExtensionType, error)
|
||||
FindExtensionByNumber(_ protoreflect.FullName, _ interface{}) (protoreflect.ExtensionType, error)
|
||||
}
|
||||
}) (struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Flags byte
|
||||
}, error)
|
||||
Merge func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Source protoreflect.Message
|
||||
Destination protoreflect.Message
|
||||
}) struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Flags byte
|
||||
}
|
||||
CheckInitialized func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message protoreflect.Message
|
||||
}) (struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
}, error)
|
||||
} {
|
||||
return nil
|
||||
}
|
||||
func (ms *MessageState) Range(_ func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {}
|
||||
func (ms *MessageState) Set(_ protoreflect.FieldDescriptor, _ protoreflect.Value) {}
|
||||
func (ms *MessageState) SetUnknown(_ protoreflect.RawFields) {}
|
||||
func (ms *MessageState) Type() protoreflect.MessageType { return nil }
|
||||
func (ms *MessageState) WhichOneof(_ protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
return nil
|
||||
}
|
||||
68
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/proto/stub.go
generated
vendored
Normal file
68
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/proto/stub.go
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
// This is a simple stub for github.com/golang/protobuf/proto, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: github.com/golang/protobuf/proto (exports: Message; functions: Marshal,Unmarshal,ProtoPackageIsVersion4)
|
||||
|
||||
// Package proto is a stub of github.com/golang/protobuf/proto.
|
||||
package proto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
func Marshal(_ interface{}) ([]byte, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type Message = protoreflect.ProtoMessage
|
||||
|
||||
var ProtoPackageIsVersion4 bool = false
|
||||
|
||||
func Unmarshal(_ []byte, _ interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type MarshalOptions struct {
|
||||
AllowPartial bool
|
||||
Deterministic bool
|
||||
UseCachedSize bool
|
||||
}
|
||||
|
||||
func (_ MarshalOptions) Marshal(_ Message) ([]byte, error) { return nil, nil }
|
||||
func (_ MarshalOptions) MarshalAppend(b []byte, m Message) ([]byte, error) { return nil, nil }
|
||||
func (_ MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.MarshalOutput, error) {
|
||||
return protoiface.MarshalOutput{nil}, nil
|
||||
}
|
||||
|
||||
type UnmarshalOptions struct {
|
||||
// Merge merges the input into the destination message.
|
||||
// The default behavior is to always reset the message before unmarshaling,
|
||||
// unless Merge is specified.
|
||||
Merge bool
|
||||
|
||||
// AllowPartial accepts input for messages that will result in missing
|
||||
// required fields. If AllowPartial is false (the default), Unmarshal will
|
||||
// return an error if there are any missing required fields.
|
||||
AllowPartial bool
|
||||
|
||||
// If DiscardUnknown is set, unknown fields are ignored.
|
||||
DiscardUnknown bool
|
||||
|
||||
// Resolver is used for looking up types when unmarshaling extension fields.
|
||||
// If nil, this defaults to using protoregistry.GlobalTypes.
|
||||
Resolver interface {
|
||||
FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
|
||||
FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
|
||||
}
|
||||
}
|
||||
|
||||
func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Clone(_ Message) Message {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Merge(_, _ Message) {}
|
||||
683
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/reflect/protoreflect/stub.go
generated
vendored
Normal file
683
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/reflect/protoreflect/stub.go
generated
vendored
Normal file
@@ -0,0 +1,683 @@
|
||||
// Code generated by depstubber. DO NOT EDIT.
|
||||
// This is a simple stub for google.golang.org/protobuf/reflect/protoreflect, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: google.golang.org/protobuf/reflect/protoreflect (exports: EnumDescriptor,EnumType,EnumNumber,Message,FileDescriptor; functions: )
|
||||
|
||||
// Package protoreflect is a stub of google.golang.org/protobuf/reflect/protoreflect, generated by depstubber.
|
||||
package protoreflect
|
||||
|
||||
import ()
|
||||
|
||||
type Cardinality int8
|
||||
|
||||
func (_ Cardinality) GoString() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ Cardinality) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ Cardinality) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type Descriptor interface {
|
||||
FullName() FullName
|
||||
Index() int
|
||||
IsPlaceholder() bool
|
||||
Name() Name
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type Enum interface {
|
||||
Descriptor() EnumDescriptor
|
||||
Number() EnumNumber
|
||||
Type() EnumType
|
||||
}
|
||||
|
||||
type EnumDescriptor interface {
|
||||
FullName() FullName
|
||||
Index() int
|
||||
IsPlaceholder() bool
|
||||
Name() Name
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ EnumDescriptor)
|
||||
ReservedNames() Names
|
||||
ReservedRanges() EnumRanges
|
||||
Syntax() Syntax
|
||||
Values() EnumValueDescriptors
|
||||
}
|
||||
|
||||
type EnumDescriptors interface {
|
||||
ByName(_ Name) EnumDescriptor
|
||||
Get(_ int) EnumDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type EnumNumber int32
|
||||
|
||||
type EnumRanges interface {
|
||||
Get(_ int) [2]EnumNumber
|
||||
Has(_ EnumNumber) bool
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type EnumType interface {
|
||||
Descriptor() EnumDescriptor
|
||||
New(_ EnumNumber) Enum
|
||||
}
|
||||
|
||||
type EnumValueDescriptor interface {
|
||||
FullName() FullName
|
||||
Index() int
|
||||
IsPlaceholder() bool
|
||||
Name() Name
|
||||
Number() EnumNumber
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ EnumValueDescriptor)
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type EnumValueDescriptors interface {
|
||||
ByName(_ Name) EnumValueDescriptor
|
||||
ByNumber(_ EnumNumber) EnumValueDescriptor
|
||||
Get(_ int) EnumValueDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type ExtensionDescriptors interface {
|
||||
ByName(_ Name) FieldDescriptor
|
||||
Get(_ int) FieldDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type ExtensionType interface {
|
||||
InterfaceOf(_ Value) interface{}
|
||||
IsValidInterface(_ interface{}) bool
|
||||
IsValidValue(_ Value) bool
|
||||
New() Value
|
||||
TypeDescriptor() ExtensionTypeDescriptor
|
||||
ValueOf(_ interface{}) Value
|
||||
Zero() Value
|
||||
}
|
||||
|
||||
type ExtensionTypeDescriptor interface {
|
||||
Cardinality() Cardinality
|
||||
ContainingMessage() MessageDescriptor
|
||||
ContainingOneof() OneofDescriptor
|
||||
Default() Value
|
||||
DefaultEnumValue() EnumValueDescriptor
|
||||
Descriptor() FieldDescriptor
|
||||
Enum() EnumDescriptor
|
||||
FullName() FullName
|
||||
HasDefault() bool
|
||||
HasJSONName() bool
|
||||
HasOptionalKeyword() bool
|
||||
HasPresence() bool
|
||||
Index() int
|
||||
IsExtension() bool
|
||||
IsList() bool
|
||||
IsMap() bool
|
||||
IsPacked() bool
|
||||
IsPlaceholder() bool
|
||||
IsWeak() bool
|
||||
JSONName() string
|
||||
Kind() Kind
|
||||
MapKey() FieldDescriptor
|
||||
MapValue() FieldDescriptor
|
||||
Message() MessageDescriptor
|
||||
Name() Name
|
||||
Number() interface{}
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ FieldDescriptor)
|
||||
Syntax() Syntax
|
||||
Type() ExtensionType
|
||||
}
|
||||
|
||||
type FieldDescriptor interface {
|
||||
Cardinality() Cardinality
|
||||
ContainingMessage() MessageDescriptor
|
||||
ContainingOneof() OneofDescriptor
|
||||
Default() Value
|
||||
DefaultEnumValue() EnumValueDescriptor
|
||||
Enum() EnumDescriptor
|
||||
FullName() FullName
|
||||
HasDefault() bool
|
||||
HasJSONName() bool
|
||||
HasOptionalKeyword() bool
|
||||
HasPresence() bool
|
||||
Index() int
|
||||
IsExtension() bool
|
||||
IsList() bool
|
||||
IsMap() bool
|
||||
IsPacked() bool
|
||||
IsPlaceholder() bool
|
||||
IsWeak() bool
|
||||
JSONName() string
|
||||
Kind() Kind
|
||||
MapKey() FieldDescriptor
|
||||
MapValue() FieldDescriptor
|
||||
Message() MessageDescriptor
|
||||
Name() Name
|
||||
Number() interface{}
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ FieldDescriptor)
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type FieldDescriptors interface {
|
||||
ByJSONName(_ string) FieldDescriptor
|
||||
ByName(_ Name) FieldDescriptor
|
||||
ByNumber(_ interface{}) FieldDescriptor
|
||||
Get(_ int) FieldDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type FieldNumber int32
|
||||
|
||||
type FieldNumbers interface {
|
||||
Get(_ int) interface{}
|
||||
Has(_ interface{}) bool
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type FieldRanges interface {
|
||||
Get(_ int) [2]interface{}
|
||||
Has(_ interface{}) bool
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type FileDescriptor interface {
|
||||
Enums() EnumDescriptors
|
||||
Extensions() ExtensionDescriptors
|
||||
FullName() FullName
|
||||
Imports() FileImports
|
||||
Index() int
|
||||
IsPlaceholder() bool
|
||||
Messages() MessageDescriptors
|
||||
Name() Name
|
||||
Options() ProtoMessage
|
||||
Package() FullName
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
Path() string
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ FileDescriptor)
|
||||
Services() ServiceDescriptors
|
||||
SourceLocations() SourceLocations
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type FileImport struct {
|
||||
FileDescriptor FileDescriptor
|
||||
IsPublic bool
|
||||
IsWeak bool
|
||||
}
|
||||
|
||||
func (_ FileImport) Enums() EnumDescriptors {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) Extensions() ExtensionDescriptors {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) FullName() FullName {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ FileImport) Imports() FileImports {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) Index() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (_ FileImport) IsPlaceholder() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ FileImport) Messages() MessageDescriptors {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) Name() Name {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ FileImport) Options() ProtoMessage {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) Package() FullName {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ FileImport) Parent() Descriptor {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) ParentFile() FileDescriptor {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) Path() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ FileImport) ProtoInternal(_ interface{}) {}
|
||||
|
||||
func (_ FileImport) ProtoType(_ FileDescriptor) {}
|
||||
|
||||
func (_ FileImport) Services() ServiceDescriptors {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) SourceLocations() SourceLocations {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ FileImport) Syntax() Syntax {
|
||||
return 0
|
||||
}
|
||||
|
||||
type FileImports interface {
|
||||
Get(_ int) FileImport
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type FullName string
|
||||
|
||||
func (_ FullName) Append(_ Name) FullName {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ FullName) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ FullName) Name() Name {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ FullName) Parent() FullName {
|
||||
return ""
|
||||
}
|
||||
|
||||
type Kind int8
|
||||
|
||||
func (_ Kind) GoString() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ Kind) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ Kind) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type List interface {
|
||||
Append(_ Value)
|
||||
AppendMutable() Value
|
||||
Get(_ int) Value
|
||||
IsValid() bool
|
||||
Len() int
|
||||
NewElement() Value
|
||||
Set(_ int, _ Value)
|
||||
Truncate(_ int)
|
||||
}
|
||||
|
||||
type Map interface {
|
||||
Clear(_ MapKey)
|
||||
Get(_ MapKey) Value
|
||||
Has(_ MapKey) bool
|
||||
IsValid() bool
|
||||
Len() int
|
||||
Mutable(_ MapKey) Value
|
||||
NewValue() Value
|
||||
Range(_ func(MapKey, Value) bool)
|
||||
Set(_ MapKey, _ Value)
|
||||
}
|
||||
|
||||
type MapKey struct {
|
||||
DoNotCompare interface{}
|
||||
}
|
||||
|
||||
func (_ MapKey) Bool() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ MapKey) Int() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (_ MapKey) Interface() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ MapKey) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ MapKey) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ MapKey) Uint() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (_ MapKey) Value() Value {
|
||||
return Value{}
|
||||
}
|
||||
|
||||
type Message interface {
|
||||
Clear(_ FieldDescriptor)
|
||||
Descriptor() MessageDescriptor
|
||||
Get(_ FieldDescriptor) Value
|
||||
GetUnknown() RawFields
|
||||
Has(_ FieldDescriptor) bool
|
||||
Interface() ProtoMessage
|
||||
IsValid() bool
|
||||
Mutable(_ FieldDescriptor) Value
|
||||
New() Message
|
||||
NewField(_ FieldDescriptor) Value
|
||||
ProtoMethods() *struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Flags uint64
|
||||
Size func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message Message
|
||||
Flags byte
|
||||
}) struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Size int
|
||||
}
|
||||
Marshal func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message Message
|
||||
Buf []byte
|
||||
Flags byte
|
||||
}) (struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Buf []byte
|
||||
}, error)
|
||||
Unmarshal func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message Message
|
||||
Buf []byte
|
||||
Flags byte
|
||||
Resolver interface {
|
||||
FindExtensionByName(_ FullName) (ExtensionType, error)
|
||||
FindExtensionByNumber(_ FullName, _ interface{}) (ExtensionType, error)
|
||||
}
|
||||
}) (struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Flags byte
|
||||
}, error)
|
||||
Merge func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Source Message
|
||||
Destination Message
|
||||
}) struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Flags byte
|
||||
}
|
||||
CheckInitialized func(struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
Message Message
|
||||
}) (struct {
|
||||
NoUnkeyedLiterals interface{}
|
||||
}, error)
|
||||
}
|
||||
Range(_ func(FieldDescriptor, Value) bool)
|
||||
Set(_ FieldDescriptor, _ Value)
|
||||
SetUnknown(_ RawFields)
|
||||
Type() MessageType
|
||||
WhichOneof(_ OneofDescriptor) FieldDescriptor
|
||||
}
|
||||
|
||||
type MessageDescriptor interface {
|
||||
Enums() EnumDescriptors
|
||||
ExtensionRangeOptions(_ int) ProtoMessage
|
||||
ExtensionRanges() FieldRanges
|
||||
Extensions() ExtensionDescriptors
|
||||
Fields() FieldDescriptors
|
||||
FullName() FullName
|
||||
Index() int
|
||||
IsMapEntry() bool
|
||||
IsPlaceholder() bool
|
||||
Messages() MessageDescriptors
|
||||
Name() Name
|
||||
Oneofs() OneofDescriptors
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ MessageDescriptor)
|
||||
RequiredNumbers() FieldNumbers
|
||||
ReservedNames() Names
|
||||
ReservedRanges() FieldRanges
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type MessageDescriptors interface {
|
||||
ByName(_ Name) MessageDescriptor
|
||||
Get(_ int) MessageDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type MessageType interface {
|
||||
Descriptor() MessageDescriptor
|
||||
New() Message
|
||||
Zero() Message
|
||||
}
|
||||
|
||||
type MethodDescriptor interface {
|
||||
FullName() FullName
|
||||
Index() int
|
||||
Input() MessageDescriptor
|
||||
IsPlaceholder() bool
|
||||
IsStreamingClient() bool
|
||||
IsStreamingServer() bool
|
||||
Name() Name
|
||||
Options() ProtoMessage
|
||||
Output() MessageDescriptor
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ MethodDescriptor)
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type MethodDescriptors interface {
|
||||
ByName(_ Name) MethodDescriptor
|
||||
Get(_ int) MethodDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type Name string
|
||||
|
||||
func (_ Name) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type Names interface {
|
||||
Get(_ int) Name
|
||||
Has(_ Name) bool
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type OneofDescriptor interface {
|
||||
Fields() FieldDescriptors
|
||||
FullName() FullName
|
||||
Index() int
|
||||
IsPlaceholder() bool
|
||||
IsSynthetic() bool
|
||||
Name() Name
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ OneofDescriptor)
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type OneofDescriptors interface {
|
||||
ByName(_ Name) OneofDescriptor
|
||||
Get(_ int) OneofDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type ProtoMessage interface {
|
||||
ProtoReflect() Message
|
||||
}
|
||||
|
||||
type RawFields []byte
|
||||
|
||||
func (_ RawFields) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type ServiceDescriptor interface {
|
||||
FullName() FullName
|
||||
Index() int
|
||||
IsPlaceholder() bool
|
||||
Methods() MethodDescriptors
|
||||
Name() Name
|
||||
Options() ProtoMessage
|
||||
Parent() Descriptor
|
||||
ParentFile() FileDescriptor
|
||||
ProtoInternal(_ interface{})
|
||||
ProtoType(_ ServiceDescriptor)
|
||||
Syntax() Syntax
|
||||
}
|
||||
|
||||
type ServiceDescriptors interface {
|
||||
ByName(_ Name) ServiceDescriptor
|
||||
Get(_ int) ServiceDescriptor
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type SourceLocation struct {
|
||||
Path SourcePath
|
||||
StartLine int
|
||||
StartColumn int
|
||||
EndLine int
|
||||
EndColumn int
|
||||
LeadingDetachedComments []string
|
||||
LeadingComments string
|
||||
TrailingComments string
|
||||
}
|
||||
|
||||
type SourceLocations interface {
|
||||
Get(_ int) SourceLocation
|
||||
Len() int
|
||||
ProtoInternal(_ interface{})
|
||||
}
|
||||
|
||||
type SourcePath []int32
|
||||
|
||||
type Syntax int8
|
||||
|
||||
func (_ Syntax) GoString() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ Syntax) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ Syntax) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type Value struct {
|
||||
DoNotCompare interface{}
|
||||
}
|
||||
|
||||
func (_ Value) Bool() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ Value) Bytes() []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ Value) Enum() EnumNumber {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (_ Value) Float() float64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (_ Value) Int() int64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (_ Value) Interface() interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ Value) IsValid() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (_ Value) List() List {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ Value) Map() Map {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ Value) MapKey() MapKey {
|
||||
return MapKey{}
|
||||
}
|
||||
|
||||
func (_ Value) Message() Message {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (_ Value) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (_ Value) Uint() uint64 {
|
||||
return 0
|
||||
}
|
||||
29
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/runtime/protoiface/stub.go
generated
vendored
Normal file
29
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/runtime/protoiface/stub.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// This is a simple stub for google.golang.org/protobuf/runtime/protoiface, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: google.golang.org/protobuf/runtime/protoiface (exports: MessageV1; functions: )
|
||||
|
||||
// Package protoiface is a stub of google.golang.org/protobuf/runtime/protoiface.
|
||||
package protoiface
|
||||
|
||||
import (
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
)
|
||||
|
||||
type MessageV1 interface {
|
||||
ProtoMessage()
|
||||
Reset()
|
||||
String() string
|
||||
}
|
||||
|
||||
type MarshalInputFlags = uint8
|
||||
|
||||
type MarshalInput struct {
|
||||
Message protoreflect.Message
|
||||
Buf []byte // output is appended to this buffer
|
||||
Flags MarshalInputFlags
|
||||
}
|
||||
|
||||
type MarshalOutput struct {
|
||||
Buf []byte // contains marshaled message
|
||||
}
|
||||
107
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/runtime/protoimpl/stub.go
generated
vendored
Normal file
107
go/ql/test/query-tests/Security/CWE-312/vendor/google.golang.org/protobuf/runtime/protoimpl/stub.go
generated
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
// This is a simple stub for google.golang.org/protobuf/runtime/protoimpl, strictly for use in testing.
|
||||
|
||||
// See the LICENSE file for information about the licensing of the original library.
|
||||
// Source: google.golang.org/protobuf/runtime/protoimpl (exports: MessageState,SizeCache,UnknownFields,Pointer,EnforceVersion; functions: MinVersion,MaxVersion,UnsafeEnabled,X)
|
||||
|
||||
// Package protoimpl is a stub of google.golang.org/protobuf/runtime/protoimpl.
|
||||
package protoimpl
|
||||
|
||||
import (
|
||||
impl "google.golang.org/protobuf/internal/impl"
|
||||
)
|
||||
|
||||
type EnforceVersion uint
|
||||
|
||||
const MaxVersion int = 20
|
||||
|
||||
type MessageState = impl.MessageState
|
||||
|
||||
const MinVersion int = 20
|
||||
|
||||
type Pointer = impl.Pointer
|
||||
|
||||
type SizeCache = int32
|
||||
|
||||
type UnknownFields = []byte
|
||||
|
||||
var UnsafeEnabled bool = false
|
||||
|
||||
// Export is a zero-length named type that exists only to export a set of
|
||||
// functions that we do not want to appear in godoc.
|
||||
type Export struct{}
|
||||
|
||||
var X Export = Export{}
|
||||
|
||||
func (Export) NewError(f string, x ...interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
type enum = interface{}
|
||||
|
||||
func (Export) EnumOf(e enum) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) EnumDescriptorOf(e enum) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) EnumTypeOf(e enum) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) EnumStringOf(ed interface{}, n interface{}) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type message = interface{}
|
||||
|
||||
type legacyMessageWrapper struct{ m interface{} }
|
||||
|
||||
func (m legacyMessageWrapper) Reset() {}
|
||||
func (m legacyMessageWrapper) String() string { return "" }
|
||||
func (m legacyMessageWrapper) ProtoMessage() {}
|
||||
|
||||
func (Export) ProtoMessageV1Of(m message) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) protoMessageV2Of(m message) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) ProtoMessageV2Of(m message) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) MessageOf(m message) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) MessageDescriptorOf(m message) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) MessageTypeOf(m message) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) MessageStringOf(m interface{}) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (Export) MessageStateOf(p Pointer) *MessageState {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (Export) CompressGZIP(_ []byte) []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
type EnumInfo = impl.EnumInfo
|
||||
|
||||
type MessageInfo = impl.MessageInfo
|
||||
|
||||
type TypeBuilder = impl.TypeBuilder
|
||||
|
||||
type DescBuilder = impl.DescBuilder
|
||||
@@ -7,3 +7,9 @@ github.com/sirupsen/logrus
|
||||
# k8s.io/klog v1.0.0
|
||||
## explicit
|
||||
k8s.io/klog
|
||||
# github.com/golang/protobuf v1.4.2
|
||||
## explicit
|
||||
github.com/golang/protobuf
|
||||
# google.golang.org/protobuf v1.23.0
|
||||
## explicit
|
||||
google.golang.org/protobuf
|
||||
|
||||
Reference in New Issue
Block a user