code
stringlengths
14
2.05k
label
int64
0
1
programming_language
stringclasses
7 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
98
description
stringlengths
36
379
url
stringlengths
36
48
label_name
stringclasses
2 values
func (fem *FailedEventsManagerT) DropFailedRecordIDs(taskRunID string) { if !failedKeysEnabled { return } // Drop table table := getSqlSafeTablename(taskRunID) sqlStatement := fmt.Sprintf(`DROP TABLE IF EXISTS %s`, table) _, err := fem.dbHandle.Exec(sqlStatement) if err != nil { pkgLogger.Errorf("Failed to ...
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func getSqlSafeTablename(taskRunID string) string { return `"` + strings.ReplaceAll(fmt.Sprintf(`%s_%s`, failedKeysTablePrefix, taskRunID), `"`, `""`) + `"` }
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func (fem *FailedEventsManagerT) FetchFailedRecordIDs(taskRunID string) []*FailedEventRowT { if !failedKeysEnabled { return []*FailedEventRowT{} } failedEvents := make([]*FailedEventRowT, 0) var rows *sql.Rows var err error table := getSqlSafeTablename(taskRunID) sqlStatement := fmt.Sprintf(`SELECT %[1]s.des...
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func handle() { // startReaper() fluid.LogVersion() if pprofAddr != "" { newPprofServer(pprofAddr) } mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, Port: 9443, }) if err != nil { panic(fmt.Sprintf("csi: unab...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func init() { // Register k8s-native resources and Fluid CRDs _ = clientgoscheme.AddToScheme(scheme) _ = datav1alpha1.AddToScheme(scheme) if err := flag.Set("logtostderr", "true"); err != nil { fmt.Printf("Failed to flag.set due to %v", err) os.Exit(1) } startCmd.Flags().StringVarP(&nodeID, "nodeid", "", ""...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func NewDriver(nodeID, endpoint string, client client.Client, apiReader client.Reader, nodeAuthorizedClient *kubernetes.Clientset) *driver { glog.Infof("Driver: %v version: %v", driverName, version) proto, addr := utils.SplitSchemaAddr(endpoint) glog.Infof("protocol: %v addr: %v", proto, addr) if !strings.HasPref...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func (d *driver) newNodeServer() *nodeServer { return &nodeServer{ nodeId: d.nodeId, DefaultNodeServer: csicommon.NewDefaultNodeServer(d.csiDriver), client: d.client, apiReader: d.apiReader, nodeAuthorizedClient: d.nodeAuthorizedClient, } }
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func (ns *nodeServer) getNode() (node *v1.Node, err error) { // Default to allow patch stale node info if envVar, found := os.LookupEnv(AllowPatchStaleNodeEnv); !found || envVar == "true" { if ns.node != nil { glog.V(3).Infof("Found cached node %s", ns.node.Name) return ns.node, nil } } if node, err = ns...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func (ns *nodeServer) patchNodeWithLabel(node *v1.Node, labelsToModify common.LabelsToModify) error { labels := labelsToModify.GetLabels() labelValuePair := map[string]interface{}{} for _, labelToModify := range labels { operationType := labelToModify.GetOperationType() labelToModifyKey := labelToModify.GetLabe...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func (ns *nodeServer) prepareSessMgr(workDir string) error { sessMgrLabelKey := common.SessMgrNodeSelectorKey var labelsToModify common.LabelsToModify labelsToModify.Add(sessMgrLabelKey, "true") node, err := ns.getNode() if err != nil { return errors.Wrapf(err, "can't get node %s", ns.nodeId) } // _, err = u...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func Register(mgr manager.Manager, cfg config.Config) error { client, err := kubelet.InitNodeAuthorizedClient(cfg.KubeletConfigPath) if err != nil { return err } csiDriver := NewDriver(cfg.NodeId, cfg.Endpoint, mgr.GetClient(), mgr.GetAPIReader(), client) if err := mgr.Add(csiDriver); err != nil { return err...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func InitNodeAuthorizedClient(kubeletKubeConfigPath string) (*kubernetes.Clientset, error) { config, err := clientcmd.BuildConfigFromFlags("", kubeletKubeConfigPath) if err != nil { return nil, errors.Wrapf(err, "fail to build kubelet config") } client, err := kubernetes.NewForConfig(config) if err != nil { r...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
func MakeFilterGenerators(serviceInfo *ci.ServiceInfo) ([]FilterGenerator, error) { return []FilterGenerator{ &filtergen.HeaderSanitizerGenerator{}, filtergen.NewCORSGenerator(serviceInfo), // Health check filter is behind Path Matcher filter, since Service Control // filter needs to get the corresponding rul...
1
Go
CWE-287
Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
safe
func (g *HeaderSanitizerGenerator) IsEnabled() bool { return true }
1
Go
CWE-287
Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
safe
func (g *HeaderSanitizerGenerator) GenFilterConfig(serviceInfo *ci.ServiceInfo) (*hcmpb.HttpFilter, error) { a, err := ptypes.MarshalAny(&hspb.FilterConfig{}) if err != nil { return nil, err } return &hcmpb.HttpFilter{ Name: g.FilterName(), ConfigType: &hcmpb.HttpFilter_TypedConfig{TypedConfig: a}, }, ...
1
Go
CWE-287
Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
safe
func (g *HeaderSanitizerGenerator) FilterName() string { return util.HeaderSanitizerScrubber }
1
Go
CWE-287
Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
safe
func (g *HeaderSanitizerGenerator) GenPerRouteConfig(method *ci.MethodInfo, httpRule *httppattern.Pattern) (*anypb.Any, error) { return nil, nil }
1
Go
CWE-287
Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
safe
func AccountPostLogin(w http.ResponseWriter, r *http.Request) { account, err := (&models.Account{Context: ctx.Context}).FromBody(r) if err != nil { ctx.HandleStatus(w, r, err.Error(), http.StatusBadRequest) return } var a1 = &models.Account{Context: ctx.Context} a1.FromData(account) a1, err = a1.Get() if er...
1
Go
CWE-287
Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.
https://cwe.mitre.org/data/definitions/287.html
safe
CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, }
1
Go
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
safe
func authenticateDNSToken(tokenString string) bool { tokens := strings.Split(tokenString, " ") if len(tokens) < 2 { return false } return len(servercfg.GetDNSKey()) > 0 && tokens[1] == servercfg.GetDNSKey() }
1
Go
CWE-798
Use of Hard-coded Credentials
The product contains hard-coded credentials, such as a password or cryptographic key, which it uses for its own inbound authentication, outbound communication to external components, or encryption of internal data.
https://cwe.mitre.org/data/definitions/798.html
safe
func GetDNSKey() string { key := "" if os.Getenv("DNS_KEY") != "" { key = os.Getenv("DNS_KEY") } else if config.Config.Server.DNSKey != "" { key = config.Config.Server.DNSKey } return key }
1
Go
CWE-798
Use of Hard-coded Credentials
The product contains hard-coded credentials, such as a password or cryptographic key, which it uses for its own inbound authentication, outbound communication to external components, or encryption of internal data.
https://cwe.mitre.org/data/definitions/798.html
safe
eg.Go(func() error { var err error if req.IsInternal { policyOutput, err = e.evaluateInternal(ctx, req) } else { policyOutput, err = e.evaluatePolicy(ctx, req) } return err })
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func NewHeadersRequestFromPolicy(policy *config.Policy, hostname string) *HeadersRequest { input := new(HeadersRequest) if policy != nil { input.EnableGoogleCloudServerlessAuthentication = policy.EnableGoogleCloudServerlessAuthentication input.EnableRoutingKey = policy.EnvoyOpts.GetLbPolicy() == envoy_config_clus...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func getCheckRequestURL(req *envoy_service_auth_v3.CheckRequest) url.URL { h := req.GetAttributes().GetRequest().GetHttp() u := url.URL{ Scheme: h.GetScheme(), Host: h.GetHost(), } u.Host = urlutil.GetDomainsForURL(&u)[0] // envoy sends the query string as part of the path path := h.GetPath() if idx := str...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func (a *Authorize) getEvaluatorRequestFromCheckRequest( in *envoy_service_auth_v3.CheckRequest, sessionState *sessions.State, ) (*evaluator.Request, error) { requestURL := getCheckRequestURL(in) req := &evaluator.Request{ IsInternal: envoyconfig.ExtAuthzContextExtensionsIsInternal(in.GetAttributes().GetContextEx...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func (a *Authorize) getMatchingPolicy(routeID uint64) *config.Policy { options := a.currentOptions.Load() for _, p := range options.GetAllPolicies() { id, _ := p.RouteID() if id == routeID { return &p } } return nil }
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func ExtAuthzContextExtensionsRouteID(extAuthzContextExtensions map[string]string) uint64 { if extAuthzContextExtensions == nil { return 0 } routeID, _ := strconv.ParseUint(extAuthzContextExtensions["route_id"], 10, 64) return routeID }
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func ExtAuthzContextExtensionsIsInternal(extAuthzContextExtensions map[string]string) bool { return extAuthzContextExtensions != nil && extAuthzContextExtensions["internal"] == "true" }
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func MakeExtAuthzContextExtensions(internal bool, routeID uint64) map[string]string { return map[string]string{ "internal": strconv.FormatBool(internal), "route_id": strconv.FormatUint(routeID, 10), } }
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func PerFilterConfigExtAuthzDisabled() *any.Any { return marshalAny(&envoy_extensions_filters_http_ext_authz_v3.ExtAuthzPerRoute{ Override: &envoy_extensions_filters_http_ext_authz_v3.ExtAuthzPerRoute_Disabled{ Disabled: true, }, }) }
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func PerFilterConfigExtAuthzContextExtensions(authzContextExtensions map[string]string) *any.Any { return marshalAny(&envoy_extensions_filters_http_ext_authz_v3.ExtAuthzPerRoute{ Override: &envoy_extensions_filters_http_ext_authz_v3.ExtAuthzPerRoute_CheckSettings{ CheckSettings: &envoy_extensions_filters_http_ext...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func (b *Builder) buildControlPlanePathRoute( options *config.Options, path string, requireStrictTransportSecurity bool, ) *envoy_config_route_v3.Route { r := &envoy_config_route_v3.Route{ Name: "pomerium-path-" + path, Match: &envoy_config_route_v3.RouteMatch{ PathSpecifier: &envoy_config_route_v3.RouteMatc...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func (b *Builder) buildPomeriumAuthenticateHTTPRoutes( options *config.Options, host string, requireStrictTransportSecurity bool, ) ([]*envoy_config_route_v3.Route, error) { if !config.IsAuthenticate(options.Services) { return nil, nil } for _, fn := range []func() (*url.URL, error){ options.GetAuthenticateU...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func (b *Builder) buildPomeriumHTTPRoutes( options *config.Options, host string, requireStrictTransportSecurity bool, ) ([]*envoy_config_route_v3.Route, error) { var routes []*envoy_config_route_v3.Route // if this is the pomerium proxy in front of the the authenticate service, don't add // these routes since th...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func (b *Builder) buildGRPCRoutes() ([]*envoy_config_route_v3.Route, error) { action := &envoy_config_route_v3.Route_Route{ Route: &envoy_config_route_v3.RouteAction{ ClusterSpecifier: &envoy_config_route_v3.RouteAction_Cluster{ Cluster: "pomerium-control-plane-grpc", }, }, } return []*envoy_config_rou...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
func (b *Builder) buildControlPlanePrefixRoute( options *config.Options, prefix string, requireStrictTransportSecurity bool, ) *envoy_config_route_v3.Route { r := &envoy_config_route_v3.Route{ Name: "pomerium-prefix-" + prefix, Match: &envoy_config_route_v3.RouteMatch{ PathSpecifier: &envoy_config_route_v3.R...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
routeString := func(typ, name string) string { str := `{ "name": "pomerium-` + typ + `-` + name + `", "match": { "` + typ + `": "` + name + `" }, "responseHeadersToAdd": [ { "appendAction": "OVERWRITE_IF_EXISTS_OR_ADD", "header": { "key": "X-Frame-Options", "value": "SAMEORI...
1
Go
NVD-CWE-Other
Other
NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset.
https://nvd.nist.gov/vuln/categories
safe
change, err := controllerutil.CreateOrUpdate(ctx, r.Client, ns, func() error { if ns.Labels == nil { ns.Labels = map[string]string{} } ns.Labels = helper.SetPodSecurity(ns.Labels) return nil }) if err != nil { return err } r.Logger.V(1).Info("create or update ns", "change", chang...
1
Go
CWE-863
Incorrect Authorization
The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.
https://cwe.mitre.org/data/definitions/863.html
safe
err = listSignatures(ctx, sigRepo, manifestDesc, opts.maxSignatures, func(sigManifestDesc ocispec.Descriptor) error { sigBlob, sigDesc, err := sigRepo.FetchSignatureBlob(ctx, sigManifestDesc) if err != nil { fmt.Fprintf(os.Stderr, "Warning: unable to fetch signature %s due to error: %v\n", sigManifestDesc.Diges...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func TestInspectCommand_SecretsFromArgs(t *testing.T) { opts := &inspectOpts{} command := inspectCommand(opts) expected := &inspectOpts{ reference: "ref", SecureFlagOpts: SecureFlagOpts{ Password: "password", InsecureRegistry: true, Username: "user", }, outputFormat: cmd.OutputPlain...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func TestInspectCommand_SecretsFromEnv(t *testing.T) { t.Setenv(defaultUsernameEnv, "user") t.Setenv(defaultPasswordEnv, "password") opts := &inspectOpts{} expected := &inspectOpts{ reference: "ref", SecureFlagOpts: SecureFlagOpts{ Password: "password", Username: "user", }, outputFormat: cmd.OutputJS...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func (e ErrorExceedMaxSignatures) Error() string { return fmt.Sprintf("exceeded configured limit of max signatures %d to examine", e.MaxSignatures) }
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func runList(ctx context.Context, opts *listOpts) error { // set log level ctx = opts.LoggingFlagOpts.SetLoggerLevel(ctx) // initialize reference := opts.reference sigRepo, err := getRepository(ctx, opts.inputType, reference, &opts.SecureFlagOpts, opts.allowReferrersAPI) if err != nil { return err } targetDe...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
return sigRepo.ListSignatures(ctx, manifestDesc, func(signatureManifests []ocispec.Descriptor) error { for _, sigManifestDesc := range signatureManifests { if numOfSignatureProcessed >= maxSig { return cmderr.ErrorExceedMaxSignatures{MaxSignatures: maxSig} } numOfSignatureProcessed++ if err := fn(sig...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
err := listSignatures(ctx, sigRepo, targetDesc, maxSigs, func(sigManifestDesc ocispec.Descriptor) error { // print the previous signature digest if prevDigest != "" { printTitle() fmt.Printf(" ├── %s\n", prevDigest) } prevDigest = sigManifestDesc.Digest return nil })
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func TestListCommand_SecretsFromEnv(t *testing.T) { t.Setenv(defaultUsernameEnv, "user") t.Setenv(defaultPasswordEnv, "password") opts := &listOpts{} expected := &listOpts{ reference: "ref", SecureFlagOpts: SecureFlagOpts{ Password: "password", Username: "user", }, maxSignatures: 100, } cmd := listC...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func TestListCommand_SecretsFromArgs(t *testing.T) { opts := &listOpts{} cmd := listCommand(opts) expected := &listOpts{ reference: "ref", SecureFlagOpts: SecureFlagOpts{ Password: "password", InsecureRegistry: true, Username: "user", }, maxSignatures: 100, } if err := cmd.ParseFla...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func runVerify(command *cobra.Command, opts *verifyOpts) error { // set log level ctx := opts.LoggingFlagOpts.SetLoggerLevel(command.Context()) // initialize sigVerifier, err := verifier.NewFromConfig() if err != nil { return err } // set up verification plugin config. configs, err := cmd.ParseFlagMap(opts....
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func TestVerifyCommand_BasicArgs(t *testing.T) { opts := &verifyOpts{} command := verifyCommand(opts) expected := &verifyOpts{ reference: "ref", SecureFlagOpts: SecureFlagOpts{ Username: "user", Password: "password", }, pluginConfig: []string{"key1=val1"}, maxSignatureAttempts: 100, } if er...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func TestVerifyCommand_MoreArgs(t *testing.T) { opts := &verifyOpts{} command := verifyCommand(opts) expected := &verifyOpts{ reference: "ref", SecureFlagOpts: SecureFlagOpts{ InsecureRegistry: true, }, pluginConfig: []string{"key1=val1", "key2=val2"}, maxSignatureAttempts: 100, } if err := co...
1
Go
CWE-400
Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
https://cwe.mitre.org/data/definitions/400.html
safe
func NewQUICServer(addr, password, domain string, tcpTimeout, udpTimeout int, withoutbrook bool) (*QUICServer, error) { if err := limits.Raise(); err != nil { Log(&Error{"when": "try to raise system limits", "warning": err.Error()}) } if runtime.GOOS == "linux" { c := exec.Command("sysctl", "-w", "net.core.rmem_...
1
Go
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
func (c *StreamClient) Exchange(local net.Conn) error { go func() { for { if c.Timeout != 0 { if err := c.Server.SetDeadline(time.Now().Add(time.Duration(c.Timeout) * time.Second)); err != nil { return } } l, err := c.Read() if err != nil { return } if _, err := local.Write(c.RB[2+...
1
Go
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
func (c *StreamClient) Write(l int) error { binary.BigEndian.PutUint16(c.WB[:2], uint16(l)) c.ca.Seal(c.WB[:0], c.cn, c.WB[:2], nil) NextNonce(c.cn) c.ca.Seal(c.WB[:2+16], c.cn, c.WB[2+16:2+16+l], nil) if _, err := c.Server.Write(c.WB[:2+16+l+16]); err != nil { return err } NextNonce(c.cn) return nil }
1
Go
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
func (c *StreamClient) Read() (int, error) { if _, err := io.ReadFull(c.Server, c.RB[:2+16]); err != nil { return 0, err } if _, err := c.sa.Open(c.RB[:0], c.sn, c.RB[:2+16], nil); err != nil { return 0, err } l := int(binary.BigEndian.Uint16(c.RB[:2])) if _, err := io.ReadFull(c.Server, c.RB[2+16:2+16+l+16])...
1
Go
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/78.html
safe
func EscapeQuote(str string) string { type Escape struct { From string To string } escape := []Escape{ {From: "`", To: ""}, // remove the backtick {From: `\`, To: `\\`}, {From: `'`, To: `\'`}, {From: `"`, To: `\"`}, } for _, e := range escape { str = strings.ReplaceAll(str, e.From, e.To) } retur...
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func TestEscape(t *testing.T) { assert.Equal(t, "test", EscapeQuote("test")) assert.Equal(t, "test", EscapeQuote("`test`")) assert.Equal(t, `\'test\'`, EscapeQuote("'test'")) assert.Equal(t, `\"test\"`, EscapeQuote(`"test"`)) assert.Equal(t, `\\test\\`, EscapeQuote(`\test\`)) }
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func (r *MySQL) Probe() (bool, string) { if r.tls != nil { mysql.RegisterTLSConfig(global.DefaultProg, r.tls) } db, err := sql.Open("mysql", r.ConnStr) if err != nil { return false, err.Error() } defer db.Close() // Check if we need to query specific data if len(r.Data) > 0 { if err := r.ProbeWithDataV...
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func (r *MySQL) ProbeWithDataVerification(db *sql.DB) error { for k, v := range r.Data { log.Debugf("[%s / %s / %s] - Verifying Data - [%s] : [%s]", r.ProbeKind, r.ProbeName, r.ProbeTag, k, v) sql, err := r.getSQL(k) if err != nil { return err } log.Debugf("[%s / %s / %s] - SQL - [%s]", r.ProbeKind, r.Pro...
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func (r *MySQL) getSQL(str string) (string, error) { if len(strings.TrimSpace(str)) == 0 { return "", fmt.Errorf("Empty SQL data") } fields := strings.Split(str, ":") if len(fields) != 5 { return "", fmt.Errorf("Invalid SQL data - [%s]. (syntax: database:table:field:key:value)", str) } db := global.EscapeQuot...
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func (r *MySQL) ProbeWithPing(db *sql.DB) error { if err := db.Ping(); err != nil { return err } row, err := db.Query("show status like \"uptime\"") // run a SQL to test if err != nil { return err } defer row.Close() return nil }
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func (r *PostgreSQL) getSQL(str string) (string, string, error) { if len(strings.TrimSpace(str)) == 0 { return "", "", fmt.Errorf("Empty SQL data") } fields := strings.Split(str, ":") if len(fields) != 5 { return "", "", fmt.Errorf("Invalid SQL data - [%s]. (syntax: database:table:field:key:value)", str) } db...
1
Go
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/89.html
safe
func (v *SnapshotJob) do(ffmpegPath, inputUrl string) (err error) { outputPicDir := path.Join(StaticDir, v.App) if err = os.MkdirAll(outputPicDir, 0777); err != nil { log.Println(fmt.Sprintf("create snapshot image dir:%v failed, err is %v", outputPicDir, err)) return } normalPicPath := path.Join(outputPicDir, ...
1
Go
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/77.html
safe
func urlEncode(targetString string) string { // We use QueryEscape instead of PathEscape here // for consistency across Drivers. For example: // QueryEscape escapes space as "+" whereas PE // it as %20F. PE also does not escape @ or & // either but QE does. // The behavior of QE in Golang is more in sync // with...
1
Go
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/77.html
safe
func isValidURL(targetURL string) bool { if !matcher.MatchString(targetURL) { logger.Infof(" The provided URL is not a valid URL - " + targetURL) return false } return true }
1
Go
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/77.html
safe
func TestEncodeURL(t *testing.T) { testcases := []tcEncodeList{ {"Hello @World", "Hello+%40World"}, {"Test//String", "Test%2F%2FString"}, } for _, test := range testcases { result := urlEncode(test.in) if test.out != result { t.Errorf("Failed to encode string, input %v, expected: %v, got: %v", test.in, t...
1
Go
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/77.html
safe
func TestValidURL(t *testing.T) { testcases := []tcURLList{ {"https://ssoTestURL.okta.com", true}, {"https://ssoTestURL.okta.com:8080", true}, {"https://ssoTestURL.okta.com/testpathvalue", true}, {"-a calculator", false}, {"This is a random test", false}, {"file://TestForFile", false}, } for _, test := r...
1
Go
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/77.html
safe
func (r *TerraformRunnerServer) NewTerraform(ctx context.Context, req *NewTerraformRequest) (*NewTerraformReply, error) { r.InstanceID = req.GetInstanceID() log := ctrl.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) log.Info("creating new terraform", "workingDir", req.WorkingDir, "execPath", req.E...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) initLogger(log logr.Logger) { disableTestLogging := os.Getenv("DISABLE_TF_LOGS") == "1" if !disableTestLogging { r.tf.SetStdout(os.Stdout) r.tf.SetStderr(os.Stderr) if os.Getenv("ENABLE_SENSITIVE_TF_LOGS") == "1" { r.tf.SetLogger(&LocalPrintfer{logger: log}) } } }
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) tfShowPlanFileRaw(ctx context.Context, planPath string, opts ...tfexec.ShowOption) (string, error) { log := ctrl.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) // This is the only place where we disable the logger r.tf.SetStdout(io.Discard) r.tf.SetStderr(io.Disca...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) Plan(ctx context.Context, req *PlanRequest) (*PlanReply, error) { log := controllerruntime.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) log.Info("creating a plan") ctx, cancel := context.WithCancel(ctx) go func() { select { case <-r.Done: cancel() case <...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) tfShowPlanFile(ctx context.Context, planPath string, opts ...tfexec.ShowOption) (*tfjson.Plan, error) { log := ctrl.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) // This is the only place where we disable the logger r.tf.SetStdout(io.Discard) r.tf.SetStderr(io.Di...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) SaveTFPlan(ctx context.Context, req *SaveTFPlanRequest) (*SaveTFPlanReply, error) { log := ctrl.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) log.Info("save the plan") if req.TfInstance != r.InstanceID { err := fmt.Errorf("no TF instance found") log.Error(err, ...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) ShowPlanFileRaw(ctx context.Context, req *ShowPlanFileRawRequest) (*ShowPlanFileRawReply, error) { log := controllerruntime.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) log.Info("show the raw plan file") if req.TfInstance != r.InstanceID { err := fmt.Errorf("no ...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) ShowPlanFile(ctx context.Context, req *ShowPlanFileRequest) (*ShowPlanFileReply, error) { log := controllerruntime.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) log.Info("show the raw plan file") if req.TfInstance != r.InstanceID { err := fmt.Errorf("no TF instan...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) Output(ctx context.Context, req *OutputRequest) (*OutputReply, error) { log := ctrl.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) log.Info("creating outputs") if req.TfInstance != r.InstanceID { err := fmt.Errorf("no TF instance found") log.Error(err, "no terra...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (r *TerraformRunnerServer) tfOutput(ctx context.Context, opts ...tfexec.OutputOption) (map[string]tfexec.OutputMeta, error) { log := ctrl.LoggerFrom(ctx, "instance-id", r.InstanceID).WithName(loggerName) // This is the only place where we disable the logger r.tf.SetStdout(io.Discard) r.tf.SetStderr(io.Discard...
1
Go
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
https://cwe.mitre.org/data/definitions/200.html
safe
func (ctx *Context) RedirectToFirst(location ...string) { for _, loc := range location { if len(loc) == 0 { continue } // Unfortunately browsers consider a redirect Location with preceding "//", "\\" and "/\" as meaning redirect to "http(s)://REST_OF_PATH" // Therefore we should ignore these redirect locat...
1
Go
CWE-601
URL Redirection to Untrusted Site ('Open Redirect')
A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks.
https://cwe.mitre.org/data/definitions/601.html
safe
func (t *assetAction) checkERC20Deposit() error { asset, _ := t.asset.ERC20() return t.bridgeView.FindDeposit( t.erc20D, t.blockHeight, t.logIndex, asset.Address(), t.txHash, ) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (t *assetAction) checkERC20BridgeResumed() error { return t.bridgeView.FindBridgeResumed( t.erc20BridgeResumed, t.blockHeight, t.logIndex, t.txHash) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (t *assetAction) checkERC20AssetList() error { return t.bridgeView.FindAssetList(t.erc20AL, t.blockHeight, t.logIndex, t.txHash) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (t *assetAction) checkERC20BridgeStopped() error { return t.bridgeView.FindBridgeStopped( t.erc20BridgeStopped, t.blockHeight, t.logIndex, t.txHash) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (t *assetAction) checkERC20AssetLimitsUpdated() error { asset, _ := t.asset.ERC20() return t.bridgeView.FindAssetLimitsUpdated( t.erc20AssetLimitsUpdated, t.blockHeight, t.logIndex, asset.Address(), t.txHash, ) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (mr *MockERC20BridgeViewMockRecorder) FindAssetLimitsUpdated(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAssetLimitsUpdated", reflect.TypeOf((*MockERC20BridgeView)(nil).FindAssetLimitsUpdated), arg0, arg1, arg2, arg3,...
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (m *MockERC20BridgeView) FindBridgeResumed(arg0 *types.ERC20EventBridgeResumed, arg1, arg2 uint64, arg3 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FindBridgeResumed", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (m *MockERC20BridgeView) FindAssetList(arg0 *types.ERC20AssetList, arg1, arg2 uint64, arg3 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FindAssetList", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (mr *MockERC20BridgeViewMockRecorder) FindDeposit(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindDeposit", reflect.TypeOf((*MockERC20BridgeView)(nil).FindDeposit), arg0, arg1, arg2, arg3, arg4) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (mr *MockERC20BridgeViewMockRecorder) FindAssetList(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindAssetList", reflect.TypeOf((*MockERC20BridgeView)(nil).FindAssetList), arg0, arg1, arg2, arg3) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (mr *MockERC20BridgeViewMockRecorder) FindBridgeStopped(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindBridgeStopped", reflect.TypeOf((*MockERC20BridgeView)(nil).FindBridgeStopped), arg0, arg1, arg2, arg3) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (m *MockERC20BridgeView) FindBridgeStopped(arg0 *types.ERC20EventBridgeStopped, arg1, arg2 uint64, arg3 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FindBridgeStopped", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (mr *MockERC20BridgeViewMockRecorder) FindBridgeResumed(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindBridgeResumed", reflect.TypeOf((*MockERC20BridgeView)(nil).FindBridgeResumed), arg0, arg1, arg2, arg3) }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (m *MockERC20BridgeView) FindAssetLimitsUpdated(arg0 *types.ERC20AssetLimitsUpdated, arg1, arg2 uint64, arg3, arg4 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FindAssetLimitsUpdated", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(error) return ret0 }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (m *MockERC20BridgeView) FindDeposit(arg0 *types.ERC20Deposit, arg1, arg2 uint64, arg3, arg4 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FindDeposit", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(error) return ret0 }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (e *ERC20LogicView) FindDeposit( d *types.ERC20Deposit, blockNumber, logIndex uint64, ethAssetAddress string, txHash string, ) error { bf, err := bridgecontract.NewErc20BridgeLogicRestrictedFilterer( e.clt.CollateralBridgeAddress(), e.clt) if err != nil { return err } resp := "ok" defer func() { me...
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (e *ERC20LogicView) FindWithdrawal( w *types.ERC20Withdrawal, blockNumber, logIndex uint64, ethAssetAddress string, txHash string, ) (*big.Int, string, uint, error) { bf, err := bridgecontract.NewErc20BridgeLogicRestrictedFilterer( e.clt.CollateralBridgeAddress(), e.clt) if err != nil { return nil, "", 0...
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (e *ERC20LogicView) FindBridgeStopped( al *types.ERC20EventBridgeStopped, blockNumber, logIndex uint64, txHash string, ) error { bf, err := bridgecontract.NewErc20BridgeLogicRestrictedFilterer( e.clt.CollateralBridgeAddress(), e.clt) if err != nil { return err } resp := "ok" defer func() { metrics....
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (e *ERC20LogicView) FindAssetLimitsUpdated( update *types.ERC20AssetLimitsUpdated, blockNumber uint64, logIndex uint64, ethAssetAddress string, txHash string, ) error { bf, err := bridgecontract.NewErc20BridgeLogicRestrictedFilterer( e.clt.CollateralBridgeAddress(), e.clt) if err != nil { return err } ...
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (e *ERC20LogicView) FindBridgeResumed( al *types.ERC20EventBridgeResumed, blockNumber, logIndex uint64, txHash string, ) error { bf, err := bridgecontract.NewErc20BridgeLogicRestrictedFilterer( e.clt.CollateralBridgeAddress(), e.clt) if err != nil { return err } resp := "ok" defer func() { metrics....
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (e *ERC20LogicView) FindAssetList( al *types.ERC20AssetList, blockNumber, logIndex uint64, txHash string, ) error { bf, err := bridgecontract.NewErc20BridgeLogicRestrictedFilterer( e.clt.CollateralBridgeAddress(), e.clt) if err != nil { return err } resp := "ok" defer func() { metrics.EthCallInc("f...
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (*BridgeViewStub) FindAssetList(al *types.ERC20AssetList, blockNumber, logIndex uint64, txHash string) error { return nil }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe
func (*BridgeViewStub) FindDeposit(d *types.ERC20Deposit, blockNumber, logIndex uint64, ethAssetAddress string, txHash string) error { return nil }
1
Go
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
safe