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 getTokenFromStorage(c *fiber.Ctx, token string, cfg Config, sessionManager *sessionManager, storageManager *storageManager) []byte { if cfg.Session != nil { return sessionManager.getRaw(c, token, dummyValue) } return storageManager.getRaw(token) }
0
Go
CWE-807
Reliance on Untrusted Inputs in a Security Decision
The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.
https://cwe.mitre.org/data/definitions/807.html
vulnerable
func CsrfFromCookie(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Cookies(param) if token == "" { return "", errMissingCookie } return token, nil } }
0
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
vulnerable
func CsrfFromCookie(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Cookies(param) if token == "" { return "", errMissingCookie } return token, nil } }
0
Go
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
vulnerable
func CsrfFromCookie(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Cookies(param) if token == "" { return "", errMissingCookie } return token, nil } }
0
Go
CWE-565
Reliance on Cookies without Validation and Integrity Checking
The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
https://cwe.mitre.org/data/definitions/565.html
vulnerable
func CsrfFromCookie(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Cookies(param) if token == "" { return "", errMissingCookie } return token, nil } }
0
Go
CWE-807
Reliance on Untrusted Inputs in a Security Decision
The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.
https://cwe.mitre.org/data/definitions/807.html
vulnerable
func CsrfFromHeader(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Get(param) if token == "" { return "", errMissingHeader } return token, nil } }
0
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
vulnerable
func CsrfFromHeader(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Get(param) if token == "" { return "", errMissingHeader } return token, nil } }
0
Go
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
vulnerable
func CsrfFromHeader(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Get(param) if token == "" { return "", errMissingHeader } return token, nil } }
0
Go
CWE-565
Reliance on Cookies without Validation and Integrity Checking
The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
https://cwe.mitre.org/data/definitions/565.html
vulnerable
func CsrfFromHeader(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Get(param) if token == "" { return "", errMissingHeader } return token, nil } }
0
Go
CWE-807
Reliance on Untrusted Inputs in a Security Decision
The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.
https://cwe.mitre.org/data/definitions/807.html
vulnerable
func CsrfFromParam(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Params(param) if token == "" { return "", errMissingParam } return token, nil } }
0
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
vulnerable
func CsrfFromParam(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Params(param) if token == "" { return "", errMissingParam } return token, nil } }
0
Go
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
vulnerable
func CsrfFromParam(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Params(param) if token == "" { return "", errMissingParam } return token, nil } }
0
Go
CWE-565
Reliance on Cookies without Validation and Integrity Checking
The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
https://cwe.mitre.org/data/definitions/565.html
vulnerable
func CsrfFromParam(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Params(param) if token == "" { return "", errMissingParam } return token, nil } }
0
Go
CWE-807
Reliance on Untrusted Inputs in a Security Decision
The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.
https://cwe.mitre.org/data/definitions/807.html
vulnerable
func CsrfFromQuery(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Query(param) if token == "" { return "", errMissingQuery } return token, nil } }
0
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
vulnerable
func CsrfFromQuery(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Query(param) if token == "" { return "", errMissingQuery } return token, nil } }
0
Go
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
vulnerable
func CsrfFromQuery(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Query(param) if token == "" { return "", errMissingQuery } return token, nil } }
0
Go
CWE-565
Reliance on Cookies without Validation and Integrity Checking
The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
https://cwe.mitre.org/data/definitions/565.html
vulnerable
func CsrfFromQuery(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.Query(param) if token == "" { return "", errMissingQuery } return token, nil } }
0
Go
CWE-807
Reliance on Untrusted Inputs in a Security Decision
The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.
https://cwe.mitre.org/data/definitions/807.html
vulnerable
func CsrfFromForm(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.FormValue(param) if token == "" { return "", errMissingForm } return token, nil } }
0
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
vulnerable
func CsrfFromForm(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.FormValue(param) if token == "" { return "", errMissingForm } return token, nil } }
0
Go
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
vulnerable
func CsrfFromForm(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.FormValue(param) if token == "" { return "", errMissingForm } return token, nil } }
0
Go
CWE-565
Reliance on Cookies without Validation and Integrity Checking
The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
https://cwe.mitre.org/data/definitions/565.html
vulnerable
func CsrfFromForm(param string) func(c *fiber.Ctx) (string, error) { return func(c *fiber.Ctx) (string, error) { token := c.FormValue(param) if token == "" { return "", errMissingForm } return token, nil } }
0
Go
CWE-807
Reliance on Untrusted Inputs in a Security Decision
The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.
https://cwe.mitre.org/data/definitions/807.html
vulnerable
func NewSortParameter(sort admin.Sort) (SortParameter, error) { var gormOrderExpression string switch sort.Direction { case admin.Sort_DESCENDING: gormOrderExpression = fmt.Sprintf(gormDescending, sort.Key) case admin.Sort_ASCENDING: gormOrderExpression = fmt.Sprintf(gormAscending, sort.Key) default: return ...
0
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
vulnerable
func TestSortParameter_Descending(t *testing.T) { sortParameter, err := NewSortParameter(admin.Sort{ Direction: admin.Sort_DESCENDING, Key: "project", }) assert.Nil(t, err) assert.Equal(t, "project desc", sortParameter.GetGormOrderExpr()) }
0
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
vulnerable
func TestSortParameter_Ascending(t *testing.T) { sortParameter, err := NewSortParameter(admin.Sort{ Direction: admin.Sort_ASCENDING, Key: "name", }) assert.Nil(t, err) assert.Equal(t, "name asc", sortParameter.GetGormOrderExpr()) }
0
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
vulnerable
func (m *LaunchPlanManager) ListLaunchPlans(ctx context.Context, request admin.ResourceListRequest) ( *admin.LaunchPlanList, error) { // Check required fields if err := validation.ValidateResourceListRequest(request); err != nil { logger.Debugf(ctx, "") return nil, err } ctx = m.getNamedEntityContext(ctx, req...
0
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
vulnerable
func (m *LaunchPlanManager) ListLaunchPlanIds(ctx context.Context, request admin.NamedEntityIdentifierListRequest) ( *admin.NamedEntityIdentifierList, error) { ctx = contextutils.WithProjectDomain(ctx, request.Project, request.Domain) filters, err := util.GetDbFilters(util.FilterSpec{ Project: request.Project, D...
0
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
vulnerable
func (m *LaunchPlanManager) ListActiveLaunchPlans(ctx context.Context, request admin.ActiveLaunchPlanListRequest) ( *admin.LaunchPlanList, error) { // Check required fields if err := validation.ValidateActiveLaunchPlanListRequest(request); err != nil { logger.Debugf(ctx, "") return nil, err } ctx = contextuti...
0
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
vulnerable
func (m *NodeExecutionManager) listNodeExecutions( ctx context.Context, identifierFilters []common.InlineFilter, requestFilters string, limit uint32, requestToken string, sortBy *admin.Sort, mapFilters []common.MapFilter) ( *admin.NodeExecutionList, error) { filters, err := util.AddRequestFilters(requestFilters, c...
0
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
vulnerable
func TestListNodeExecutions_NothingToReturn(t *testing.T) { repository := repositoryMocks.NewMockRepository() repository.NodeExecutionRepo().(*repositoryMocks.MockNodeExecutionRepo).SetListCallback( func(ctx context.Context, input interfaces.ListResourceInput) ( interfaces.NodeExecutionCollectionOutput, error) {...
0
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
vulnerable
func (m *ProjectManager) ListProjects(ctx context.Context, request admin.ProjectListRequest) (*admin.Projects, error) { spec := util.FilterSpec{ RequestFilters: request.Filters, } filters, err := util.GetDbFilters(spec, common.Project) if err != nil { return nil, err } var sortParameter common.SortParameter ...
0
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
vulnerable
func (s *SignalManager) ListSignals(ctx context.Context, request admin.SignalListRequest) (*admin.SignalList, error) { if err := validation.ValidateSignalListRequest(ctx, request); err != nil { logger.Debugf(ctx, "ListSignals request [%+v] is invalid: %v", request, err) return nil, err } ctx = getExecutionContex...
0
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
vulnerable
func (t *TaskManager) ListTasks(ctx context.Context, request admin.ResourceListRequest) (*admin.TaskList, error) { // Check required fields if err := validation.ValidateResourceListRequest(request); err != nil { logger.Debugf(ctx, "Invalid request [%+v]: %v", request, err) return nil, err } ctx = contextutils.W...
0
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
vulnerable
func (t *TaskManager) ListUniqueTaskIdentifiers(ctx context.Context, request admin.NamedEntityIdentifierListRequest) ( *admin.NamedEntityIdentifierList, error) { if err := validation.ValidateNamedEntityIdentifierListRequest(request); err != nil { logger.Debugf(ctx, "invalid request [%+v]: %v", request, err) retur...
0
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
vulnerable
func TestParseFilters(t *testing.T) { filterExpression := "eq(foo, 123)+ne(version, TheWorst)+value_in(bar, 4;5;6)" taskFilters, err := ParseFilters(filterExpression, common.Task) assert.NoError(t, err) assert.Len(t, taskFilters, 3) actualFilterExpression, _ := taskFilters[0].GetGormQueryExpr() assert.Equal(t, "...
0
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
vulnerable
func TestAddRequestFilters(t *testing.T) { filters, err := AddRequestFilters( "ne(version, TheWorst)+eq(workflow.name, workflow)", common.Execution, make([]common.InlineFilter, 0)) assert.Nil(t, err) assert.Len(t, filters, 2) expression, err := filters[0].GetGormQueryExpr() assert.Nil(t, err) assert.Equal(t, "v...
0
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
vulnerable
func (w *WorkflowManager) ListWorkflows( ctx context.Context, request admin.ResourceListRequest) (*admin.WorkflowList, error) { // Check required fields if err := validation.ValidateResourceListRequest(request); err != nil { return nil, err } ctx = contextutils.WithProjectDomain(ctx, request.Id.Project, request....
0
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
vulnerable
func (w *WorkflowManager) ListWorkflowIdentifiers(ctx context.Context, request admin.NamedEntityIdentifierListRequest) ( *admin.NamedEntityIdentifierList, error) { if err := validation.ValidateNamedEntityIdentifierListRequest(request); err != nil { logger.Debugf(ctx, "invalid request [%+v]: %v", request, err) ret...
0
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
vulnerable
func TestListExecutions_Order(t *testing.T) { executionRepo := NewExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) executions := make([]map[string]interface{}, 0) GlobalMock := mocket.Catcher.Reset() // Only match on queries that include ordering by name mockQuery := Glob...
0
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
vulnerable
func TestListExecutions_WithTags(t *testing.T) { executionRepo := NewExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) executions := make([]map[string]interface{}, 0) GlobalMock := mocket.Catcher.Reset() // Only match on queries that include ordering by name mockQuery := G...
0
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
vulnerable
func TestListLaunchPlans_Order(t *testing.T) { launchPlanRepo := NewLaunchPlanRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) launchPlans := make([]map[string]interface{}, 0) GlobalMock := mocket.Catcher.Reset() // Only match on queries that include ordering by project mockQuery ...
0
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
vulnerable
func TestListNamedEntity(t *testing.T) { metadataRepo := NewNamedEntityRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) results := make([]map[string]interface{}, 0) metadata := getMockNamedEntityResponseFromDb(models.NamedEntity{ NamedEntityKey: models.NamedEntityKey{ ResourceT...
0
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
vulnerable
func TestListNodeExecutions_Order(t *testing.T) { nodeExecutionRepo := NewNodeExecutionRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) nodeExecutions := make([]map[string]interface{}, 0) GlobalMock := mocket.Catcher.Reset() // Only match on queries that include ordering by project...
0
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
vulnerable
func TestListProjects(t *testing.T) { filter, err := common.NewSingleValueFilter(common.Project, common.Equal, "name", "foo") assert.Nil(t, err) testListProjects(interfaces.ListResourceInput{ Offset: 0, Limit: 1, InlineFilters: []common.InlineFilter{filter}, SortParameter: alphabeticalSortPara...
0
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
vulnerable
func TestListTasks_Order(t *testing.T) { taskRepo := NewTaskRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) tasks := make([]map[string]interface{}, 0) GlobalMock := mocket.Catcher.Reset() GlobalMock.Logging = true // Only match on queries that include ordering by project mockQue...
0
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
vulnerable
func TestListWorkflows_Order(t *testing.T) { workflowRepo := NewWorkflowRepo(GetDbForTest(t), errors.NewTestErrorTransformer(), mockScope.NewTestScope()) workflows := make([]map[string]interface{}, 0) GlobalMock := mocket.Catcher.Reset() // Only match on queries that include ordering by project mockQuery := Globa...
0
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
vulnerable
func (v *cosignVerifier) VerifySignature(ctx context.Context, opts images.Options) (*images.Response, error) { ref, err := name.ParseReference(opts.ImageRef) if err != nil { return nil, fmt.Errorf("failed to parse image %s", opts.ImageRef) } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (v *cosignVerifier) VerifySignature(ctx context.Context, opts images.Options) (*images.Response, error) { ref, err := name.ParseReference(opts.ImageRef) if err != nil { return nil, fmt.Errorf("failed to parse image %s", opts.ImageRef) } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (v *cosignVerifier) VerifySignature(ctx context.Context, opts images.Options) (*images.Response, error) { ref, err := name.ParseReference(opts.ImageRef) if err != nil { return nil, fmt.Errorf("failed to parse image %s", opts.ImageRef) } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (v *cosignVerifier) VerifySignature(ctx context.Context, opts images.Options) (*images.Response, error) { ref, err := name.ParseReference(opts.ImageRef) if err != nil { return nil, fmt.Errorf("failed to parse image %s", opts.ImageRef) } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func matchPredicateType(sig oci.Signature, expectedPredicateType string) (bool, string, error) { if expectedPredicateType != "" { statement, _, err := decodeStatement(sig) if err != nil { return false, "", fmt.Errorf("failed to decode predicateType: %w", err) } if pType, ok := statement["predicateType"]; o...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func matchPredicateType(sig oci.Signature, expectedPredicateType string) (bool, string, error) { if expectedPredicateType != "" { statement, _, err := decodeStatement(sig) if err != nil { return false, "", fmt.Errorf("failed to decode predicateType: %w", err) } if pType, ok := statement["predicateType"]; o...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func matchPredicateType(sig oci.Signature, expectedPredicateType string) (bool, string, error) { if expectedPredicateType != "" { statement, _, err := decodeStatement(sig) if err != nil { return false, "", fmt.Errorf("failed to decode predicateType: %w", err) } if pType, ok := statement["predicateType"]; o...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func matchPredicateType(sig oci.Signature, expectedPredicateType string) (bool, string, error) { if expectedPredicateType != "" { statement, _, err := decodeStatement(sig) if err != nil { return false, "", fmt.Errorf("failed to decode predicateType: %w", err) } if pType, ok := statement["predicateType"]; o...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (v *cosignVerifier) FetchAttestations(ctx context.Context, opts images.Options) (*images.Response, error) { cosignOpts, err := buildCosignOptions(ctx, opts) if err != nil { return nil, err } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "VERIFY IMG ATTESTATIONS", func(ctx context.C...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (v *cosignVerifier) FetchAttestations(ctx context.Context, opts images.Options) (*images.Response, error) { cosignOpts, err := buildCosignOptions(ctx, opts) if err != nil { return nil, err } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "VERIFY IMG ATTESTATIONS", func(ctx context.C...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (v *cosignVerifier) FetchAttestations(ctx context.Context, opts images.Options) (*images.Response, error) { cosignOpts, err := buildCosignOptions(ctx, opts) if err != nil { return nil, err } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "VERIFY IMG ATTESTATIONS", func(ctx context.C...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (v *cosignVerifier) FetchAttestations(ctx context.Context, opts images.Options) (*images.Response, error) { cosignOpts, err := buildCosignOptions(ctx, opts) if err != nil { return nil, err } signatures, bundleVerified, err := tracing.ChildSpan3( ctx, "", "VERIFY IMG ATTESTATIONS", func(ctx context.C...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func substituteVariables(rule kyvernov1.Rule, ctx enginecontext.EvalInterface, logger logr.Logger) (*kyvernov1.Rule, error) { // remove attestations as variables are not substituted in them ruleCopy := *rule.DeepCopy() for i := range ruleCopy.VerifyImages { ruleCopy.VerifyImages[i].Attestations = nil } var err e...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func substituteVariables(rule kyvernov1.Rule, ctx enginecontext.EvalInterface, logger logr.Logger) (*kyvernov1.Rule, error) { // remove attestations as variables are not substituted in them ruleCopy := *rule.DeepCopy() for i := range ruleCopy.VerifyImages { ruleCopy.VerifyImages[i].Attestations = nil } var err e...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func substituteVariables(rule kyvernov1.Rule, ctx enginecontext.EvalInterface, logger logr.Logger) (*kyvernov1.Rule, error) { // remove attestations as variables are not substituted in them ruleCopy := *rule.DeepCopy() for i := range ruleCopy.VerifyImages { ruleCopy.VerifyImages[i].Attestations = nil } var err e...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func substituteVariables(rule kyvernov1.Rule, ctx enginecontext.EvalInterface, logger logr.Logger) (*kyvernov1.Rule, error) { // remove attestations as variables are not substituted in them ruleCopy := *rule.DeepCopy() for i := range ruleCopy.VerifyImages { ruleCopy.VerifyImages[i].Attestations = nil } var err e...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildVerifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, attestation *kyvernov1.Attestation, ) (images.ImageVerifier, *images.Options, string) { switch imageVerify.Type { case kyvernov1.NotaryV2: return iv.buildNotaryV2Verifier(attestor, imageVe...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildVerifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, attestation *kyvernov1.Attestation, ) (images.ImageVerifier, *images.Options, string) { switch imageVerify.Type { case kyvernov1.NotaryV2: return iv.buildNotaryV2Verifier(attestor, imageVe...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildVerifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, attestation *kyvernov1.Attestation, ) (images.ImageVerifier, *images.Options, string) { switch imageVerify.Type { case kyvernov1.NotaryV2: return iv.buildNotaryV2Verifier(attestor, imageVe...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildVerifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, attestation *kyvernov1.Attestation, ) (images.ImageVerifier, *images.Options, string) { switch imageVerify.Type { case kyvernov1.NotaryV2: return iv.buildNotaryV2Verifier(attestor, imageVe...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) verifyAttestation(statements []map[string]interface{}, attestation kyvernov1.Attestation, imageInfo apiutils.ImageInfo) error { if attestation.PredicateType == "" { return fmt.Errorf("a predicateType is required") } image := imageInfo.String() statementsByPredicate, types := buildStatemen...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) verifyAttestation(statements []map[string]interface{}, attestation kyvernov1.Attestation, imageInfo apiutils.ImageInfo) error { if attestation.PredicateType == "" { return fmt.Errorf("a predicateType is required") } image := imageInfo.String() statementsByPredicate, types := buildStatemen...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) verifyAttestation(statements []map[string]interface{}, attestation kyvernov1.Attestation, imageInfo apiutils.ImageInfo) error { if attestation.PredicateType == "" { return fmt.Errorf("a predicateType is required") } image := imageInfo.String() statementsByPredicate, types := buildStatemen...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) verifyAttestation(statements []map[string]interface{}, attestation kyvernov1.Attestation, imageInfo apiutils.ImageInfo) error { if attestation.PredicateType == "" { return fmt.Errorf("a predicateType is required") } image := imageInfo.String() statementsByPredicate, types := buildStatemen...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildNotaryV2Verifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, ) (images.ImageVerifier, *images.Options, string) { path := "" opts := &images.Options{ ImageRef: image, Cert: attestor.Certificates.Certificate, CertChain: ...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildNotaryV2Verifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, ) (images.ImageVerifier, *images.Options, string) { path := "" opts := &images.Options{ ImageRef: image, Cert: attestor.Certificates.Certificate, CertChain: ...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildNotaryV2Verifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, ) (images.ImageVerifier, *images.Options, string) { path := "" opts := &images.Options{ ImageRef: image, Cert: attestor.Certificates.Certificate, CertChain: ...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (iv *ImageVerifier) buildNotaryV2Verifier( attestor kyvernov1.Attestor, imageVerify kyvernov1.ImageVerification, image string, ) (images.ImageVerifier, *images.Options, string) { path := "" opts := &images.Options{ ImageRef: image, Cert: attestor.Certificates.Certificate, CertChain: ...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (p *Parser) isPrefixHeading(data []byte) bool { if data[0] != '#' { return false } if p.extensions&SpaceHeadings != 0 { level := skipCharN(data, 0, '#', 6) if level == len(data) || data[level] != ' ' { return false } } return true }
0
Go
CWE-125
Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
https://cwe.mitre.org/data/definitions/125.html
vulnerable
func (builder *builder) Cmp(i1, i2 frontend.Variable) frontend.Variable { vars, _ := builder.toVariables(i1, i2) bi1 := builder.ToBinary(vars[0], builder.cs.FieldBitLen()) bi2 := builder.ToBinary(vars[1], builder.cs.FieldBitLen()) res := builder.cstZero() for i := builder.cs.FieldBitLen() - 1; i >= 0; i-- { ...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) Cmp(i1, i2 frontend.Variable) frontend.Variable { vars, _ := builder.toVariables(i1, i2) bi1 := builder.ToBinary(vars[0], builder.cs.FieldBitLen()) bi2 := builder.ToBinary(vars[1], builder.cs.FieldBitLen()) res := builder.cstZero() for i := builder.cs.FieldBitLen() - 1; i >= 0; i-- { ...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (builder *builder) mustBeLessOrEqVar(a, bound frontend.Variable) { // here bound is NOT a constant, // but a can be either constant or a wire. _, aConst := builder.constantValue(a) debug := builder.newDebugInfo("mustBeLessOrEq", a, " <= ", bound) nbBits := builder.cs.FieldBitLen() aBits := bits.ToBinary(...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) mustBeLessOrEqVar(a, bound frontend.Variable) { // here bound is NOT a constant, // but a can be either constant or a wire. _, aConst := builder.constantValue(a) debug := builder.newDebugInfo("mustBeLessOrEq", a, " <= ", bound) nbBits := builder.cs.FieldBitLen() aBits := bits.ToBinary(...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (builder *builder) AssertIsLessOrEqual(v frontend.Variable, bound frontend.Variable) { cv, vConst := builder.constantValue(v) cb, bConst := builder.constantValue(bound) // both inputs are constants if vConst && bConst { bv, bb := builder.cs.ToBigInt(cv), builder.cs.ToBigInt(cb) if bv.Cmp(bb) == 1 { pan...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) AssertIsLessOrEqual(v frontend.Variable, bound frontend.Variable) { cv, vConst := builder.constantValue(v) cb, bConst := builder.constantValue(bound) // both inputs are constants if vConst && bConst { bv, bb := builder.cs.ToBigInt(cv), builder.cs.ToBigInt(cb) if bv.Cmp(bb) == 1 { pan...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (builder *builder) mustBeLessOrEqCst(a expr.LinearExpression, bound *big.Int) { nbBits := builder.cs.FieldBitLen() // ensure the bound is positive, it's bit-len doesn't matter if bound.Sign() == -1 { panic("AssertIsLessOrEqual: bound must be positive") } if bound.BitLen() > nbBits { panic("AssertIsLessO...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) mustBeLessOrEqCst(a expr.LinearExpression, bound *big.Int) { nbBits := builder.cs.FieldBitLen() // ensure the bound is positive, it's bit-len doesn't matter if bound.Sign() == -1 { panic("AssertIsLessOrEqual: bound must be positive") } if bound.BitLen() > nbBits { panic("AssertIsLessO...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (builder *builder) Cmp(i1, i2 frontend.Variable) frontend.Variable { bi1 := builder.ToBinary(i1, builder.cs.FieldBitLen()) bi2 := builder.ToBinary(i2, builder.cs.FieldBitLen()) var res frontend.Variable res = 0 for i := builder.cs.FieldBitLen() - 1; i >= 0; i-- { iszeroi1 := builder.IsZero(bi1[i]) isze...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) Cmp(i1, i2 frontend.Variable) frontend.Variable { bi1 := builder.ToBinary(i1, builder.cs.FieldBitLen()) bi2 := builder.ToBinary(i2, builder.cs.FieldBitLen()) var res frontend.Variable res = 0 for i := builder.cs.FieldBitLen() - 1; i >= 0; i-- { iszeroi1 := builder.IsZero(bi1[i]) isze...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (builder *builder) AssertIsLessOrEqual(v frontend.Variable, bound frontend.Variable) { switch b := bound.(type) { case expr.Term: builder.mustBeLessOrEqVar(v, b) default: builder.mustBeLessOrEqCst(v, utils.FromInterface(b)) } }
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) AssertIsLessOrEqual(v frontend.Variable, bound frontend.Variable) { switch b := bound.(type) { case expr.Term: builder.mustBeLessOrEqVar(v, b) default: builder.mustBeLessOrEqCst(v, utils.FromInterface(b)) } }
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (builder *builder) mustBeLessOrEqCst(a frontend.Variable, bound big.Int) { nbBits := builder.cs.FieldBitLen() // ensure the bound is positive, it's bit-len doesn't matter if bound.Sign() == -1 { panic("AssertIsLessOrEqual: bound must be positive") } if bound.BitLen() > nbBits { panic("AssertIsLessOrEqua...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) mustBeLessOrEqCst(a frontend.Variable, bound big.Int) { nbBits := builder.cs.FieldBitLen() // ensure the bound is positive, it's bit-len doesn't matter if bound.Sign() == -1 { panic("AssertIsLessOrEqual: bound must be positive") } if bound.BitLen() > nbBits { panic("AssertIsLessOrEqua...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (builder *builder) mustBeLessOrEqVar(a frontend.Variable, bound expr.Term) { debug := builder.newDebugInfo("mustBeLessOrEq", a, " <= ", bound) nbBits := builder.cs.FieldBitLen() aBits := bits.ToBinary(builder, a, bits.WithNbDigits(nbBits), bits.WithUnconstrainedOutputs()) boundBits := builder.ToBinary(bound...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (builder *builder) mustBeLessOrEqVar(a frontend.Variable, bound expr.Term) { debug := builder.newDebugInfo("mustBeLessOrEq", a, " <= ", bound) nbBits := builder.cs.FieldBitLen() aBits := bits.ToBinary(builder, a, bits.WithNbDigits(nbBits), bits.WithUnconstrainedOutputs()) boundBits := builder.ToBinary(bound...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func (circuit *recursiveHint) Define(api frontend.API) error { // first hint produces wire w1 w1, _ := api.Compiler().NewHint(make3, 1) // this linear expression is not recorded in a R1CS just yet linearExpression := api.Add(circuit.A, w1[0]) // api.ToBinary calls another hint (bits.NBits) with linearExpression ...
0
Go
CWE-191
Integer Underflow (Wrap or Wraparound)
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result.
https://cwe.mitre.org/data/definitions/191.html
vulnerable
func (circuit *recursiveHint) Define(api frontend.API) error { // first hint produces wire w1 w1, _ := api.Compiler().NewHint(make3, 1) // this linear expression is not recorded in a R1CS just yet linearExpression := api.Add(circuit.A, w1[0]) // api.ToBinary calls another hint (bits.NBits) with linearExpression ...
0
Go
CWE-697
Incorrect Comparison
The product compares two entities in a security-relevant context, but the comparison is incorrect, which may lead to resultant weaknesses.
https://cwe.mitre.org/data/definitions/697.html
vulnerable
func handleRequestBody(c *Client, r *Request) error { var bodyBytes []byte releaseBuffer(r.bodyBuf) r.bodyBuf = nil switch body := r.Body.(type) { case io.Reader: if c.setContentLength || r.setContentLength { // keep backward compatibility r.bodyBuf = acquireBuffer() if _, err := r.bodyBuf.ReadFrom(body);...
0
Go
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
The product contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.
https://cwe.mitre.org/data/definitions/362.html
vulnerable
func (s *memoryStore) Verify(id, answer string, clear bool) bool { v := s.Get(id, clear) return v == answer }
0
Go
CWE-345
Insufficient Verification of Data Authenticity
The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.
https://cwe.mitre.org/data/definitions/345.html
vulnerable
func (r *RoleBindingReflector) GetUserNamespacesFromRequest(req request.Request) ([]string, error) { var err error username, groups, _ := req.GetUserAndGroups() namespaces := sets.NewString() userOwnerKind := capsulev1beta2.UserOwner var userRoleBindings []interface{} if strings.HasPrefix(username, serviceac...
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func OwnerRoleBindingsIndexFunc(obj interface{}) (result []string, err error) { rb := obj.(*rbacv1.RoleBinding) for _, subject := range rb.Subjects { result = append(result, fmt.Sprintf("%s-%s", subject.Kind, subject.Name)) } return result, nil }
0
Go
NVD-CWE-noinfo
null
null
null
vulnerable
func (maap *MesheryApplicationPersister) GetMesheryApplications(search, order string, page, pageSize uint64, updatedAfter string) ([]byte, error) { order = sanitizeOrderInput(order, []string{"created_at", "updated_at", "name"}) if order == "" { order = "updated_at desc" } count := int64(0) applications := []*M...
0
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
vulnerable
func (mfp *MesheryFilterPersister) GetMesheryCatalogFilters(page, pageSize, search, order string) ([]byte, error) { var err error order = sanitizeOrderInput(order, []string{"created_at", "updated_at", "name"}) if order == "" { order = "updated_at desc" } var pg int if page != "" { pg, err = strconv.Atoi(pag...
0
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
vulnerable
func (mfp *MesheryFilterPersister) GetMesheryFilters(search, order string, page, pageSize uint64, visibility []string) ([]byte, error) { order = sanitizeOrderInput(order, []string{"created_at", "updated_at", "name"}) if order == "" { order = "updated_at desc" } count := int64(0) filters := []*MesheryFilter{} ...
0
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
vulnerable
func (mkcp *MesheryK8sContextPersister) GetMesheryK8sContexts(search, order string, page, pageSize uint64) ([]byte, error) { order = sanitizeOrderInput(order, []string{"created_at", "updated_at", "name"}) if order == "" { order = "updated_at desc" } count := int64(0) contexts := []*K8sContext{} query := mkcp...
0
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
vulnerable