jbruinaud / WebGoatNet

WebGoat .Net for demos
0 stars 0 forks source link

CX Improper_Resource_Shutdown_or_Release @ Code/IOHelper.cs [master] #190

Open jbruinaud opened 4 years ago

jbruinaud commented 4 years ago

Improper_Resource_Shutdown_or_Release issue exists @ Code/IOHelper.cs in branch master

The application's ReadAllFromFile method in Code\IOHelper.cs defines and initializes the FileStream object at 11. This object encapsulates a limited computing resource, such as open file streams, database connections, or network streams. This resource is not properly closed and released in all situations. 

Severity: Low

CWE:404

Checkmarx

Lines: 13 14


Code (Line #13):

            FileStream fs = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Read);

Code (Line #14):

            StreamReader sr = new StreamReader(fs);