-
Notifications
You must be signed in to change notification settings - Fork 3
Test2 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Test2 #3
Conversation
…o contrast-codesec
} catch (IOException e) { | ||
System.out.println("Problem executing cmdi - TestCase"); | ||
response.getWriter() | ||
.println(org.owasp.esapi.ESAPI.encoder().encodeForHTML(e.getMessage())); |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium test
Error information
try { | ||
java.sql.Connection connection = | ||
org.owasp.benchmark.helpers.DatabaseHelper.getSqlConnection(); | ||
java.sql.CallableStatement statement = connection.prepareCall(sql); |
Check failure
Code scanning / CodeQL
Query built from user-controlled sources High test
user-provided value
"Sensitive value '" | ||
+ org.owasp | ||
.esapi | ||
.ESAPI | ||
.encoder() | ||
.encodeForHTML(new String(input)) | ||
+ "' hashed and stored<br/>"); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
user | ||
+ " has been remembered with cookie: " | ||
+ rememberMe.getName() | ||
+ " whose value is: " | ||
+ rememberMe.getValue() | ||
+ "<br/>"); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
Cross-site scripting vulnerability due to a
user-provided value
@pixeebot next |
@davewichers, I don't have any suggestions at this time, but I am always learning, and I will let you know if anything comes up! |
.encoder() | ||
.encodeForHTML(fileTarget.toString()) | ||
+ "' created."); | ||
if (fileTarget.exists()) { |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High test
user-provided value
|
||
ProcessBuilder pb = new ProcessBuilder(); | ||
|
||
pb.command(argList); |
Check failure
Code scanning / CodeQL
Uncontrolled command line Critical test
user-provided value
|
||
response.setHeader("X-XSS-Protection", "0"); | ||
Object[] obj = {"a", "b"}; | ||
response.getWriter().format(java.util.Locale.US, param, obj); |
Check failure
Code scanning / CodeQL
Use of externally-controlled format string Critical test
user-provided value
|
||
response.setHeader("X-XSS-Protection", "0"); | ||
Object[] obj = {"a", "b"}; | ||
response.getWriter().format(param, obj); |
Check failure
Code scanning / CodeQL
Use of externally-controlled format string Critical test
user-provided value
(javax.naming.directory.InitialDirContext) ctx; | ||
boolean found = false; | ||
javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> results = | ||
idc.search(base, filter, filters, sc); |
Check failure
Code scanning / CodeQL
LDAP query built from user-controlled sources Critical test
user-provided value
|
||
response.setHeader("X-XSS-Protection", "0"); | ||
Object[] obj = {"a", "b"}; | ||
response.getWriter().format(java.util.Locale.US, param, obj); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
"LDAP query results: nothing found for query: " | ||
+ org.owasp.esapi.ESAPI.encoder().encodeForHTML(filter)); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
|
||
response.setHeader("X-XSS-Protection", "0"); | ||
Object[] obj = {"a", "b"}; | ||
response.getWriter().format(param, obj); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
"Access to file: '" | ||
+ org.owasp | ||
.esapi | ||
.ESAPI | ||
.encoder() | ||
.encodeForHTML(fileTarget.toString()) | ||
+ "' created."); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
@pixeebot next |
@davewichers, I don't have any suggestions at this time, but I am always learning, and I will let you know if anything comes up! |
Backport changes from main into this branch
} catch (IOException e) { | ||
System.out.println("Problem executing cmdi - TestCase"); | ||
response.getWriter() | ||
.println(org.owasp.esapi.ESAPI.encoder().encodeForHTML(e.getMessage())); |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium test
Error information
response.getWriter() | ||
.println( | ||
"Problem executing crypto - javax.crypto.Cipher.getInstance(java.lang.String,java.security.Provider) Test Case"); | ||
e.printStackTrace(response.getWriter()); |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium test
Error information
response.getWriter() | ||
.println( | ||
"Problem executing crypto - javax.crypto.Cipher.getInstance(java.lang.String,java.security.Provider) Test Case"); | ||
e.printStackTrace(response.getWriter()); |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium test
Error information
response.getWriter() | ||
.println( | ||
"Problem executing crypto - javax.crypto.Cipher.getInstance(java.lang.String,java.security.Provider) Test Case"); | ||
e.printStackTrace(response.getWriter()); |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium test
Error information
response.getWriter() | ||
.println( | ||
"Problem executing crypto - javax.crypto.Cipher.getInstance(java.lang.String,java.security.Provider) Test Case"); | ||
e.printStackTrace(response.getWriter()); |
Check warning
Code scanning / CodeQL
Information exposure through a stack trace Medium test
Error information
javax.crypto.Cipher c = javax.crypto.Cipher.getInstance(algorithm); | ||
|
||
// Prepare the cipher to encrypt | ||
javax.crypto.SecretKey key = javax.crypto.KeyGenerator.getInstance("DES").generateKey(); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High test
DES
javax.crypto.Cipher c = | ||
javax.crypto.Cipher.getInstance("DES/CBC/PKCS5Padding", "SunJCE"); | ||
// Prepare the cipher to encrypt | ||
javax.crypto.SecretKey key = javax.crypto.KeyGenerator.getInstance("DES").generateKey(); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm High test
DES
cookie.setHttpOnly(true); | ||
cookie.setPath(request.getRequestURI()); // i.e., set path to JUST this servlet | ||
// e.g., /benchmark/sql-01/BenchmarkTest01001 | ||
response.addCookie(cookie); |
Check warning
Code scanning / CodeQL
HTTP response splitting Medium test
user-provided value
"Created cookie: 'SomeCookie': with value: '" | ||
+ org.owasp.esapi.ESAPI.encoder().encodeForHTML(str) | ||
+ "' and secure flag set to: true"); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
"Sensitive value: '" | ||
+ org.owasp | ||
.esapi | ||
.ESAPI | ||
.encoder() | ||
.encodeForHTML(new String(input)) | ||
+ "' encrypted and stored<br/>"); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
@pixeebot next |
@davewichers, I don't have any suggestions at this time, but I am always learning, and I will let you know if anything comes up! |
// System.out.println("Filter " + filter); | ||
boolean found = false; | ||
javax.naming.NamingEnumeration<javax.naming.directory.SearchResult> results = | ||
ctx.search(base, filter, filters, sc); |
Check failure
Code scanning / CodeQL
LDAP query built from user-controlled sources Critical test
user-provided value
"LDAP query results: nothing found for query: " | ||
+ org.owasp.esapi.ESAPI.encoder().encodeForHTML(filter)); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
"No results returned for query: " | ||
+ org.owasp.esapi.ESAPI.encoder().encodeForHTML(sql)); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
"Sensitive value '" | ||
+ org.owasp | ||
.esapi | ||
.ESAPI | ||
.encoder() | ||
.encodeForHTML(new String(input)) | ||
+ "' hashed and stored<br/>"); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
user | ||
+ " has been remembered with cookie: " | ||
+ rememberMe.getName() | ||
+ " whose value is: " | ||
+ rememberMe.getValue() | ||
+ "<br/>"); |
Check warning
Code scanning / CodeQL
Cross-site scripting Medium test
user-provided value
Cross-site scripting vulnerability due to a
user-provided value
org.owasp.benchmark.helpers.DatabaseHelper.getSqlConnection(); | ||
java.sql.PreparedStatement statement = | ||
connection.prepareStatement( | ||
sql, |
Check failure
Code scanning / CodeQL
Query built from user-controlled sources High test
user-provided value
// org.owasp.benchmark.helpers.DatabaseHelper.JDBCtemplate.queryForLong(sql); | ||
Long results = | ||
org.owasp.benchmark.helpers.DatabaseHelper.JDBCtemplate.queryForObject( | ||
sql, Long.class); |
Check failure
Code scanning / CodeQL
Query built from user-controlled sources High test
user-provided value
response.getWriter().println("Welcome back: " + user + "<br/>"); | ||
} else { | ||
javax.servlet.http.Cookie rememberMe = | ||
new javax.servlet.http.Cookie(cookieName, rememberMeKey); |
Check failure
Code scanning / CodeQL
Insecure randomness High test
Insecure randomness source.
@pixeebot next |
@davewichers, I don't have any suggestions at this time, but I am always learning, and I will let you know if anything comes up! |
No description provided.