Displaying test cases 31226 - 31250 of 32356 in total
-
CWE: 80 Cross Site Scripting (XSS) BadSource: database Read data from a database GoodSource: A hardcoded string BadSink: Display of data in web page without any encoding or validation Flow Variant: 11 Control flow: if(IO.staticReturnsTrue()) and if(IO.staticReturnsFalse())
-
CWE: 789 Uncontrolled Memory Allocation BadSource: random Set data to a random value GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: HashMap BadSink : Create a HashMap using data as the initial size Flow Variant: 45 Data flow: data passed as a private class member vari...
-
CWE: 789 Uncontrolled Memory Allocation BadSource: console_readLine Read data from the console using readLine GoodSource: A hardcoded non-zero, non-min, non-max, even number BadSink: HashMap Create a HashMap using data as the initial size Flow Variant: 09 Control flow: if(IO.STATIC_FINAL_TRUE...
-
CWE: 789 Uncontrolled Memory Allocation BadSource: connect_tcp Read data using an outbound tcp connection GoodSource: A hardcoded non-zero, non-min, non-max, even number BadSink: HashSet Create a HashSet using data as the initial size Flow Variant: 11 Control flow: if(IO.staticReturnsTrue()) ...
-
CWE: 690 Unchecked return value is null, leading to a null pointer dereference. BadSource: getParameter_Servlet Set data to return of getParameter_Servlet GoodSource: Set data to fixed, non-null String Sinks: trim GoodSink: Check data for null before calling trim() BadSink : Call trim() on p...
-
CWE: 533 Information Exposure through Server Log Files Sinks: GoodSink: log non-sensitive information to the server log BadSink : Expose the session ID to the server log Flow Variant: 14 Control flow: if(IO.staticFive==5) and if(IO.staticFive!=5)
-
CWE: 523 Unprotected Transport of Credentials Sinks: non_ssl GoodSink: Send across SSL connection BadSink : Send across non-SSL connection Flow Variant: 08 Control flow: if(privateReturnsTrue()) and if(privateReturnsFalse())
-
CWE: 470 Use of Externally-Controlled Input to Select Classes or Code (Unsafe Reflection) BadSource: PropertiesFile Read data from a .properties file (in property named data) GoodSource: Set data to a hardcoded class name BadSink: Instantiate class named in data Flow Variant: 17 Control flow...
-
CWE: 400 Resource Exhaustion BadSource: random Set count to a random value GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: for_loop GoodSink: Validate count before using it as the loop variant in a for loop BadSink : Use count as the loop variant in a for loop Flow Va...
-
CWE: 400 Resource Exhaustion BadSource: PropertiesFile Read count from a .properties file (in property named data) GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: write GoodSink: Write to a file count number of times, but first validate count BadSink : Write to a file ...
-
CWE: 400 Resource Exhaustion BadSource: PropertiesFile Read count from a .properties file (in property named data) GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: for_loop GoodSink: Validate count before using it as the loop variant in a for loop BadSink : Use count as...
-
CWE: 400 Resource Exhaustion BadSource: File Read count from file (named c:\data.txt) GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: for_loop GoodSink: Validate count before using it as the loop variant in a for loop BadSink : Use count as the loop variant in a for lo...
-
CWE: 382 Use of System.exit() Sinks: Runtime GoodSink: notify user, do not use Runtime.getRuntime.exit BadSink : calling Runtime.getRuntime.exit, breaching best practices Flow Variant: 15 Control flow: switch(7)
-
CWE: 369 Divide by zero BadSource: getParameter_Servlet Read data from a querystring using getParameter() GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: modulo GoodSink: Check for zero before modulo BadSink : Modulo by a value that may be zero Flow Variant: 75 Data f...
-
CWE: 369 Divide by zero BadSource: database Read data from a database GoodSource: A hardcoded non-zero number (two) Sinks: divide GoodSink: Check for zero before dividing BadSink : Dividing by a value that may be zero Flow Variant: 74 Data flow: data passed in a HashMap from one method to a...
-
CWE: 369 Divide by zero BadSource: connect_tcp Read data using an outbound tcp connection GoodSource: A hardcoded non-zero number (two) Sinks: modulo GoodSink: Check for zero before modulo BadSink : Modulo by a value that may be zero Flow Variant: 54 Data flow: data passed as an argument fr...
-
CWE: 369 Divide by zero BadSource: connect_tcp Read data using an outbound tcp connection GoodSource: A hardcoded non-zero number (two) Sinks: divide GoodSink: Check for zero before dividing BadSink : Dividing by a value that may be zero Flow Variant: 03 Control flow: if(5==5) and if(5!=5)
-
CWE: 329 Not using random IV with CBC Mode Sinks: GoodSink: use random iv BadSink : use hardcoded iv Flow Variant: 07 Control flow: if(privateFive==5) and if(privateFive!=5)
-
CWE: 315 Storing plaintext data in a cookie BadSource: Set data to credentials (without hashing or encryption) GoodSource: Set data to a hash of credentials Sinks: GoodSink: Hash data before storing in cookie BadSink : Store data directly in cookie Flow Variant: 12 Control flow: if(IO.stat...
-
CWE: 315 Storing plaintext data in a cookie BadSource: Set data to credentials (without hashing or encryption) GoodSource: Set data to a hash of credentials Sinks: GoodSink: Hash data before storing in cookie BadSink : Store data directly in cookie Flow Variant: 09 Control flow: if(IO.STAT...
-
CWE: 23 Relative Path Traversal BadSource: listen_tcp Read data using a listening tcp connection GoodSource: A hardcoded string BadSink: readFile no validation Flow Variant: 16 Control flow: while(true)
-
CWE: 197 Numeric Truncation Error BadSource: random Set data to a random value GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: to_byte BadSink : Convert data to a byte Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fift...
-
CWE: 191 Integer Underflow BadSource: database Read data from a database GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: multiply GoodSink: Ensure there will not be an underflow before multiplying data by 2 BadSink : If data is negative, multiply by 2, which can cause ...
-
CWE: 191 Integer Underflow BadSource: rand Set data to result of rand() GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: multiply GoodSink: Ensure there will not be an underflow before multiplying data by 2 BadSink : If data is negative, multiply by 2, which can cause a...
-
CWE: 190 Integer Overflow BadSource: random Set data to a random value GoodSource: A hardcoded non-zero, non-min, non-max, even number Sinks: multiply GoodSink: Ensure there will not be an overflow before multiplying data by 2 BadSink : If data is positive, multiply by 2, which can cause an ...