instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean absolute(int index) throws SQLException {
checkScrollable();
// index is 1-based, but internally we use 0-based indices
int internalIndex;
if (index == 0) {
beforeFirst();
return false;
}
final int rows_size = rows.size();
// if index<0, count from the end of the result set, but check
// to be sure that it is not beyond the first index
if (index < 0) {
if (index >= -rows_size) {
internalIndex = rows_size + index;
} else {
beforeFirst();
return false;
}
} else {
// must be the case that index>0,
// find the correct place, assuming that
// the index is not too large
if (index <= rows_size) {
internalIndex = index - 1;
} else {
afterLast();
return false;
}
}
currentRow = internalIndex;
initRowBuffer();
onInsertRow = false;
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: absolute
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
absolute
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isThrowable() { return Throwable.class.isAssignableFrom(_class); }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isThrowable
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
isThrowable
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setOnlyAlertOnce(boolean onlyAlertOnce) {
setFlag(FLAG_ONLY_ALERT_ONCE, onlyAlertOnce);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOnlyAlertOnce
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setOnlyAlertOnce
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getAttribute(StartElement element, QName qname) {
Attribute attribute = element.getAttributeByName(qname);
return attribute != null ? attribute.getValue() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttribute
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
getAttribute
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean hasStartingWindow() {
if (startingDisplayed || mStartingData != null) {
return true;
}
for (int i = mChildren.size() - 1; i >= 0; i--) {
if (getChildAt(i).mAttrs.type == TYPE_APPLICATION_STARTING) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasStartingWindow
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
hasStartingWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isWinVisibleLw() {
return (mActivityRecord == null || mActivityRecord.mVisibleRequested
|| mActivityRecord.isAnimating(TRANSITION | PARENTS)) && isVisible();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWinVisibleLw
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
isWinVisibleLw
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int checkUidPermission(String permName, int uid) {
final int userId = UserHandle.getUserId(uid);
if (!sUserManager.exists(userId)) {
return PackageManager.PERMISSION_DENIED;
}
synchronized (mPackages) {
Object obj = mSettings.getUserIdLPr(UserHandle.getAppId(uid));
if (obj != null) {
final SettingBase ps = (SettingBase) obj;
final PermissionsState permissionsState = ps.getPermissionsState();
if (permissionsState.hasPermission(permName, userId)) {
return PackageManager.PERMISSION_GRANTED;
}
// Special case: ACCESS_FINE_LOCATION permission includes ACCESS_COARSE_LOCATION
if (Manifest.permission.ACCESS_COARSE_LOCATION.equals(permName) && permissionsState
.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION, userId)) {
return PackageManager.PERMISSION_GRANTED;
}
} else {
ArraySet<String> perms = mSystemPermissions.get(uid);
if (perms != null) {
if (perms.contains(permName)) {
return PackageManager.PERMISSION_GRANTED;
}
if (Manifest.permission.ACCESS_COARSE_LOCATION.equals(permName) && perms
.contains(Manifest.permission.ACCESS_FINE_LOCATION)) {
return PackageManager.PERMISSION_GRANTED;
}
}
}
}
return PackageManager.PERMISSION_DENIED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkUidPermission
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
checkUidPermission
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onResume() {
NewsReaderListFragment newsReaderListFragment = getSlidingListFragment();
if (newsReaderListFragment != null) {
newsReaderListFragment.reloadAdapter();
newsReaderListFragment.bindUserInfoToUI();
}
invalidateOptionsMenu();
super.onResume();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onResume
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onResume
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
try {
return toJSON();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfos.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toString
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRequestInfos.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
public ActionForward unspecified(ActionMapping rMapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ActionErrors errors = new ActionErrors();
//Email parameters
HttpSession session = request.getSession();
Host currentHost = hostWebAPI.getCurrentHost(request);
User currentUser = (User) session.getAttribute(WebKeys.CMS_USER);
String method = request.getMethod();
String errorURL = request.getParameter("errorURL");
errorURL = (!UtilMethods.isSet(errorURL) ? request.getHeader("referer") : errorURL);
if(errorURL.indexOf("?") > -1)
{
errorURL = errorURL.substring(0,errorURL.lastIndexOf("?"));
}
String x = request.getRequestURI();
if(request.getParameterMap().size() <2){
return null;
}
//Checking for captcha
boolean useCaptcha = Config.getBooleanProperty("FORCE_CAPTCHA",true);
if(!useCaptcha){
useCaptcha = new Boolean(request.getParameter("useCaptcha")).booleanValue();
}
String captcha = request.getParameter("captcha");
if (useCaptcha) {
Captcha captchaObj = (Captcha) session.getAttribute(Captcha.NAME);
String captchaSession=captchaObj!=null ? captchaObj.getAnswer() : null;
if(captcha ==null && Config.getBooleanProperty("FORCE_CAPTCHA",true)){
response.getWriter().write("Captcha is required to submit this form ( FORCE_CAPTCHA=true ).<br>To change this, edit the dotmarketing-config.properties and set FORCE_CAPTCHA=false");
return null;
}
if(!UtilMethods.isSet(captcha) || !UtilMethods.isSet(captchaSession) || !captcha.equals(captchaSession)) {
errors.add(Globals.ERROR_KEY, new ActionMessage("message.contentlet.required", "Validation Image"));
request.setAttribute(Globals.ERROR_KEY, errors);
session.setAttribute(Globals.ERROR_KEY, errors);
String queryString = request.getQueryString();
String invalidCaptchaURL = request.getParameter("invalidCaptchaReturnUrl");
if(!UtilMethods.isSet(invalidCaptchaURL)) {
invalidCaptchaURL = errorURL;
}
invalidCaptchaURL = invalidCaptchaURL.replaceAll("\\s", " ");
ActionForward af = new ActionForward();
af.setRedirect(true);
if (UtilMethods.isSet(queryString)) {
af.setPath(invalidCaptchaURL + "?" + queryString + "&error=Validation-Image");
} else {
af.setPath(invalidCaptchaURL + "?error=Validation-Image");
}
return af;
}
}
Map<String, Object> parameters = null;
if (request instanceof UploadServletRequest)
{
UploadServletRequest uploadReq = (UploadServletRequest) request;
parameters = new HashMap<String, Object> (uploadReq.getParameterMap());
for (Entry<String, Object> entry : parameters.entrySet())
{
if(entry.getKey().toLowerCase().indexOf("file") > -1 && !entry.getKey().equals("attachFiles"))
{
parameters.put(entry.getKey(), uploadReq.getFile(entry.getKey()));
}
}
}
else
{
parameters = new HashMap<String, Object> (request.getParameterMap());
}
Set<String> toValidate = new java.util.HashSet<String>(parameters.keySet());
//Enhancing the ignored parameters not to be send in the email
String ignoredParameters = (String) EmailFactory.getMapValue("ignore", parameters);
if(ignoredParameters == null)
{
ignoredParameters = "";
}
ignoredParameters += ":useCaptcha:captcha:invalidCaptchaReturnUrl:return:returnUrl:errorURL:ignore:to:from:cc:bcc:dispatch:order:prettyOrder:autoReplyTo:autoReplyFrom:autoReplyText:autoReplySubject:";
parameters.put("ignore", ignoredParameters);
// getting categories from inodes
// getting parent category name and child categories name
// and replacing the "categories" parameter
String categories = "";
String[] categoriesArray = request.getParameterValues("categories");
if (categoriesArray != null) {
HashMap hashCategories = new HashMap<String, String>();
for (int i = 0; i < categoriesArray.length; i++) {
Category node = (Category) InodeFactory.getInode(categoriesArray[i], Category.class);
Category parent = (Category) InodeFactory.getParentOfClass(node, Category.class);
String parentCategoryName = parent.getCategoryName();
if (hashCategories.containsKey(parentCategoryName)) {
String childCategoryName = (String) hashCategories.get(parentCategoryName);
if (UtilMethods.isSet(childCategoryName)) {
childCategoryName += ", ";
}
childCategoryName += node.getCategoryName();
hashCategories.put(parentCategoryName, childCategoryName);
}
else {
hashCategories.put(parentCategoryName, node.getCategoryName());
}
}
Set<String> keySet = hashCategories.keySet();
for (String stringKey: keySet) {
if (UtilMethods.isSet(categories)) {
categories += "; ";
}
categories += stringKey + " : " + (String) hashCategories.get(stringKey);
parameters.put(stringKey, (String) hashCategories.get(stringKey));
}
parameters.remove("categories");
}
WebForm webForm = new WebForm();
try
{
/*validation parameter should ignore the returnUrl and erroURL field in the spam check*/
String[] removeParams = ignoredParameters.split(":");
for(String param : removeParams){
toValidate.remove(param);
}
parameters.put("request", request);
parameters.put("response", response);
//Sending the email
webForm = EmailFactory.sendParameterizedEmail(parameters, toValidate, currentHost, currentUser);
webForm.setCategories(categories);
if(UtilMethods.isSet(request.getParameter("createAccount")) && request.getParameter("createAccount").equals("true"))
{
//if we create account set to true we create a user account and add user comments.
createAccount(webForm, request);
try{
String userInode = webForm.getUserInode();
String customFields = webForm.getCustomFields();
customFields += " User Inode = " + String.valueOf(userInode) + " | ";
webForm.setCustomFields(customFields);
}
catch(Exception e){
}
}
if(UtilMethods.isSet(webForm.getFormType())){
HibernateUtil.saveOrUpdate(webForm);
}
if (request.getParameter("return") != null)
{
ActionForward af = new ActionForward(SecurityUtils.stripReferer(request, request.getParameter("return")));
af.setRedirect(true);
return af;
}
else if (request.getParameter("returnUrl") != null)
{
ActionForward af = new ActionForward(SecurityUtils.stripReferer(request, request.getParameter("returnUrl")));
af.setRedirect(true);
return af;
}
else
{
return rMapping.findForward("thankYouPage");
}
}
catch (DotRuntimeException e)
{
errors.add(Globals.ERROR_KEY, new ActionMessage("error.processing.your.email"));
request.getSession().setAttribute(Globals.ERROR_KEY, errors);
String queryString = request.getQueryString();
if (queryString == null) {
java.util.Enumeration<String> parameterNames = request.getParameterNames();
queryString = "";
String parameterName;
for (; parameterNames.hasMoreElements();) {
parameterName = parameterNames.nextElement();
if (0 < queryString.length()) {
queryString = queryString + "&" + parameterName + "=" + UtilMethods.encodeURL(request.getParameter(parameterName));
} else {
queryString = parameterName + "=" + UtilMethods.encodeURL(request.getParameter(parameterName));
}
}
}
ActionForward af;
if (UtilMethods.isSet(queryString)) {
af = new ActionForward(SecurityUtils.stripReferer(request, errorURL + "?" + queryString));
} else {
af = new ActionForward(SecurityUtils.stripReferer(request, errorURL));
}
af.setRedirect(true);
return af;
}
}
|
Vulnerability Classification:
- CWE: CWE-254, CWE-264
- CVE: CVE-2016-8600
- Severity: MEDIUM
- CVSS Score: 5.0
Description: #9330: Remove attribute after getting the info from session
Function: unspecified
File: src/com/dotmarketing/cms/webforms/action/SubmitWebFormAction.java
Repository: dotCMS/core
Fixed Code:
@SuppressWarnings("unchecked")
public ActionForward unspecified(ActionMapping rMapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
ActionErrors errors = new ActionErrors();
//Email parameters
HttpSession session = request.getSession();
Host currentHost = hostWebAPI.getCurrentHost(request);
User currentUser = (User) session.getAttribute(WebKeys.CMS_USER);
String method = request.getMethod();
String errorURL = request.getParameter("errorURL");
errorURL = (!UtilMethods.isSet(errorURL) ? request.getHeader("referer") : errorURL);
if(errorURL.indexOf("?") > -1)
{
errorURL = errorURL.substring(0,errorURL.lastIndexOf("?"));
}
String x = request.getRequestURI();
if(request.getParameterMap().size() <2){
return null;
}
//Checking for captcha
boolean useCaptcha = Config.getBooleanProperty("FORCE_CAPTCHA",true);
if(!useCaptcha){
useCaptcha = new Boolean(request.getParameter("useCaptcha")).booleanValue();
}
String captcha = request.getParameter("captcha");
if (useCaptcha) {
Captcha captchaObj = (Captcha) session.getAttribute(Captcha.NAME);
//We need to remove the captcha info from the session.
session.removeAttribute(Captcha.NAME);
String captchaSession=captchaObj!=null ? captchaObj.getAnswer() : null;
if(captcha ==null && Config.getBooleanProperty("FORCE_CAPTCHA",true)){
response.getWriter().write("Captcha is required to submit this form ( FORCE_CAPTCHA=true ).<br>To change this, edit the dotmarketing-config.properties and set FORCE_CAPTCHA=false");
return null;
}
if(!UtilMethods.isSet(captcha) || !UtilMethods.isSet(captchaSession) || !captcha.equals(captchaSession)) {
errors.add(Globals.ERROR_KEY, new ActionMessage("message.contentlet.required", "Validation Image"));
request.setAttribute(Globals.ERROR_KEY, errors);
session.setAttribute(Globals.ERROR_KEY, errors);
String queryString = request.getQueryString();
String invalidCaptchaURL = request.getParameter("invalidCaptchaReturnUrl");
if(!UtilMethods.isSet(invalidCaptchaURL)) {
invalidCaptchaURL = errorURL;
}
invalidCaptchaURL = invalidCaptchaURL.replaceAll("\\s", " ");
ActionForward af = new ActionForward();
af.setRedirect(true);
if (UtilMethods.isSet(queryString)) {
af.setPath(invalidCaptchaURL + "?" + queryString + "&error=Validation-Image");
} else {
af.setPath(invalidCaptchaURL + "?error=Validation-Image");
}
return af;
}
}
Map<String, Object> parameters = null;
if (request instanceof UploadServletRequest)
{
UploadServletRequest uploadReq = (UploadServletRequest) request;
parameters = new HashMap<String, Object> (uploadReq.getParameterMap());
for (Entry<String, Object> entry : parameters.entrySet())
{
if(entry.getKey().toLowerCase().indexOf("file") > -1 && !entry.getKey().equals("attachFiles"))
{
parameters.put(entry.getKey(), uploadReq.getFile(entry.getKey()));
}
}
}
else
{
parameters = new HashMap<String, Object> (request.getParameterMap());
}
Set<String> toValidate = new java.util.HashSet<String>(parameters.keySet());
//Enhancing the ignored parameters not to be send in the email
String ignoredParameters = (String) EmailFactory.getMapValue("ignore", parameters);
if(ignoredParameters == null)
{
ignoredParameters = "";
}
ignoredParameters += ":useCaptcha:captcha:invalidCaptchaReturnUrl:return:returnUrl:errorURL:ignore:to:from:cc:bcc:dispatch:order:prettyOrder:autoReplyTo:autoReplyFrom:autoReplyText:autoReplySubject:";
parameters.put("ignore", ignoredParameters);
// getting categories from inodes
// getting parent category name and child categories name
// and replacing the "categories" parameter
String categories = "";
String[] categoriesArray = request.getParameterValues("categories");
if (categoriesArray != null) {
HashMap hashCategories = new HashMap<String, String>();
for (int i = 0; i < categoriesArray.length; i++) {
Category node = (Category) InodeFactory.getInode(categoriesArray[i], Category.class);
Category parent = (Category) InodeFactory.getParentOfClass(node, Category.class);
String parentCategoryName = parent.getCategoryName();
if (hashCategories.containsKey(parentCategoryName)) {
String childCategoryName = (String) hashCategories.get(parentCategoryName);
if (UtilMethods.isSet(childCategoryName)) {
childCategoryName += ", ";
}
childCategoryName += node.getCategoryName();
hashCategories.put(parentCategoryName, childCategoryName);
}
else {
hashCategories.put(parentCategoryName, node.getCategoryName());
}
}
Set<String> keySet = hashCategories.keySet();
for (String stringKey: keySet) {
if (UtilMethods.isSet(categories)) {
categories += "; ";
}
categories += stringKey + " : " + (String) hashCategories.get(stringKey);
parameters.put(stringKey, (String) hashCategories.get(stringKey));
}
parameters.remove("categories");
}
WebForm webForm = new WebForm();
try
{
/*validation parameter should ignore the returnUrl and erroURL field in the spam check*/
String[] removeParams = ignoredParameters.split(":");
for(String param : removeParams){
toValidate.remove(param);
}
parameters.put("request", request);
parameters.put("response", response);
//Sending the email
webForm = EmailFactory.sendParameterizedEmail(parameters, toValidate, currentHost, currentUser);
webForm.setCategories(categories);
if(UtilMethods.isSet(request.getParameter("createAccount")) && request.getParameter("createAccount").equals("true"))
{
//if we create account set to true we create a user account and add user comments.
createAccount(webForm, request);
try{
String userInode = webForm.getUserInode();
String customFields = webForm.getCustomFields();
customFields += " User Inode = " + String.valueOf(userInode) + " | ";
webForm.setCustomFields(customFields);
}
catch(Exception e){
}
}
if(UtilMethods.isSet(webForm.getFormType())){
HibernateUtil.saveOrUpdate(webForm);
}
if (request.getParameter("return") != null)
{
ActionForward af = new ActionForward(SecurityUtils.stripReferer(request, request.getParameter("return")));
af.setRedirect(true);
return af;
}
else if (request.getParameter("returnUrl") != null)
{
ActionForward af = new ActionForward(SecurityUtils.stripReferer(request, request.getParameter("returnUrl")));
af.setRedirect(true);
return af;
}
else
{
return rMapping.findForward("thankYouPage");
}
}
catch (DotRuntimeException e)
{
errors.add(Globals.ERROR_KEY, new ActionMessage("error.processing.your.email"));
request.getSession().setAttribute(Globals.ERROR_KEY, errors);
String queryString = request.getQueryString();
if (queryString == null) {
java.util.Enumeration<String> parameterNames = request.getParameterNames();
queryString = "";
String parameterName;
for (; parameterNames.hasMoreElements();) {
parameterName = parameterNames.nextElement();
if (0 < queryString.length()) {
queryString = queryString + "&" + parameterName + "=" + UtilMethods.encodeURL(request.getParameter(parameterName));
} else {
queryString = parameterName + "=" + UtilMethods.encodeURL(request.getParameter(parameterName));
}
}
}
ActionForward af;
if (UtilMethods.isSet(queryString)) {
af = new ActionForward(SecurityUtils.stripReferer(request, errorURL + "?" + queryString));
} else {
af = new ActionForward(SecurityUtils.stripReferer(request, errorURL));
}
af.setRedirect(true);
return af;
}
}
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
unspecified
|
src/com/dotmarketing/cms/webforms/action/SubmitWebFormAction.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(CardinalityEstimatorConfig c1, CardinalityEstimatorConfig c2) {
if (c1 == c2) {
return true;
}
if (c1 == null || c2 == null) {
return false;
}
return nullSafeEqual(c1.getName(), c2.getName())
&& c1.getBackupCount() == c2.getBackupCount()
&& c1.getAsyncBackupCount() == c2.getAsyncBackupCount()
&& c1.getAsyncBackupCount() == c2.getAsyncBackupCount()
&& isCompatible(c1.getMergePolicyConfig(), c2.getMergePolicyConfig())
&& nullSafeEqual(c1.getQuorumName(), c2.getQuorumName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public EntityReference getRelativeParentReference()
{
return this.parentReference;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelativeParentReference
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getRelativeParentReference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeLockedTaskLocked(final TaskRecord task) {
if (!mLockTaskModeTasks.remove(task)) {
return;
}
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "removeLockedTaskLocked: removed " + task);
if (mLockTaskModeTasks.isEmpty()) {
// Last one.
if (DEBUG_LOCKTASK) Slog.d(TAG_LOCKTASK, "removeLockedTask: task=" + task +
" last task, reverting locktask mode. Callers=" + Debug.getCallers(3));
final Message lockTaskMsg = Message.obtain();
lockTaskMsg.arg1 = task.userId;
lockTaskMsg.what = LOCK_TASK_END_MSG;
mHandler.sendMessage(lockTaskMsg);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeLockedTaskLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
removeLockedTaskLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void populateAccountSpinner(Context context, List<String> accounts, Spinner spinner) {
if (accounts.size() > 0) {
ArrayAdapter<String> adapter = new ArrayAdapter<>(context, R.layout.simple_list_item, accounts);
adapter.setDropDownViewResource(R.layout.simple_list_item);
spinner.setAdapter(adapter);
spinner.setEnabled(true);
} else {
ArrayAdapter<String> adapter = new ArrayAdapter<>(context,
R.layout.simple_list_item,
Arrays.asList(context.getString(R.string.no_accounts)));
adapter.setDropDownViewResource(R.layout.simple_list_item);
spinner.setAdapter(adapter);
spinner.setEnabled(false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateAccountSpinner
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
populateAccountSpinner
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateDemandHyperLink(EditTestCaseRequest request, Project project, String type);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateDemandHyperLink
File: framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
updateDemandHyperLink
|
framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArtemisSecurityConfigurationBuilder withAllowedLocalPorts(Set<Integer> allowedLocalPorts) {
this.allowedLocalPorts = Objects.requireNonNull(allowedLocalPorts);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withAllowedLocalPorts
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-501",
"CWE-653"
] |
CVE-2024-23682
|
HIGH
| 8.2
|
ls1intum/Ares
|
withAllowedLocalPorts
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
|
4c146ff85a0fa6022087fb0cffa6b8021d51101f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void openQs() {
cancelQsAnimation();
if (mQsExpansionEnabled) {
setQsExpansion(mQsMaxExpansionHeight);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openQs
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
openQs
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public VaadinSession findVaadinSession(VaadinRequest request)
throws ServiceException, SessionExpiredException {
VaadinSession vaadinSession = findOrCreateVaadinSession(request);
if (vaadinSession == null) {
return null;
}
VaadinSession.setCurrent(vaadinSession);
request.setAttribute(VaadinSession.class.getName(), vaadinSession);
return vaadinSession;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findVaadinSession
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
findVaadinSession
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, boolean isBodyNullable) throws ApiException {
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, isBodyNullable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeAPI
File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
invokeAPI
|
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("mLock")
private ArraySet<String> getUsedBitmapFilesLocked() {
final ArraySet<String> usedFiles = new ArraySet<>(1);
forEachShortcut(si -> {
if (si.getBitmapPath() != null) {
usedFiles.add(getFileName(si.getBitmapPath()));
}
});
return usedFiles;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUsedBitmapFilesLocked
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
getUsedBitmapFilesLocked
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getId() {
return id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
File: core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarElement.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getId
|
core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarElement.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAllowComment() {
return !Constants.getBooleanByFromWebSite("disable_comment_status");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAllowComment
File: service/src/main/java/com/zrlog/service/CommentService.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
isAllowComment
|
service/src/main/java/com/zrlog/service/CommentService.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Element toDOM(Document document) {
Element infoElement = document.createElement("Info");
toDOM(document, infoElement);
if (name != null) {
Element nameElement = document.createElement("Name");
nameElement.appendChild(document.createTextNode(name));
infoElement.appendChild(nameElement);
}
if (version != null) {
Element versionElement = document.createElement("Version");
versionElement.appendChild(document.createTextNode(version));
infoElement.appendChild(versionElement);
}
if (banner != null) {
Element bannerElement = document.createElement("Banner");
bannerElement.appendChild(document.createTextNode(banner));
infoElement.appendChild(bannerElement);
}
return infoElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/org/dogtagpki/common/Info.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/org/dogtagpki/common/Info.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void error(final CSSParseException exception) throws CSSException {
errorDetected_ = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: error
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
error
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPremiumSmsPermission(String packageName, int permission) {
mUsageMonitor.setPremiumSmsPermission(packageName, permission);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPremiumSmsPermission
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3858
|
HIGH
| 9.3
|
android
|
setPremiumSmsPermission
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("deprecation")
public Credential createAndStoreCredential(TokenResponse response, String userId)
throws IOException {
Credential credential = newCredential(userId).setFromTokenResponse(response);
if (credentialStore != null) {
credentialStore.store(userId, credential);
}
if (credentialDataStore != null) {
credentialDataStore.set(userId, new StoredCredential(credential));
}
if (credentialCreatedListener != null) {
credentialCreatedListener.onCredentialCreated(credential, response);
}
return credential;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createAndStoreCredential
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
createAndStoreCredential
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getRealIp(HttpServletRequest request) {
//bae env
if (ZrLogUtil.isBae() && request.getHeader("clientip") != null) {
return request.getHeader("clientip");
}
String ip = request.getHeader("X-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Real-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
return ip;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-21316
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix #55,#56 xxs inject
Function: getRealIp
File: common/src/main/java/com/zrlog/web/util/WebTools.java
Repository: 94fzb/zrlog
Fixed Code:
public static String getRealIp(HttpServletRequest request) {
String ip = null;
//bae env
if (ZrLogUtil.isBae() && request.getHeader("clientip") != null) {
ip = request.getHeader("clientip");
}
if (ip == null || ip.length() == 0) {
ip = request.getHeader("X-forwarded-for");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Real-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
if (InetAddressUtils.isIPv4Address(ip) || InetAddressUtils.isIPv6Address(ip)) {
return ip;
}
throw new IllegalArgumentException(ip + " not ipAddress");
}
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
getRealIp
|
common/src/main/java/com/zrlog/web/util/WebTools.java
|
b921c1ae03b8290f438657803eee05226755c941
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endTableRow(Map<String, String> parameters)
{
getXHTMLWikiPrinter().printXMLEndElement("tr");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endTableRow
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
endTableRow
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isJsonMime(String mime) {
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJsonMime
File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
isJsonMime
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
public int getLaunchTaskId() {
return mLaunchTaskId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLaunchTaskId
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getLaunchTaskId
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearApplicationDataSynchronous(String packageName) {
// Don't wipe packages marked allowClearUserData=false
try {
PackageInfo info = mPackageManager.getPackageInfo(packageName, 0);
if ((info.applicationInfo.flags & ApplicationInfo.FLAG_ALLOW_CLEAR_USER_DATA) == 0) {
if (MORE_DEBUG) Slog.i(TAG, "allowClearUserData=false so not wiping "
+ packageName);
return;
}
} catch (NameNotFoundException e) {
Slog.w(TAG, "Tried to clear data for " + packageName + " but not found");
return;
}
ClearDataObserver observer = new ClearDataObserver();
synchronized(mClearDataLock) {
mClearingData = true;
try {
mActivityManager.clearApplicationUserData(packageName, observer, 0);
} catch (RemoteException e) {
// can't happen because the activity manager is in this process
}
// only wait 10 seconds for the clear data to happen
long timeoutMark = System.currentTimeMillis() + TIMEOUT_INTERVAL;
while (mClearingData && (System.currentTimeMillis() < timeoutMark)) {
try {
mClearDataLock.wait(5000);
} catch (InterruptedException e) {
// won't happen, but still.
mClearingData = false;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearApplicationDataSynchronous
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
clearApplicationDataSynchronous
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String[] getPendingPush(String type, Context a) {
InputStream i = null;
try {
i = a.openFileInput("CN1$AndroidPendingNotifications");
if (i == null) {
return null;
}
DataInputStream is = new DataInputStream(i);
int count = is.readByte();
Vector v = new Vector<String>();
for (int iter = 0; iter < count; iter++) {
boolean hasType = is.readBoolean();
String actualType = null;
if (hasType) {
actualType = is.readUTF();
}
final String t;
final String b;
if ("99".equals(actualType)) {
// This was a rich push
Map<String,String> vals = splitQuery(is.readUTF());
t = vals.get("type");
b = vals.get("body");
//category = vals.get("category");
//image = vals.get("image");
} else {
t = actualType;
b = is.readUTF();
//category = null;
//image = null;
}
long s = is.readLong();
if(t != null && ("3".equals(t) || "6".equals(t))) {
String[] m = b.split(";");
v.add(m[0]);
} else if(t != null && "4".equals(t)){
String[] m = b.split(";");
v.add(m[1]);
} else if(t != null && "2".equals(t)){
continue;
}else if (t != null && "101".equals(t)) {
v.add(b.substring(b.indexOf(" ")+1));
}else{
v.add(b);
}
}
String [] retVal = new String[v.size()];
for (int j = 0; j < retVal.length; j++) {
retVal[j] = (String)v.get(j);
}
return retVal;
} catch (Exception ex) {
ex.printStackTrace();
} finally {
try {
if(i != null){
i.close();
}
} catch (IOException ex) {
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPendingPush
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getPendingPush
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void registerAppTransitionListener(AppTransitionListener listener) {
synchronized (mWindowMap) {
mAppTransition.registerListenerLocked(listener);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerAppTransitionListener
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
registerAppTransitionListener
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void deleteById(String sessionId) {
MapSession mapSession = (MapSession) cache.get(sessionId).get();
if (mapSession != null) {
applicationEventPublisher.emitSessionDeletedEvent(mapSession);
cache.evict(sessionId);
}
}
|
Vulnerability Classification:
- CWE: CWE-384
- CVE: CVE-2019-10158
- Severity: HIGH
- CVSS Score: 7.5
Description: ISPN-10224 Fix session fixation protection
Function: deleteById
File: spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
Repository: infinispan
Fixed Code:
@Override
public void deleteById(String sessionId) {
ValueWrapper valueWrapper = cache.get(sessionId);
if (valueWrapper == null) {
return;
}
MapSession mapSession = (MapSession) valueWrapper.get();
if (mapSession != null) {
applicationEventPublisher.emitSessionDeletedEvent(mapSession);
cache.evict(sessionId);
}
}
|
[
"CWE-384"
] |
CVE-2019-10158
|
HIGH
| 7.5
|
infinispan
|
deleteById
|
spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
|
f3efef8de7fec4108dd5ab725cea6ae09f14815d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isInline()
{
return this.configuration.isInline();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInline
File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-api/src/main/java/org/xwiki/rendering/async/internal/block/DefaultBlockAsyncRenderer.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-26471
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
isInline
|
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-api/src/main/java/org/xwiki/rendering/async/internal/block/DefaultBlockAsyncRenderer.java
|
00532d9f1404287cf3ec3a05056640d809516006
| 0
|
Analyze the following code function for security vulnerabilities
|
private void getPeersForCall() {
Log.d(TAG, "getPeersForCall");
int apiVersion = ApiUtils.getCallApiVersion(conversationUser, new int[]{ApiUtils.APIv4, 1});
ncApi.getPeersForCall(
credentials,
ApiUtils.getUrlForCall(
apiVersion,
baseUrl,
roomToken))
.subscribeOn(Schedulers.io())
.subscribe(new Observer<ParticipantsOverall>() {
@Override
public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) {
// unused atm
}
@Override
public void onNext(@io.reactivex.annotations.NonNull ParticipantsOverall participantsOverall) {
participantMap = new HashMap<>();
for (Participant participant : participantsOverall.getOcs().getData()) {
participantMap.put(participant.getSessionId(), participant);
}
}
@Override
public void onError(@io.reactivex.annotations.NonNull Throwable e) {
Log.e(TAG, "error while executing getPeersForCall", e);
}
@Override
public void onComplete() {
// unused atm
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPeersForCall
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
getPeersForCall
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateForTapOrPress(int type, float xPix, float yPix) {
if (type != GestureEventType.SINGLE_TAP_CONFIRMED
&& type != GestureEventType.SINGLE_TAP_UP
&& type != GestureEventType.LONG_PRESS
&& type != GestureEventType.LONG_TAP) {
return;
}
if (mContainerView.isFocusable() && mContainerView.isFocusableInTouchMode()
&& !mContainerView.isFocused()) {
mContainerView.requestFocus();
}
if (!mPopupZoomer.isShowing()) mPopupZoomer.setLastTouch(xPix, yPix);
mLastTapX = (int) xPix;
mLastTapY = (int) yPix;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateForTapOrPress
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
updateForTapOrPress
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean mayProceed(String studyOid) throws Exception {
return mayProceed(studyOid, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mayProceed
File: web/src/main/java/org/akaza/openclinica/controller/openrosa/OpenRosaSubmissionController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
mayProceed
|
web/src/main/java/org/akaza/openclinica/controller/openrosa/OpenRosaSubmissionController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public File getSourceFile() {
return sourceFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSourceFile
File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
Repository: codehaus-plexus/plexus-archiver
The code follows secure coding practices.
|
[
"CWE-22",
"CWE-61"
] |
CVE-2023-37460
|
CRITICAL
| 9.8
|
codehaus-plexus/plexus-archiver
|
getSourceFile
|
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
|
54759839fbdf85caf8442076f001d5fd64e0dcb2
| 0
|
Analyze the following code function for security vulnerabilities
|
private WifiLinkLayerStats updateLinkLayerStatsRssiDataStallScoreReport() {
// Get Info and continue polling
long txBytes = mFacade.getTotalTxBytes() - mFacade.getMobileTxBytes();
long rxBytes = mFacade.getTotalRxBytes() - mFacade.getMobileRxBytes();
WifiLinkLayerStats stats = updateLinkLayerStatsRssiSpeedFrequencyCapabilities(txBytes,
rxBytes);
mWifiMetrics.updateWifiUsabilityStatsEntries(mInterfaceName, mWifiInfo, stats);
// checkDataStallAndThroughputSufficiency() should be called before
// mWifiScoreReport.calculateAndReportScore() which needs the latest throughput
int statusDataStall = mWifiDataStall.checkDataStallAndThroughputSufficiency(
mInterfaceName, mLastConnectionCapabilities, mLastLinkLayerStats, stats,
mWifiInfo, txBytes, rxBytes);
if (mDataStallTriggerTimeMs == -1
&& statusDataStall != WifiIsUnusableEvent.TYPE_UNKNOWN) {
mDataStallTriggerTimeMs = mClock.getElapsedSinceBootMillis();
mLastStatusDataStall = statusDataStall;
}
if (mDataStallTriggerTimeMs != -1) {
long elapsedTime = mClock.getElapsedSinceBootMillis()
- mDataStallTriggerTimeMs;
if (elapsedTime >= DURATION_TO_WAIT_ADD_STATS_AFTER_DATA_STALL_MS) {
mDataStallTriggerTimeMs = -1;
mWifiMetrics.addToWifiUsabilityStatsList(mInterfaceName,
WifiUsabilityStats.LABEL_BAD,
convertToUsabilityStatsTriggerType(mLastStatusDataStall),
-1);
mLastStatusDataStall = WifiIsUnusableEvent.TYPE_UNKNOWN;
}
}
// Send the update score to network agent.
mWifiScoreReport.calculateAndReportScore();
if (mWifiScoreReport.shouldCheckIpLayer()) {
if (mIpClient != null) {
mIpClient.confirmConfiguration();
}
mWifiScoreReport.noteIpCheck();
}
mLastLinkLayerStats = stats;
return stats;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateLinkLayerStatsRssiDataStallScoreReport
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
updateLinkLayerStatsRssiDataStallScoreReport
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onPreferenceTreeClick(Preference preference) {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPreferenceTreeClick
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
onPreferenceTreeClick
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
protected List<HostAddress> populateHostAddresses() {
List<HostAddress> failedAddresses = new LinkedList<>();
// N.B.: Important to use config.serviceName and not AbstractXMPPConnection.serviceName
if (config.host != null) {
hostAddresses = new ArrayList<HostAddress>(1);
HostAddress hostAddress = DNSUtil.getDNSResolver().lookupHostAddress(config.host, failedAddresses, config.getDnssecMode());
hostAddresses.add(hostAddress);
} else {
hostAddresses = DNSUtil.resolveXMPPServiceDomain(config.getXMPPServiceDomain().toString(), failedAddresses, config.getDnssecMode());
}
// If we reach this, then hostAddresses *must not* be empty, i.e. there is at least one host added, either the
// config.host one or the host representing the service name by DNSUtil
assert(!hostAddresses.isEmpty());
return failedAddresses;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateHostAddresses
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
populateHostAddresses
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<KBTemplate> findByGroupId(long groupId, int start, int end,
OrderByComparator<KBTemplate> orderByComparator,
boolean retrieveFromCache) {
boolean pagination = true;
FinderPath finderPath = null;
Object[] finderArgs = null;
if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
(orderByComparator == null)) {
pagination = false;
finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_GROUPID;
finderArgs = new Object[] { groupId };
}
else {
finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_GROUPID;
finderArgs = new Object[] { groupId, start, end, orderByComparator };
}
List<KBTemplate> list = null;
if (retrieveFromCache) {
list = (List<KBTemplate>)finderCache.getResult(finderPath,
finderArgs, this);
if ((list != null) && !list.isEmpty()) {
for (KBTemplate kbTemplate : list) {
if ((groupId != kbTemplate.getGroupId())) {
list = null;
break;
}
}
}
}
if (list == null) {
StringBundler query = null;
if (orderByComparator != null) {
query = new StringBundler(3 +
(orderByComparator.getOrderByFields().length * 2));
}
else {
query = new StringBundler(3);
}
query.append(_SQL_SELECT_KBTEMPLATE_WHERE);
query.append(_FINDER_COLUMN_GROUPID_GROUPID_2);
if (orderByComparator != null) {
appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
orderByComparator);
}
else
if (pagination) {
query.append(KBTemplateModelImpl.ORDER_BY_JPQL);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
qPos.add(groupId);
if (!pagination) {
list = (List<KBTemplate>)QueryUtil.list(q, getDialect(),
start, end, false);
Collections.sort(list);
list = Collections.unmodifiableList(list);
}
else {
list = (List<KBTemplate>)QueryUtil.list(q, getDialect(),
start, end);
}
cacheResult(list);
finderCache.putResult(finderPath, finderArgs, list);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByGroupId
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
findByGroupId
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
public final <T extends Item> T getItem(String pathName, ItemGroup context, Class<T> type) {
Item r = getItem(pathName, context);
if (type.isInstance(r))
return type.cast(r);
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItem
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getItem
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean validate(@NonNull JwtClaims claims, @Nullable HttpRequest<?> request) {
Optional<String> claimIssuerOptional = parseIssuerClaim(claims);
if (!claimIssuerOptional.isPresent()) {
return false;
}
String iss = claimIssuerOptional.get();
Optional<List<String>> audiencesOptional = parseAudiences(claims);
if (!audiencesOptional.isPresent()) {
return false;
}
List<String> audiences = audiencesOptional.get();
return validateIssuerAudienceAndAzp(claims, iss, audiences);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validate
File: security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
Repository: micronaut-projects/micronaut-security
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-36820
|
MEDIUM
| 6.5
|
micronaut-projects/micronaut-security
|
validate
|
security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
|
9728b925221a0d87798ccf250657a3c214b7e980
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRemoteAddr(String remoteAddr) {
this.remoteAddr = remoteAddr;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRemoteAddr
File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setRemoteAddr
|
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter,
StanzaListener callback) throws NotConnectedException, InterruptedException {
sendStanzaWithResponseCallback(stanza, replyFilter, callback, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendStanzaWithResponseCallback
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
sendStanzaWithResponseCallback
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getFormId()
{
return "form";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFormId
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
getFormId
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
public @UserOperationResult int logoutUser(@NonNull ComponentName admin) {
throwIfParentInstance("logoutUser");
try {
return mService.logoutUser(admin);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logoutUser
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
logoutUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
String chooseClientPSKIdentity(PSKKeyManager keyManager, String identityHint);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: chooseClientPSKIdentity
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
chooseClientPSKIdentity
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doSimulateOutOfMemory() throws IOException {
checkPermission(ADMINISTER);
System.out.println("Creating artificial OutOfMemoryError situation");
List<Object> args = new ArrayList<Object>();
while (true)
args.add(new byte[1024*1024]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doSimulateOutOfMemory
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
doSimulateOutOfMemory
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean deleteSettingLocked(int type, int userId, String name, boolean forceNotify) {
final int key = makeKey(type, userId);
SettingsState settingsState = peekSettingsStateLocked(key);
final boolean success = settingsState.deleteSettingLocked(name);
if (forceNotify || success) {
notifyForSettingsChange(key, name);
}
return success;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteSettingLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
deleteSettingLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getServerID(String idTypeString) {
if (idTypeString == null) {
return null;
}
int len = idTypeString.length();
String id = null;
if (len >= SAMLConstants.SERVER_ID_LENGTH) {
id = idTypeString.substring((len - SAMLConstants.SERVER_ID_LENGTH),
len);
return id;
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerID
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
getServerID
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setStringProperty(String name, String value) throws JMSException {
this.setObjectProperty(name, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStringProperty
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
setStringProperty
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
private Intent getDefaultCantAddAccountIntent(int errorCode) {
Intent cantAddAccount = new Intent(mContext, CantAddAccountActivity.class);
cantAddAccount.putExtra(CantAddAccountActivity.EXTRA_ERROR_CODE, errorCode);
cantAddAccount.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return cantAddAccount;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultCantAddAccountIntent
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getDefaultCantAddAccountIntent
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public ObjectOutputStream createObjectOutputStream(OutputStream out) throws IOException {
return createObjectOutputStream(hierarchicalStreamDriver.createWriter(out), "object-stream");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createObjectOutputStream
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
createObjectOutputStream
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int validateValueChar(CharSequence seq, int state, char character) {
/*
* State:
* 0: Previous character was neither CR nor LF
* 1: The previous character was CR
* 2: The previous character was LF
*/
if ((character & HIGHEST_INVALID_VALUE_CHAR_MASK) == 0) {
// Check the absolutely prohibited characters.
switch (character) {
case 0x0: // NULL
throw new IllegalArgumentException("a header value contains a prohibited character '\0': " + seq);
case 0x0b: // Vertical tab
throw new IllegalArgumentException("a header value contains a prohibited character '\\v': " + seq);
case '\f':
throw new IllegalArgumentException("a header value contains a prohibited character '\\f': " + seq);
default:
break;
}
}
// Check the CRLF (HT | SP) pattern
switch (state) {
case 0:
switch (character) {
case '\r':
return 1;
case '\n':
return 2;
default:
break;
}
break;
case 1:
if (character == '\n') {
return 2;
}
throw new IllegalArgumentException("only '\\n' is allowed after '\\r': " + seq);
case 2:
switch (character) {
case '\t':
case ' ':
return 0;
default:
throw new IllegalArgumentException("only ' ' and '\\t' are allowed after '\\n': " + seq);
}
default:
break;
}
return state;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateValueChar
File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
validateValueChar
|
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String generateXml(String encrypt, String signature,
String timestamp, String nonce) {
String format = "<xml>\n" + "<Encrypt><![CDATA[%1$s]]></Encrypt>\n"
+ "<MsgSignature><![CDATA[%2$s]]></MsgSignature>\n"
+ "<TimeStamp>%3$s</TimeStamp>\n" + "<Nonce><![CDATA[%4$s]]></Nonce>\n"
+ "</xml>";
return String.format(format, encrypt, signature, timestamp, nonce);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateXml
File: weixin-java-common/src/main/java/me/chanjar/weixin/common/util/crypto/WxCryptUtil.java
Repository: Wechat-Group/WxJava
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20318
|
HIGH
| 7.5
|
Wechat-Group/WxJava
|
generateXml
|
weixin-java-common/src/main/java/me/chanjar/weixin/common/util/crypto/WxCryptUtil.java
|
6272639f02e397fed40828a2d0da66c30264bc0e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 attribute(String name, String value) {
super.attributeImpl(name, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attribute
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
attribute
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dumpDebugInner(ProtoOutputStream proto) {
final long token = proto.start(MOVE);
dumpPointProto(mFrom, proto, FROM);
dumpPointProto(mTo, proto, TO);
proto.write(DURATION_MS, mDuration);
proto.end(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpDebugInner
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
dumpDebugInner
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBaseSystemId() {
return fCurrentEntity != null ? fCurrentEntity.baseSystemId : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBaseSystemId
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
getBaseSystemId
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initNoisyReceiver() {
//Handles headphones coming unplugged. cannot be done through a manifest receiver
IntentFilter filter = new IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
registerReceiver(mNoisyReceiver, filter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initNoisyReceiver
File: Ports/Android/src/com/codename1/media/BackgroundAudioService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
initNoisyReceiver
|
Ports/Android/src/com/codename1/media/BackgroundAudioService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean prepareHelpMenuItem(final Activity activity, MenuItem helpMenuItem,
String helpUriString, String backupContext) {
if (TextUtils.isEmpty(helpUriString)) {
// The help url string is empty or null, so set the help menu item to be invisible.
helpMenuItem.setVisible(false);
// return that the help menu item is not visible (i.e. false)
return false;
} else {
final Intent intent = getHelpIntent(activity, helpUriString, backupContext);
// Set the intent to the help menu item, show the help menu item in the overflow
// menu, and make it visible.
if (intent != null) {
helpMenuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
try {
activity.startActivityForResult(intent, 0);
} catch (ActivityNotFoundException exc) {
Log.e(TAG, "No activity found for intent: " + intent);
}
return true;
}
});
helpMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
helpMenuItem.setVisible(true);
} else {
helpMenuItem.setVisible(false);
return false;
}
// return that the help menu item is visible (i.e., true)
return true;
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3889
- Severity: HIGH
- CVSS Score: 7.2
Description: Pre-setup restrictions
- Prevent external tiles from system apps
- Disable help
Bug: 29194585
Change-Id: I92da498110db49f7a523d6f775f191c4b52a4ad6
Function: prepareHelpMenuItem
File: packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
Repository: android
Fixed Code:
public static boolean prepareHelpMenuItem(final Activity activity, MenuItem helpMenuItem,
String helpUriString, String backupContext) {
if (Global.getInt(activity.getContentResolver(), Global.DEVICE_PROVISIONED, 0) == 0) {
return false;
}
if (TextUtils.isEmpty(helpUriString)) {
// The help url string is empty or null, so set the help menu item to be invisible.
helpMenuItem.setVisible(false);
// return that the help menu item is not visible (i.e. false)
return false;
} else {
final Intent intent = getHelpIntent(activity, helpUriString, backupContext);
// Set the intent to the help menu item, show the help menu item in the overflow
// menu, and make it visible.
if (intent != null) {
helpMenuItem.setOnMenuItemClickListener(new OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
try {
activity.startActivityForResult(intent, 0);
} catch (ActivityNotFoundException exc) {
Log.e(TAG, "No activity found for intent: " + intent);
}
return true;
}
});
helpMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
helpMenuItem.setVisible(true);
} else {
helpMenuItem.setVisible(false);
return false;
}
// return that the help menu item is visible (i.e., true)
return true;
}
}
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
prepareHelpMenuItem
|
packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
|
e206f02d46ae5e38c74d138b51f6e1637e261abe
| 1
|
Analyze the following code function for security vulnerabilities
|
public static String unzip(File zipfile, String destDir) throws IOException {
// 2
// does the zip file exist and can we write to the temp directory
if (!zipfile.canRead())
{
log.error("Zip file '" + zipfile.getAbsolutePath() + "' does not exist, or is not readable.");
}
String destinationDir = destDir;
if (destinationDir == null){
destinationDir = tempWorkDir;
}
File tempdir = new File(destinationDir);
if (!tempdir.isDirectory())
{
log.error("'" + ConfigurationManager.getProperty("org.dspace.app.itemexport.work.dir") +
"' as defined by the key 'org.dspace.app.itemexport.work.dir' in dspace.cfg " +
"is not a valid directory");
}
if (!tempdir.exists() && !tempdir.mkdirs())
{
log.error("Unable to create temporary directory: " + tempdir.getAbsolutePath());
}
String sourcedir = destinationDir + System.getProperty("file.separator") + zipfile.getName();
String zipDir = destinationDir + System.getProperty("file.separator") + zipfile.getName() + System.getProperty("file.separator");
// 3
String sourceDirForZip = sourcedir;
ZipFile zf = new ZipFile(zipfile);
ZipEntry entry;
Enumeration<? extends ZipEntry> entries = zf.entries();
while (entries.hasMoreElements())
{
entry = entries.nextElement();
if (entry.isDirectory())
{
if (!new File(zipDir + entry.getName()).mkdir())
{
log.error("Unable to create contents directory: " + zipDir + entry.getName());
}
}
else
{
System.out.println("Extracting file: " + entry.getName());
log.info("Extracting file: " + entry.getName());
int index = entry.getName().lastIndexOf('/');
if (index == -1)
{
// Was it created on Windows instead?
index = entry.getName().lastIndexOf('\\');
}
if (index > 0)
{
File dir = new File(zipDir + entry.getName().substring(0, index));
if (!dir.exists() && !dir.mkdirs())
{
log.error("Unable to create directory: " + dir.getAbsolutePath());
}
//Entries could have too many directories, and we need to adjust the sourcedir
// file1.zip (SimpleArchiveFormat / item1 / contents|dublin_core|...
// SimpleArchiveFormat / item2 / contents|dublin_core|...
// or
// file2.zip (item1 / contents|dublin_core|...
// item2 / contents|dublin_core|...
//regex supports either windows or *nix file paths
String[] entryChunks = entry.getName().split("/|\\\\");
if(entryChunks.length > 2) {
if(sourceDirForZip == sourcedir) {
sourceDirForZip = sourcedir + "/" + entryChunks[0];
}
}
}
byte[] buffer = new byte[1024];
int len;
InputStream in = zf.getInputStream(entry);
BufferedOutputStream out = new BufferedOutputStream(
new FileOutputStream(zipDir + entry.getName()));
while((len = in.read(buffer)) >= 0)
{
out.write(buffer, 0, len);
}
in.close();
out.close();
}
}
//Close zip file
zf.close();
if(sourceDirForZip != sourcedir) {
sourcedir = sourceDirForZip;
System.out.println("Set sourceDir using path inside of Zip: " + sourcedir);
log.info("Set sourceDir using path inside of Zip: " + sourcedir);
}
return sourcedir;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-31195
- Severity: HIGH
- CVSS Score: 7.2
Description: [DS-4131] Better path handling in ItemImport zips
Function: unzip
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
Fixed Code:
public static String unzip(File zipfile, String destDir) throws IOException {
// 2
// does the zip file exist and can we write to the temp directory
if (!zipfile.canRead())
{
log.error("Zip file '" + zipfile.getAbsolutePath() + "' does not exist, or is not readable.");
}
String destinationDir = destDir;
if (destinationDir == null){
destinationDir = tempWorkDir;
}
log.debug("Using directory " + destinationDir + " for zip extraction. (destDir arg is " + destDir +
", tempWorkDir is " + tempWorkDir + ")");
File tempdir = new File(destinationDir);
if (!tempdir.isDirectory())
{
log.error("'" + ConfigurationManager.getProperty("org.dspace.app.batchitemimport.work.dir") +
"' as defined by the key 'org.dspace.app.batchitemimport.work.dir' in dspace.cfg " +
"is not a valid directory");
}
if (!tempdir.exists() && !tempdir.mkdirs())
{
log.error("Unable to create temporary directory: " + tempdir.getAbsolutePath());
}
if(!destinationDir.endsWith(System.getProperty("file.separator"))) {
destinationDir += System.getProperty("file.separator");
}
String sourcedir = destinationDir + zipfile.getName();
String zipDir = destinationDir + zipfile.getName() + System.getProperty("file.separator");
log.debug("zip directory to use is " + zipDir);
// 3
String sourceDirForZip = sourcedir;
ZipFile zf = new ZipFile(zipfile);
ZipEntry entry;
Enumeration<? extends ZipEntry> entries = zf.entries();
while (entries.hasMoreElements())
{
entry = entries.nextElement();
// Check that the true path to extract files is never outside allowed temp directories
// without creating any actual files on disk
log.debug("Inspecting entry name: " + entry.getName() + " for path traversal security");
File potentialExtract = new File(zipDir + entry.getName());
String canonicalPath = potentialExtract.getCanonicalPath();
log.debug("Canonical path to potential File is " + canonicalPath);
if(!canonicalPath.startsWith(zipDir)) {
log.error("Rejecting zip file: " + zipfile.getName() + " as it contains an entry that would be extracted " +
"outside the temporary unzip directory: " + canonicalPath);
throw new IOException("Error extracting " + zipfile + ": Canonical path of zip entry: " +
entry.getName() + " (" + canonicalPath + ") does not start with permissible temp " +
"unzip directory (" + destinationDir + ")");
}
if (entry.isDirectory())
{
// Log error and throw IOException if a directory entry could not be created
File newDir = new File(zipDir + entry.getName());
if (!newDir.mkdirs()) {
log.error("Unable to create contents directory: " + zipDir + entry.getName());
throw new IOException("Unable to create contents directory: " + zipDir + entry.getName());
}
}
else
{
System.out.println("Extracting file: " + entry.getName());
log.info("Extracting file: " + entry.getName());
int index = entry.getName().lastIndexOf('/');
if (index == -1)
{
// Was it created on Windows instead?
index = entry.getName().lastIndexOf('\\');
}
if (index > 0)
{
File dir = new File(zipDir + entry.getName().substring(0, index));
if (!dir.exists() && !dir.mkdirs())
{
log.error("Unable to create directory: " + dir.getAbsolutePath());
}
//Entries could have too many directories, and we need to adjust the sourcedir
// file1.zip (SimpleArchiveFormat / item1 / contents|dublin_core|...
// SimpleArchiveFormat / item2 / contents|dublin_core|...
// or
// file2.zip (item1 / contents|dublin_core|...
// item2 / contents|dublin_core|...
//regex supports either windows or *nix file paths
String[] entryChunks = entry.getName().split("/|\\\\");
if(entryChunks.length > 2) {
if(sourceDirForZip == sourcedir) {
sourceDirForZip = sourcedir + "/" + entryChunks[0];
}
}
}
byte[] buffer = new byte[1024];
int len;
InputStream in = zf.getInputStream(entry);
log.debug("Reading " + zipDir + entry.getName() + " into InputStream");
BufferedOutputStream out = new BufferedOutputStream(
new FileOutputStream(zipDir + entry.getName()));
while((len = in.read(buffer)) >= 0)
{
out.write(buffer, 0, len);
}
in.close();
out.close();
}
}
//Close zip file
zf.close();
if(sourceDirForZip != sourcedir) {
sourcedir = sourceDirForZip;
System.out.println("Set sourceDir using path inside of Zip: " + sourcedir);
log.info("Set sourceDir using path inside of Zip: " + sourcedir);
}
return sourcedir;
}
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
unzip
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isSame(VFSItem currentTarget, File uploadedFile) {
if(currentTarget instanceof LocalImpl) {
LocalImpl local = (LocalImpl)currentTarget;
File currentFile = local.getBasefile();
if(currentFile.length() == uploadedFile.length()) {
try {
return org.apache.commons.io.FileUtils.contentEquals(currentFile, uploadedFile);
} catch (IOException e) {
logError("", e);
//do nothing -> return false at the end
}
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSame
File: src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
isSame
|
src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean containsKey(Object key)
{
return xObjects.containsKey(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsKey
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
containsKey
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public MetaClass getMetaclass()
{
if (this.metaclass == null) {
this.metaclass = MetaClass.getMetaClass();
}
return this.metaclass;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMetaclass
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getMetaclass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isResourceType(Node node) {
Node parseType = node.getAttributes().getNamedItemNS(XMP.NS_RDF, "parseType");
return parseType != null && "Resource".equals(parseType.getNodeValue());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isResourceType
File: imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
Repository: haraldk/TwelveMonkeys
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-23792
|
HIGH
| 7.5
|
haraldk/TwelveMonkeys
|
isResourceType
|
imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
|
da4efe98bf09e1cce91b7633cb251958a200fc80
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String toDisplayError(String theErrorMsg, Exception theException) {
return theErrorMsg;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDisplayError
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
toDisplayError
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setCursorFactory(@Nullable CursorFactory cursorFactory) {
mCursorFactory = cursorFactory;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCursorFactory
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
setCursorFactory
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void fireNodeAdded(final DomChangeEvent event) {
DomNode toInform = this;
while (toInform != null) {
final List<DomChangeListener> listeners = toInform.safeGetDomListeners();
if (listeners != null) {
for (final DomChangeListener listener : listeners) {
listener.nodeAdded(event);
}
}
toInform = toInform.getParentNode();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fireNodeAdded
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
fireNodeAdded
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void sendHttpErrorResponse(ChannelHandlerContext ctx, HttpRequest req, FullHttpResponse res) {
// Generate an error page if response getStatus code is not OK (200).
if (res.status().code() != 200) {
ByteBuf buf = Unpooled.copiedBuffer(res.status().toString(), CharsetUtil.UTF_8);
res.content().writeBytes(buf);
buf.release();
res.headers().set(CONTENT_TYPE, "text/plain;charset=utf-8");
HttpHeaderUtil.setContentLength(res, res.content().readableBytes());
}
ChannelFuture f = ctx.channel().writeAndFlush(res);
if (req == null || !HttpHeaderUtil.isKeepAlive(req) || res.status().code() != 200) {
f.addListener(ChannelFutureListener.CLOSE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendHttpErrorResponse
File: src/gribbit/request/HttpRequestHandler.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
sendHttpErrorResponse
|
src/gribbit/request/HttpRequestHandler.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS)
public boolean shouldAllowBypassingDevicePolicyManagementRoleQualification() {
if (mService != null) {
try {
return mService.shouldAllowBypassingDevicePolicyManagementRoleQualification();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldAllowBypassingDevicePolicyManagementRoleQualification
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
shouldAllowBypassingDevicePolicyManagementRoleQualification
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int read(short[] d)
throws IOException
{
return read(d, 0, d.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: src/main/java/org/xerial/snappy/SnappyInputStream.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-34455
|
HIGH
| 7.5
|
xerial/snappy-java
|
read
|
src/main/java/org/xerial/snappy/SnappyInputStream.java
|
3bf67857fcf70d9eea56eed4af7c925671e8eaea
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSubjectEventFormDataTypesExpected(String odmVersion) {
if(odmVersion.equalsIgnoreCase("occlinical_data"))odmVersion="oc1.3";
if ("1.2".equals(odmVersion) || "1.3".equals(odmVersion)) {
setSubjectEventFormDataTypesExpected();
} else if ("oc1.2".equals(odmVersion) || "oc1.3".equals(odmVersion)) {
this.unsetTypeExpected();
this.setTypeExpected(1, TypeNames.STRING);// study_subject_oid;
this.setTypeExpected(2, TypeNames.STRING);// label(study subject)
this.setTypeExpected(3, TypeNames.STRING);// unique-identifier
this.setTypeExpected(4, TypeNames.STRING);// secondary_label(study
// subject)
this.setTypeExpected(5, TypeNames.STRING);// gender
this.setTypeExpected(6, TypeNames.DATE);// date_of_birth
this.setTypeExpected(7, TypeNames.INT);// status_id (subject)
this.setTypeExpected(8, TypeNames.INT);// sgc_id
this.setTypeExpected(9, TypeNames.STRING);// sgc_name
this.setTypeExpected(10, TypeNames.STRING);// sg_name
this.setTypeExpected(11, TypeNames.INT);// definition_order;
this.setTypeExpected(12, TypeNames.STRING);// definition_oid;
this.setTypeExpected(13, TypeNames.BOOL);// definition_repeating
this.setTypeExpected(14, TypeNames.INT);// sample_ordinal
this.setTypeExpected(15, TypeNames.STRING);// se_location (study
// event)
this.setTypeExpected(16, TypeNames.DATE);// date_start (study
// event)
this.setTypeExpected(17, TypeNames.DATE);// date_end (study
// event)
this.setTypeExpected(18, TypeNames.BOOL);// start_time_flag
this.setTypeExpected(19, TypeNames.BOOL);// end_time_flag
this.setTypeExpected(20, TypeNames.INT);// event_status_id
this.setTypeExpected(21, TypeNames.INT);// crf_order;
this.setTypeExpected(22, TypeNames.STRING);// crf_version_oid
this.setTypeExpected(23, TypeNames.STRING);// crf_version
this.setTypeExpected(24, TypeNames.INT); // cv_status_id
this.setTypeExpected(25, TypeNames.INT);// ec_status_id
this.setTypeExpected(26, TypeNames.INT);// event_crf_id
this.setTypeExpected(27, TypeNames.DATE);// date_interviewed
this.setTypeExpected(28, TypeNames.STRING);// interviewer_name
this.setTypeExpected(29, TypeNames.INT);// validator_id
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSubjectEventFormDataTypesExpected
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setSubjectEventFormDataTypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean calculateHiddenStatus(SpaceReference spaceReference, String documentToIngore, Session session)
{
// If there is at least one visible document then the space is visible
StringBuilder builder = new StringBuilder("(hidden = false OR hidden IS NULL)");
Map<String, ?> parameters;
if (documentToIngore != null) {
builder.append(" AND fullName <> :documentToIngore");
parameters = Collections.singletonMap("documentToIngore", documentToIngore);
} else {
parameters = null;
}
return !hasDocuments(spaceReference, session, builder.toString(), parameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateHiddenStatus
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
calculateHiddenStatus
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAnySimPinSecure() {
for (int i = 0; i < mLastSimStates.size(); i++) {
final int key = mLastSimStates.keyAt(i);
if (KeyguardUpdateMonitor.isSimPinSecure(mLastSimStates.get(key))) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAnySimPinSecure
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
isAnySimPinSecure
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
void disposeInputChannel() {
if (mDeadWindowEventReceiver != null) {
mDeadWindowEventReceiver.dispose();
mDeadWindowEventReceiver = null;
}
if (mInputChannelToken != null) {
// Unregister server channel first otherwise it complains about broken channel.
mWmService.mInputManager.removeInputChannel(mInputChannelToken);
mWmService.mKeyInterceptionInfoForToken.remove(mInputChannelToken);
mWmService.mInputToWindowMap.remove(mInputChannelToken);
mInputChannelToken = null;
}
if (mInputChannel != null) {
mInputChannel.dispose();
mInputChannel = null;
}
mInputWindowHandle.setToken(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disposeInputChannel
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
disposeInputChannel
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void ensureAllShortcutsVisibleToLauncher(@NonNull List<ShortcutInfo> shortcuts) {
for (ShortcutInfo shortcut : shortcuts) {
if (shortcut.isExcludedFromSurfaces(ShortcutInfo.SURFACE_LAUNCHER)) {
throw new IllegalArgumentException("Shortcut ID=" + shortcut.getId()
+ " is hidden from launcher and may not be manipulated via APIs");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureAllShortcutsVisibleToLauncher
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
ensureAllShortcutsVisibleToLauncher
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void scheduleApplicationInfoChanged(List<String> packageNames, int userId) {
enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION,
"scheduleApplicationInfoChanged()");
synchronized (this) {
final long origId = Binder.clearCallingIdentity();
try {
updateApplicationInfoLocked(packageNames, userId);
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleApplicationInfoChanged
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
scheduleApplicationInfoChanged
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getProcessStatesFromPids(/*in*/ int[] pids, /*out*/ int[] states) {
mActivityManagerService.getProcessStatesForPIDs(/*in*/ pids, /*out*/ states);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessStatesFromPids
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
getProcessStatesFromPids
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateLastFrames() {
mWindowFrames.mLastFrame.set(mWindowFrames.mFrame);
mWindowFrames.mLastRelFrame.set(mWindowFrames.mRelFrame);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateLastFrames
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
updateLastFrames
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
void grantUriPermissionUncheckedFromIntentLocked(NeededUriGrants needed,
UriPermissionOwner owner) {
if (needed != null) {
for (int i=0; i<needed.size(); i++) {
GrantUri grantUri = needed.get(i);
grantUriPermissionUncheckedLocked(needed.targetUid, needed.targetPkg,
grantUri, needed.flags, owner);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: grantUriPermissionUncheckedFromIntentLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
grantUriPermissionUncheckedFromIntentLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("rawtypes")
private void setGattProfileServiceState(Class[] services, int state) {
if (state != BluetoothAdapter.STATE_ON && state != BluetoothAdapter.STATE_OFF) {
Log.w(TAG,"setGattProfileServiceState(): invalid state...Leaving...");
return;
}
int expectedCurrentState= BluetoothAdapter.STATE_OFF;
int pendingState = BluetoothAdapter.STATE_TURNING_ON;
if (state == BluetoothAdapter.STATE_OFF) {
expectedCurrentState= BluetoothAdapter.STATE_ON;
pendingState = BluetoothAdapter.STATE_TURNING_OFF;
}
for (int i=0; i <services.length;i++) {
String serviceName = services[i].getName();
String simpleName = services[i].getSimpleName();
if (simpleName.equals("GattService")) {
Integer serviceState = mProfileServicesState.get(serviceName);
if(serviceState != null && serviceState != expectedCurrentState) {
debugLog("setProfileServiceState() - Unable to "
+ (state == BluetoothAdapter.STATE_OFF ? "start" : "stop" )
+ " service " + serviceName
+ ". Invalid state: " + serviceState);
continue;
}
debugLog("setProfileServiceState() - "
+ (state == BluetoothAdapter.STATE_OFF ? "Stopping" : "Starting")
+ " service " + serviceName);
mProfileServicesState.put(serviceName,pendingState);
Intent intent = new Intent(this,services[i]);
intent.putExtra(EXTRA_ACTION,ACTION_SERVICE_STATE_CHANGED);
intent.putExtra(BluetoothAdapter.EXTRA_STATE,state);
startService(intent);
return;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setGattProfileServiceState
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
setGattProfileServiceState
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public AMQCommand rpc(Method m, int timeout)
throws IOException, ShutdownSignalException, TimeoutException {
return privateRpc(m, timeout);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rpc
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
rpc
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasMinorEdit(XWikiContext context)
{
String bl = getXWikiPreference("minoredit", "", context);
if ("1".equals(bl)) {
return true;
}
if ("0".equals(bl)) {
return false;
}
return "1".equals(getConfiguration().getProperty("xwiki.minoredit", "1"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasMinorEdit
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
hasMinorEdit
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setSurface(Surface surface, int width, int height, int density) {
super.setSurface(surface, width, height, density);
synchronized (mService) {
final long origId = Binder.clearCallingIdentity();
try {
setSurfaceLocked(surface, width, height, density);
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSurface
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
setSurface
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public X509Certificate getClientCertificate() {
return mClientCertificate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientCertificate
File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3897
|
MEDIUM
| 4.3
|
android
|
getClientCertificate
|
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
|
81be4e3aac55305cbb5c9d523cf5c96c66604b39
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getCurrentUserId() {
return mUserController.getCurrentUserId();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentUserId
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getCurrentUserId
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setFocus(int action) {
if (action == EDIT_DRAFT) {
int type = mDraft.draftType;
switch (type) {
case UIProvider.DraftType.COMPOSE:
case UIProvider.DraftType.FORWARD:
action = COMPOSE;
break;
case UIProvider.DraftType.REPLY:
case UIProvider.DraftType.REPLY_ALL:
default:
action = REPLY;
break;
}
}
switch (action) {
case FORWARD:
case COMPOSE:
if (TextUtils.isEmpty(mTo.getText())) {
mTo.requestFocus();
break;
}
//$FALL-THROUGH$
case REPLY:
case REPLY_ALL:
default:
focusBody();
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFocus
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
setFocus
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void performCorsPreflightCheck(HttpExchange pExchange) {
Headers requestHeaders = pExchange.getRequestHeaders();
Map<String,String> respHeaders =
requestHandler.handleCorsPreflightRequest(requestHeaders.getFirst("Origin"),
requestHeaders.getFirst("Access-Control-Request-Headers"));
Headers responseHeaders = pExchange.getResponseHeaders();
for (Map.Entry<String,String> entry : respHeaders.entrySet()) {
responseHeaders.set(entry.getKey(), entry.getValue());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: performCorsPreflightCheck
File: agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaHttpHandler.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
performCorsPreflightCheck
|
agent/jvm/src/main/java/org/jolokia/jvmagent/JolokiaHttpHandler.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
public String getDatabase()
{
return getDocumentReference().getWikiReference().getName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDatabase
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getDatabase
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processRemoveDestination(DestinationInfo info) throws Exception {
TransportConnectionState cs = lookupConnectionState(info.getConnectionId());
broker.removeDestinationInfo(cs.getContext(), info);
if (info.getDestination().isTemporary()) {
cs.removeTempDestination(info.getDestination());
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processRemoveDestination
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
processRemoveDestination
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void save(
ImageReference imageReference, Path outputPath, Consumer<Long> writtenByteCountListener)
throws InterruptedException, IOException {
Process dockerProcess = docker("save", imageReference.toString());
try (InputStream stdout = new BufferedInputStream(dockerProcess.getInputStream());
OutputStream fileStream = new BufferedOutputStream(Files.newOutputStream(outputPath));
NotifyingOutputStream notifyingFileStream =
new NotifyingOutputStream(fileStream, writtenByteCountListener)) {
ByteStreams.copy(stdout, notifyingFileStream);
}
if (dockerProcess.waitFor() != 0) {
throw new IOException(
"'docker save' command failed with error: " + getStderrOutput(dockerProcess));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save
File: jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java
Repository: GoogleContainerTools/jib
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-25914
|
CRITICAL
| 9.8
|
GoogleContainerTools/jib
|
save
|
jib-core/src/main/java/com/google/cloud/tools/jib/docker/CliDockerClient.java
|
67fa40bc2c484da0546333914ea07a89fe44eaaf
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private int getAggregatedPasswordComplexityLocked(@UserIdInt int userHandle,
boolean deviceWideOnly) {
ensureLocked();
final List<ActiveAdmin> admins;
if (deviceWideOnly) {
admins = getActiveAdminsForUserAndItsManagedProfilesLocked(userHandle,
/* shouldIncludeProfileAdmins */ (user) -> false);
} else {
admins = getActiveAdminsForLockscreenPoliciesLocked(userHandle);
}
int maxRequiredComplexity = PASSWORD_COMPLEXITY_NONE;
for (ActiveAdmin admin : admins) {
maxRequiredComplexity = Math.max(maxRequiredComplexity, admin.mPasswordComplexity);
}
return maxRequiredComplexity;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAggregatedPasswordComplexityLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getAggregatedPasswordComplexityLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setAccessToken(accessToken);
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccessToken
File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setAccessToken
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public AnrController getAnrController(ApplicationInfo info) {
if (info == null || info.packageName == null) {
return null;
}
final ArrayList<AnrController> controllers;
synchronized (mGlobalLock) {
controllers = new ArrayList<>(mAnrController);
}
final String packageName = info.packageName;
final int uid = info.uid;
long maxDelayMs = 0;
AnrController controllerWithMaxDelay = null;
for (AnrController controller : controllers) {
long delayMs = controller.getAnrDelayMillis(packageName, uid);
if (delayMs > 0 && delayMs > maxDelayMs) {
controllerWithMaxDelay = controller;
maxDelayMs = delayMs;
}
}
return controllerWithMaxDelay;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAnrController
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getAnrController
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public MaterialConfigs convertToConfigs() {
MaterialConfigs configs = new MaterialConfigs();
for (Material material : this) {
configs.add(material.config());
}
return configs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToConfigs
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
convertToConfigs
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsArrayDisabled() throws Exception {
Duration exp = Duration.ofSeconds(13498L, 8374);
try {
READER.readValue("[\"" + exp.toString() + "\"]");
fail("expected JsonMappingException");
} catch (JsonMappingException e) {
// OK
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsArrayDisabled
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsArrayDisabled
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getUidForPackage(String packageName, int userId) {
PackageInfo pkgInfo = null;
final long identity = Binder.clearCallingIdentity();
try {
pkgInfo = mPackageManager.getPackageInfo(packageName, 0, userId);
} catch (RemoteException re) {
// Shouldn't happen, local call
} finally {
Binder.restoreCallingIdentity(identity);
}
if (pkgInfo == null || pkgInfo.applicationInfo == null) {
return -1;
}
return pkgInfo.applicationInfo.uid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUidForPackage
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
getUidForPackage
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.