cxnleach / Vuln_GO_App

MIT License
0 stars 0 forks source link

CX Denial_Of_Service_Resource_Exhaustion @ vulnerable/sql.go [master] #73

Open github-actions[bot] opened 1 month ago

github-actions[bot] commented 1 month ago

Denial_Of_Service_Resource_Exhaustion issue exists @ vulnerable/sql.go in branch master

*The resource nbEntries allocated by PrepareSQLDB in the file vulnerable\sql.go at line 28 is prone to resource exhaustion when used by PrepareSQLDB in the file vulnerable\sql.go at line 38.Similarity ID: 633266600

The resource ctx allocated by GetProducts in the file vulnerable\sql.go at line 68 is prone to resource exhaustion when used by GetProducts in the file vulnerable\sql.go at line 75.Similarity ID: -56057004

The resource db allocated by GetProducts in the file vulnerable\sql.go at line 68 is prone to resource exhaustion when used by GetProducts in the file vulnerable\sql.go at line 75.Similarity ID: -505299855*

Severity: Medium

CWE:400

Vulnerability details and guidance

Internal Guidance

Checkmarx

Training Recommended Fix

Lines: 68 28


Code (Line #68):

func GetProducts(ctx context.Context, db *sql.DB, category string) ([]Product, error) {

Code (Line #28):

func PrepareSQLDB(nbEntries int) (*sql.DB, error) {

github-actions[bot] commented 1 month ago

Issue still exists.