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
@SuppressWarnings("unchecked") default Map<String, V> subMap(String prefix, Argument<V> valueType) { return subMap(prefix, ConversionContext.of(valueType)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: subMap File: core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
subMap
core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
@Override protected void onFullTextMessage(WebSocketChannel channel, BufferedTextMessage message) { if(session.isSessionClosed()) { //to bad, the channel has already been closed //we just ignore messages that are received after we have closed, as the endpoint is no longer in a valid state to deal with them //this this should only happen if a message was on the wire when we called close() return; } HandlerWrapper handler = getHandler(FrameType.TEXT); if (handler != null) { invokeTextHandler(message, handler, true); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onFullTextMessage File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-3690
HIGH
7.5
undertow-io/undertow
onFullTextMessage
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
c7e84a0b7efced38506d7d1dfea5902366973877
0
Analyze the following code function for security vulnerabilities
public static NativeArray jsFunction_getAllowedGrantTypes(Context cx, Scriptable thisObj, Object[] args, Function funObj) throws ScriptException, APIManagementException { OAuthAdminService oAuthAdminService = new OAuthAdminService(); String[] allowedGrantTypes = oAuthAdminService.getAllowedGrantTypes(); NativeArray myn = new NativeArray(0); int i = 0; for (String grantType : allowedGrantTypes) { myn.put(i, myn, grantType); i++; } return myn; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: jsFunction_getAllowedGrantTypes File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java Repository: wso2/carbon-apimgt The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-20736
LOW
3.5
wso2/carbon-apimgt
jsFunction_getAllowedGrantTypes
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
490f2860822f89d745b7c04fa9570bd86bef4236
0
Analyze the following code function for security vulnerabilities
private boolean useExistingRemoteView(RemoteViews customContent) { if (customContent == null) { return false; } if (styleDisplaysCustomViewInline()) { // the provided custom view is intended to be wrapped by the style. return false; } if (fullyCustomViewRequiresDecoration(false) && STANDARD_LAYOUTS.contains(customContent.getLayoutId())) { // If the app's custom views are objects returned from Builder.create*ContentView() // then the app is most likely attempting to spoof the user. Even if they are not, // the result would be broken (b/189189308) so we will ignore it. Log.w(TAG, "For apps targeting S, a custom content view that is a modified " + "version of any standard layout is disallowed."); return false; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: useExistingRemoteView File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
useExistingRemoteView
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private Element getSingleChild(final String name, final Node node, final boolean optional) throws GameParseException { final List<Element> children = getChildren(name, node); // none found if (children.size() == 0) { if (optional) { return null; } throw newGameParseException("No child called " + name); } // too many found if (children.size() > 1) { throw newGameParseException("Too many children named " + name); } return children.get(0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSingleChild File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
getSingleChild
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
protected boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name, String[] args, int opti, boolean dumpAll) { ArrayList<ActivityRecord> activities; synchronized (this) { activities = mStackSupervisor.getDumpActivitiesLocked(name); } if (activities.size() <= 0) { return false; } String[] newArgs = new String[args.length - opti]; System.arraycopy(args, opti, newArgs, 0, args.length - opti); TaskRecord lastTask = null; boolean needSep = false; for (int i=activities.size()-1; i>=0; i--) { ActivityRecord r = activities.get(i); if (needSep) { pw.println(); } needSep = true; synchronized (this) { if (lastTask != r.task) { lastTask = r.task; pw.print("TASK "); pw.print(lastTask.affinity); pw.print(" id="); pw.println(lastTask.taskId); if (dumpAll) { lastTask.dump(pw, " "); } } } dumpActivity(" ", fd, pw, activities.get(i), newArgs, dumpAll); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpActivity 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
dumpActivity
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
private String outOfBoundsMsg(int index) { return "Index: " + index + ", Size: " + size; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: outOfBoundsMsg File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/BaseObjects.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
outOfBoundsMsg
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/BaseObjects.java
fdfce062642b0ac062da5cda033d25482f4600fa
0
Analyze the following code function for security vulnerabilities
private void sendBroadcastAsUser(Intent intent, UserHandle userHandle) { final long identity = Binder.clearCallingIdentity(); try { mContext.sendBroadcastAsUser(intent, userHandle); } finally { Binder.restoreCallingIdentity(identity); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendBroadcastAsUser 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
sendBroadcastAsUser
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("rawtypes") private StudyDAO sdao() { return new StudyDAO(dataSource); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sdao File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-24830
HIGH
7.5
OpenClinica
sdao
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
6f864e86543f903bd20d6f9fc7056115106441f3
0
Analyze the following code function for security vulnerabilities
@Override public boolean onOptionsItemSelected(MenuItem item) { // in automotive mode, there's no system wide back button, so need to add that if (DeviceUtils.isAuto(this)) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); finishAfterTransition(); return true; default: return super.onOptionsItemSelected(item); } } return super.onOptionsItemSelected(item); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onOptionsItemSelected File: PermissionController/src/com/android/permissioncontroller/permission/ui/ManagePermissionsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21132
MEDIUM
6.8
android
onOptionsItemSelected
PermissionController/src/com/android/permissioncontroller/permission/ui/ManagePermissionsActivity.java
0679e4f35055729be7276536fe45fe8ec18a0453
0
Analyze the following code function for security vulnerabilities
private Topic getOrCreateTopic(TopicName topicName) { return pulsar().getBrokerService().getTopic( topicName.toString(), true).thenApply(Optional::get).join(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrCreateTopic File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
getOrCreateTopic
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
private void updatePanelExpanded() { boolean isExpanded = !isFullyCollapsed(); if (mPanelExpanded != isExpanded) { mHeadsUpManager.setIsExpanded(isExpanded); mStatusBar.setPanelExpanded(isExpanded); mPanelExpanded = isExpanded; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updatePanelExpanded 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
updatePanelExpanded
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public UserInfo getProfileParent(int userHandle) { checkManageUsersPermission("get the profile parent"); synchronized (mPackagesLock) { return getProfileParentLocked(userHandle); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProfileParent File: services/core/java/com/android/server/pm/UserManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2457
LOW
2.1
android
getProfileParent
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
private void sendDeviceOwnerUserCommand(String action, int userHandle) { synchronized (getLockObject()) { ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked(); if (deviceOwner != null) { Bundle extras = new Bundle(); extras.putParcelable(Intent.EXTRA_USER, UserHandle.of(userHandle)); sendAdminCommandLocked(deviceOwner, action, extras, /* result */ null, /* inForeground */ true); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendDeviceOwnerUserCommand File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
sendDeviceOwnerUserCommand
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private ActivityRecord getWaitingHistoryRecordLocked() { // First find the real culprit... if this activity has stopped, then the key dispatching // timeout should not be caused by this. if (stopped) { final Task rootTask = mRootWindowContainer.getTopDisplayFocusedRootTask(); if (rootTask == null) { return this; } // Try to use the one which is closest to top. ActivityRecord r = rootTask.getTopResumedActivity(); if (r == null) { r = rootTask.getTopPausingActivity(); } if (r != null) { return r; } } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWaitingHistoryRecordLocked 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
getWaitingHistoryRecordLocked
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public Object nextValue() throws JSONException { char c = this.nextClean(); String string; switch (c) { case '"': case '\'': return this.nextString(c); case '{': this.back(); return new JSONObject(this); case '[': this.back(); return new JSONArray(this); } /* * Handle unquoted text. This could be the values true, false, or * null, or it can be a number. An implementation (such as this one) * is allowed to also accept non-standard forms. * * Accumulate characters until we reach the end of the text or a * formatting character. */ StringBuilder sb = new StringBuilder(); while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) { sb.append(c); c = this.next(); } if (!this.eof) { this.back(); } string = sb.toString().trim(); if ("".equals(string)) { throw this.syntaxError("Missing value"); } return JSONObject.stringToValue(string); }
Vulnerability Classification: - CWE: CWE-787 - CVE: CVE-2022-45690 - Severity: HIGH - CVSS Score: 7.5 Description: Add test cases for invalid input Function: nextValue File: src/main/java/org/json/JSONTokener.java Repository: stleary/JSON-java Fixed Code: public Object nextValue() throws JSONException { char c = this.nextClean(); String string; switch (c) { case '"': case '\'': return this.nextString(c); case '{': this.back(); try { return new JSONObject(this); } catch (StackOverflowError e) { throw new JSONException("JSON Array or Object depth too large to process.", e); } case '[': this.back(); try { return new JSONArray(this); } catch (StackOverflowError e) { throw new JSONException("JSON Array or Object depth too large to process.", e); } } /* * Handle unquoted text. This could be the values true, false, or * null, or it can be a number. An implementation (such as this one) * is allowed to also accept non-standard forms. * * Accumulate characters until we reach the end of the text or a * formatting character. */ StringBuilder sb = new StringBuilder(); while (c >= ' ' && ",:]}/\\\"[{;=#".indexOf(c) < 0) { sb.append(c); c = this.next(); } if (!this.eof) { this.back(); } string = sb.toString().trim(); if ("".equals(string)) { throw this.syntaxError("Missing value"); } return JSONObject.stringToValue(string); }
[ "CWE-787" ]
CVE-2022-45690
HIGH
7.5
stleary/JSON-java
nextValue
src/main/java/org/json/JSONTokener.java
7a124d857dc8da1165c87fa788e53359a317d0f7
1
Analyze the following code function for security vulnerabilities
protected void playNativeBuiltinSound(Object data) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: playNativeBuiltinSound 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
playNativeBuiltinSound
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public List<AttachmentDiff> getAttachmentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context) { List<AttachmentDiff> difflist = new ArrayList<AttachmentDiff>(); for (XWikiAttachment origAttach : fromDoc.getAttachmentList()) { String fileName = origAttach.getFilename(); XWikiAttachment newAttach = toDoc.getAttachment(fileName); origAttach = retrieveDeletedAttachment(fromDoc, origAttach, context); if (newAttach == null) { difflist.add(new AttachmentDiff(fileName, org.xwiki.diff.Delta.Type.DELETE, origAttach, newAttach)); } else { newAttach = retrieveDeletedAttachment(toDoc, newAttach, context); try { if (!origAttach.equalsData(newAttach, context)) { difflist .add(new AttachmentDiff(fileName, org.xwiki.diff.Delta.Type.CHANGE, origAttach, newAttach)); } } catch (XWikiException e) { LOGGER.error("Failed to compare attachments [{}] and [{}]", origAttach.getReference(), newAttach.getReference(), e); } } } for (XWikiAttachment newAttach : toDoc.getAttachmentList()) { String fileName = newAttach.getFilename(); XWikiAttachment origAttach = fromDoc.getAttachment(fileName); newAttach = retrieveDeletedAttachment(toDoc, newAttach, context); if (origAttach == null) { difflist.add(new AttachmentDiff(fileName, org.xwiki.diff.Delta.Type.INSERT, origAttach, newAttach)); } } return difflist; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttachmentDiff 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
getAttachmentDiff
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
int indexOfNotificationLocked(String key) { final int N = mNotificationList.size(); for (int i = 0; i < N; i++) { if (key.equals(mNotificationList.get(i).getKey())) { return i; } } return -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: indexOfNotificationLocked File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
indexOfNotificationLocked
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public SecurityRealm getSecurityRealm() { return securityRealm; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSecurityRealm 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
getSecurityRealm
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public Integer recompute(PackageNamePermissionQuery query) { return checkPackageNamePermissionUncached( query.permName, query.pkgName, query.userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: recompute File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
recompute
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
boolean recoverySystemRebootWipeUserData(boolean shutdown, String reason, boolean force, boolean wipeEuicc, boolean wipeExtRequested, boolean wipeResetProtectionData) throws IOException { return FactoryResetter.newBuilder(mContext).setSafetyChecker(mSafetyChecker) .setReason(reason).setShutdown(shutdown).setForce(force).setWipeEuicc(wipeEuicc) .setWipeAdoptableStorage(wipeExtRequested) .setWipeFactoryResetProtection(wipeResetProtectionData) .build().factoryReset(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: recoverySystemRebootWipeUserData File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
recoverySystemRebootWipeUserData
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void setWebhookUrl(String webhookUrl) { this.webhookUrl = webhookUrl; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWebhookUrl File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java Repository: codecentric/spring-boot-admin The code follows secure coding practices.
[ "CWE-94" ]
CVE-2022-46166
CRITICAL
9.8
codecentric/spring-boot-admin
setWebhookUrl
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
0
Analyze the following code function for security vulnerabilities
public GitMaterial getGitMaterial() { return getExistingOrDefaultMaterial(new GitMaterial("")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGitMaterial 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
getGitMaterial
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
public String getMetadataUrl() throws IndexUnreachableException { return getPageUrl(PageType.viewMetadata.getName(), imageToShow); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMetadataUrl File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
getMetadataUrl
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
private static Intent parseIntent(TypedXmlPullParser parser) throws IOException, XmlPullParserException { Intent intent = ShortcutService.parseIntentAttribute(parser, ATTR_INTENT_NO_EXTRA); final int outerDepth = parser.getDepth(); int type; while ((type = parser.next()) != XmlPullParser.END_DOCUMENT && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) { if (type != XmlPullParser.START_TAG) { continue; } final int depth = parser.getDepth(); final String tag = parser.getName(); if (ShortcutService.DEBUG_LOAD || ShortcutService.DEBUG_REBOOT) { Slog.d(TAG, String.format(" depth=%d type=%d name=%s", depth, type, tag)); } switch (tag) { case TAG_EXTRAS: ShortcutInfo.setIntentExtras(intent, PersistableBundle.restoreFromXml(parser)); continue; } throw ShortcutService.throwForInvalidTag(depth, tag); } return intent; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseIntent 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
parseIntent
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
@Override public abstract boolean equals(Object o);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals 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
equals
src/main/java/com/fasterxml/jackson/databind/JavaType.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
public void setContentCaptureManager( @Nullable ContentCaptureManagerInternal contentCaptureManager) { mContentCaptureService = contentCaptureManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setContentCaptureManager 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
setContentCaptureManager
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
private static void safeClose(File keyFile, OutputStream keyOut) { try { keyOut.close(); } catch (IOException e) { if (logger.isWarnEnabled()) { logger.warn("Failed to close a file: " + keyFile, e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: safeClose File: handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java Repository: netty The code follows secure coding practices.
[ "CWE-378", "CWE-379" ]
CVE-2021-21290
LOW
1.9
netty
safeClose
handler/src/main/java/io/netty/handler/ssl/util/SelfSignedCertificate.java
c735357bf29d07856ad171c6611a2e1a0e0000ec
0
Analyze the following code function for security vulnerabilities
@Override public Cursor query(Uri arg0, String[] arg1, String arg2, String[] arg3, String arg4) { // TODO Auto-generated method stub return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: query File: src/at/hgz/vocabletrainer/VocableTrainerProvider.java Repository: hgzojer/vocabletrainer The code follows secure coding practices.
[ "CWE-22" ]
CVE-2017-20181
MEDIUM
4.3
hgzojer/vocabletrainer
query
src/at/hgz/vocabletrainer/VocableTrainerProvider.java
accf6838078f8eb105cfc7865aba5c705fb68426
0
Analyze the following code function for security vulnerabilities
public List<Procedure> getAllProcedure(String packageName, String procedureName) { String packageNameFilter; String procedureNameFilter; if (packageName == null || packageName.isEmpty() || "".equals(packageName)) { packageNameFilter = "%"; } else { packageNameFilter = packageName; } if (procedureName == null || procedureName.isEmpty() || "".equals(procedureName)) { procedureNameFilter = "%"; } else { procedureNameFilter = procedureName; } return jdbcTemplate.query( GET_ALL_PROCEDURE, (resultSet, i) -> new Procedure.Builder() .objectName(resultSet.getString("object_name")) .procedureName(resultSet.getString("procedure_name")) .overload(resultSet.getString("overload") == null ? "" : resultSet.getString("overload")) .methodType(resultSet.getInt("proc_or_func") == 0 ? "PROCEDURE" : "FUNCTION") .argumentList(getProcedureArguments(resultSet.getString("object_name"), resultSet.getString("procedure_name"), resultSet.getString("overload"))) .build(), packageNameFilter, procedureNameFilter ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllProcedure File: obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java Repository: karsany/obridge The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-25075
MEDIUM
4
karsany/obridge
getAllProcedure
obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java
52eca4ad05f3c292aed3178b2f58977686ffa376
0
Analyze the following code function for security vulnerabilities
@Deprecated public long getTimeout() { return mTimeout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTimeout File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getTimeout
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public String login(String loginName, String passwordMD5, HttpSession httpSession) { MallUser user = mallUserMapper.selectByLoginNameAndPasswd(loginName, passwordMD5); if (user != null && httpSession != null) { if (user.getLockedFlag() == 1) { return ServiceResultEnum.LOGIN_USER_LOCKED.getResult(); } //昵称太长 影响页面展示 if (user.getNickName() != null && user.getNickName().length() > 7) { String tempNickName = user.getNickName().substring(0, 7) + ".."; user.setNickName(tempNickName); } NewBeeMallUserVO newBeeMallUserVO = new NewBeeMallUserVO(); BeanUtil.copyProperties(user, newBeeMallUserVO); //设置购物车中的数量 httpSession.setAttribute(Constants.MALL_USER_SESSION_KEY, newBeeMallUserVO); return ServiceResultEnum.SUCCESS.getResult(); } return ServiceResultEnum.LOGIN_ERROR.getResult(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: login File: src/main/java/ltd/newbee/mall/service/impl/NewBeeMallUserServiceImpl.java Repository: newbee-ltd/newbee-mall The code follows secure coding practices.
[ "CWE-639" ]
CVE-2023-30216
MEDIUM
5.4
newbee-ltd/newbee-mall
login
src/main/java/ltd/newbee/mall/service/impl/NewBeeMallUserServiceImpl.java
4f8948579ddd6843a2e313fdd55aafc809246f63
0
Analyze the following code function for security vulnerabilities
protected Map<String, List<String>> buildResponseHeaders(Response response) { Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>(); for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) { List<Object> values = entry.getValue(); List<String> headers = new ArrayList<String>(); for (Object o : values) { headers.add(String.valueOf(o)); } responseHeaders.put(entry.getKey(), headers); } return responseHeaders; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildResponseHeaders File: samples/openapi3/client/extensions/x-auth-id-alias/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
buildResponseHeaders
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public boolean addRequestAckPredicate(StanzaFilter predicate) { synchronized (requestAckPredicates) { return requestAckPredicates.add(predicate); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addRequestAckPredicate File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
addRequestAckPredicate
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
public ApiClient setServers(List<ServerConfiguration> servers) { this.servers = servers; updateBasePath(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServers File: samples/client/petstore/java/okhttp-gson/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
setServers
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public boolean isComplete() { return (!StringUtils.isBlank(location) && !StringUtils.isBlank(aboutme) && !StringUtils.isBlank(website)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isComplete File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
isComplete
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private void updateEncryptionPassword(final int type, final String password) { if (!isDeviceEncryptionEnabled()) { return; } final IBinder service = ServiceManager.getService("mount"); if (service == null) { Log.e(TAG, "Could not find the mount service to update the encryption password"); return; } new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... dummy) { IMountService mountService = IMountService.Stub.asInterface(service); try { mountService.changeEncryptionPassword(type, password); } catch (RemoteException e) { Log.e(TAG, "Error changing encryption password", e); } return null; } }.execute(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateEncryptionPassword File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
updateEncryptionPassword
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public void add(ConsoleOutputStreamConsumer outputStreamConsumer, File file) { CommandLine hg = hg("add", file.getAbsolutePath()); execute(hg, outputStreamConsumer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: add File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2022-29184
MEDIUM
6.5
gocd
add
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
37d35115db2ada2190173f9413cfe1bc6c295ecb
0
Analyze the following code function for security vulnerabilities
@Override public void waitForBroadcastIdle() { waitForBroadcastIdle(/* printWriter= */ null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: waitForBroadcastIdle 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
waitForBroadcastIdle
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public boolean hideKeyguard() { Trace.beginSection("StatusBar#hideKeyguard"); boolean staying = mLeaveOpenOnKeyguardHide; setBarState(StatusBarState.SHADE); View viewToClick = null; if (mLeaveOpenOnKeyguardHide) { mLeaveOpenOnKeyguardHide = false; long delay = calculateGoingToFullShadeDelay(); mNotificationPanel.animateToFullShade(delay); if (mDraggedDownRow != null) { mDraggedDownRow.setUserLocked(false); mDraggedDownRow = null; } viewToClick = mPendingRemoteInputView; mPendingRemoteInputView = null; // Disable layout transitions in navbar for this transition because the load is just // too heavy for the CPU and GPU on any device. if (mNavigationBar != null) { mNavigationBar.disableAnimationsDuringHide(delay); } } else if (!mNotificationPanel.isCollapsing()) { instantCollapseNotificationPanel(); } updateKeyguardState(staying, false /* fromShadeLocked */); if (viewToClick != null && viewToClick.isAttachedToWindow()) { viewToClick.callOnClick(); } // Keyguard state has changed, but QS is not listening anymore. Make sure to update the tile // visibilities so next time we open the panel we know the correct height already. if (mQSPanel != null) { mQSPanel.refreshAllTiles(); } mHandler.removeMessages(MSG_LAUNCH_TRANSITION_TIMEOUT); releaseGestureWakeLock(); mNotificationPanel.onAffordanceLaunchEnded(); mNotificationPanel.animate().cancel(); mNotificationPanel.setAlpha(1f); Trace.endSection(); return staying; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hideKeyguard File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
hideKeyguard
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private void enforceWritePermission(String permission) { if (getContext().checkCallingOrSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Permission denial: writing to settings requires:" + permission); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforceWritePermission 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
enforceWritePermission
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
private void downloadAndUnpackResource(final Location source, final File targetFolder) throws InterruptedException, ExecutionException, IOException { // allocate array final ByteArray byteArray = new ByteArray(1024 * 1024); log.debug("Started download of " + source.getURI()); // Download the zip file final BytesLocation bytes = new BytesLocation(byteArray); final Task task = // downloadService.download(source, bytes, sourceCache()).task(); task.waitFor(); // extract to cache dir final byte[] buf = new byte[64 * 1024]; final ByteArrayInputStream bais = new ByteArrayInputStream(// byteArray.getArray(), 0, byteArray.size()); targetFolder.mkdirs(); log.debug("Unpacking files"); try (final ZipInputStream zis = new ZipInputStream(bais)) { while (true) { final ZipEntry entry = zis.getNextEntry(); if (entry == null) break; // All done! final String name = entry.getName(); final File outFile = new File(targetFolder, name); if (entry.isDirectory()) { outFile.mkdirs(); } else { final int size = (int) entry.getSize(); int len = 0; try (final FileOutputStream out = new FileOutputStream(outFile)) { while (true) { log.debug("Unpacking " + name + "; completion" + (double) len / size * 100 + "%"); final int r = zis.read(buf); if (r < 0) break; // end of entry len += r; out.write(buf, 0, r); } } } } } }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2022-4493 - Severity: CRITICAL - CVSS Score: 9.8 Description: vuln-fix: Zip Slip Vulnerability This fixes a Zip-Slip vulnerability. This change does one of two things. This change either 1. Inserts a guard to protect against Zip Slip. OR 2. Replaces `dir.getCanonicalPath().startsWith(parent.getCanonicalPath())`, which is vulnerable to partial path traversal attacks, with the more secure `dir.getCanonicalFile().toPath().startsWith(parent.getCanonicalFile().toPath())`. For number 2, consider `"/usr/outnot".startsWith("/usr/out")`. The check is bypassed although `/outnot` is not under the `/out` directory. It's important to understand that the terminating slash may be removed when using various `String` representations of the `File` object. For example, on Linux, `println(new File("/var"))` will print `/var`, but `println(new File("/var", "/")` will print `/var/`; however, `println(new File("/var", "/").getCanonicalPath())` will print `/var`. Weakness: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') Severity: High CVSSS: 7.4 Detection: CodeQL (https://codeql.github.com/codeql-query-help/java/java-zipslip/) & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.ZipSlip) Reported-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/16 Co-authored-by: Moderne <team@moderne.io> Function: downloadAndUnpackResource File: src/test/java/io/scif/util/DefaultSampleFilesService.java Repository: scifio Fixed Code: private void downloadAndUnpackResource(final Location source, final File targetFolder) throws InterruptedException, ExecutionException, IOException { // allocate array final ByteArray byteArray = new ByteArray(1024 * 1024); log.debug("Started download of " + source.getURI()); // Download the zip file final BytesLocation bytes = new BytesLocation(byteArray); final Task task = // downloadService.download(source, bytes, sourceCache()).task(); task.waitFor(); // extract to cache dir final byte[] buf = new byte[64 * 1024]; final ByteArrayInputStream bais = new ByteArrayInputStream(// byteArray.getArray(), 0, byteArray.size()); targetFolder.mkdirs(); log.debug("Unpacking files"); try (final ZipInputStream zis = new ZipInputStream(bais)) { while (true) { final ZipEntry entry = zis.getNextEntry(); if (entry == null) break; // All done! final String name = entry.getName(); final File outFile = new File(targetFolder, name); if (!outFile.toPath().normalize().startsWith(targetFolder.toPath().normalize())) { throw new RuntimeException("Bad zip entry"); } if (entry.isDirectory()) { outFile.mkdirs(); } else { final int size = (int) entry.getSize(); int len = 0; try (final FileOutputStream out = new FileOutputStream(outFile)) { while (true) { log.debug("Unpacking " + name + "; completion" + (double) len / size * 100 + "%"); final int r = zis.read(buf); if (r < 0) break; // end of entry len += r; out.write(buf, 0, r); } } } } } }
[ "CWE-22" ]
CVE-2022-4493
CRITICAL
9.8
scifio
downloadAndUnpackResource
src/test/java/io/scif/util/DefaultSampleFilesService.java
fcb0dbca0ec72b22fe0c9ddc8abc9cb188a0ff31
1
Analyze the following code function for security vulnerabilities
public String getStatus() { return status; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStatus File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getStatus
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public static void setViewAboveBelow(View above, View below, int spacingAbove, int spacingBelow) { viewBelow = below; viewAbove = above; aboveSpacing = spacingAbove; belowSpacing = spacingBelow; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setViewAboveBelow 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
setViewAboveBelow
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void setOriginalName(String originalName) { this.originalName = originalName; }
Vulnerability Classification: - CWE: CWE-130 - CVE: CVE-2022-1543 - Severity: MEDIUM - CVSS Score: 6.5 Description: fixed profile name not limited in length Function: setOriginalName File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold Fixed Code: public void setOriginalName(String originalName) { this.originalName = StringUtils.abbreviate(originalName, 256); }
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
setOriginalName
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
1
Analyze the following code function for security vulnerabilities
public void init(KeyGenerationParameters param) { this.param = (RSAKeyGenerationParameters)param; this.iterations = getNumberOfIterations(this.param.getStrength(), this.param.getCertainty()); }
Vulnerability Classification: - CWE: CWE-327 - CVE: CVE-2018-1000180 - Severity: MEDIUM - CVSS Score: 5.0 Description: BJA-694 cleaned up primality test Function: init File: core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java Repository: bcgit/bc-java Fixed Code: public void init(KeyGenerationParameters param) { this.param = (RSAKeyGenerationParameters)param; }
[ "CWE-327" ]
CVE-2018-1000180
MEDIUM
5
bcgit/bc-java
init
core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
73780ac522b7795fc165630aba8d5f5729acc839
1
Analyze the following code function for security vulnerabilities
@GuardedBy("mLock") private ParceledListSlice<ShortcutInfo> getShortcutsWithQueryLocked(@NonNull String packageName, @UserIdInt int userId, int cloneFlags, @NonNull Predicate<ShortcutInfo> filter) { final ArrayList<ShortcutInfo> ret = new ArrayList<>(); final ShortcutPackage ps = getPackageShortcutsForPublisherLocked(packageName, userId); ps.findAll(ret, filter, cloneFlags); return new ParceledListSlice<>(setReturnedByServer(ret)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShortcutsWithQueryLocked File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
getShortcutsWithQueryLocked
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public void setInteracting(int barWindow, boolean interacting) { final boolean changing = ((mInteractingWindows & barWindow) != 0) != interacting; mInteractingWindows = interacting ? (mInteractingWindows | barWindow) : (mInteractingWindows & ~barWindow); if (mInteractingWindows != 0) { suspendAutohide(); } else { resumeSuspendedAutohide(); } // manually dismiss the volume panel when interacting with the nav bar if (changing && interacting && barWindow == StatusBarManager.WINDOW_NAVIGATION_BAR) { dismissVolumeDialog(); } checkBarModes(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInteracting File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
setInteracting
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public Session getSession() { return session; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSession File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java Repository: eclipse/milo The code follows secure coding practices.
[ "CWE-770" ]
CVE-2022-25897
HIGH
7.5
eclipse/milo
getSession
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
0
Analyze the following code function for security vulnerabilities
@Override public JsonValue encode(T value) { if (value == null) { return encode(getNullRepresentation(), String.class); } else { return encode(value, getPresentationType()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encode File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
encode
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
void endLaunchPowerMode(@PowerModeReason int reason) { if (mLaunchPowerModeReasons == 0) return; mLaunchPowerModeReasons &= ~reason; if ((mLaunchPowerModeReasons & POWER_MODE_REASON_UNKNOWN_VISIBILITY) != 0) { boolean allResolved = true; for (int i = mRootWindowContainer.getChildCount() - 1; i >= 0; i--) { allResolved &= mRootWindowContainer.getChildAt(i).mUnknownAppVisibilityController .allResolved(); } if (allResolved) { mLaunchPowerModeReasons &= ~POWER_MODE_REASON_UNKNOWN_VISIBILITY; mRetainPowerModeAndTopProcessState = false; mH.removeMessages(H.END_POWER_MODE_UNKNOWN_VISIBILITY_MSG); } } if (mLaunchPowerModeReasons == 0 && mPowerManagerInternal != null) { mPowerManagerInternal.setPowerMode(Mode.LAUNCH, false); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endLaunchPowerMode 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
endLaunchPowerMode
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public ContentProviderHolder getContentProviderExternal( String name, int userId, IBinder token, String tag) { traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "getContentProviderExternal: ", name); try { return mCpHelper.getContentProviderExternal(name, userId, token, tag); } finally { Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentProviderExternal 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
getContentProviderExternal
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
protected Terminal terminal() { return SystemRegistry.get().terminal(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: terminal File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java Repository: jline/jline3 The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-50572
MEDIUM
5.5
jline/jline3
terminal
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
0
Analyze the following code function for security vulnerabilities
private boolean canRoundtrip(final String encodeCharset, final String decodeCharset) throws UnsupportedEncodingException { final String reference = "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset="; final byte[] bytesEncoding1 = reference.getBytes(encodeCharset); final String referenceWithEncoding2 = new String(bytesEncoding1, decodeCharset); return reference.equals(referenceWithEncoding2); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canRoundtrip 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
canRoundtrip
src/org/cyberneko/html/HTMLScanner.java
a800fce3b079def130ed42a408ff1d09f89e773d
0
Analyze the following code function for security vulnerabilities
public AppOpsService getAppOpsService(File file, Handler handler) { return new AppOpsService(file, handler, getContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAppOpsService 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
getAppOpsService
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
private void buildComplexCriteria(String structureInode, Map<String, Field> velVarfieldsMap, ComplexCriteria criteriaToBuildOut, StringBuilder bob, List<Object> params){ List<Criteria> cs = criteriaToBuildOut.getCriteria(); boolean first = true; boolean open = false; for (Criteria criteria : cs) { if(criteria instanceof SimpleCriteria){ if(!first){ bob.append(" " + criteriaToBuildOut.getPreceedingOperator(criteria) + " "); bob.append("(structure_inode = '" + structureInode + "' AND "); open = true; } String att = velVarfieldsMap.get(((SimpleCriteria) criteria).getAttribute()) != null ? velVarfieldsMap.get(((SimpleCriteria) criteria).getAttribute()).getFieldContentlet() : ((SimpleCriteria) criteria).getAttribute(); bob.append(att + " " + ((SimpleCriteria) criteria).getOperator() + " ?"); if(open){ bob.append(")"); open = false; } params.add(((SimpleCriteria) criteria).getValue()); }else if(criteria instanceof ComplexCriteria){ if(!first){ bob.append(" " + criteriaToBuildOut.getPreceedingOperator(criteria) + " "); } bob.append(" (structure_inode = '" + structureInode + "' AND "); buildComplexCriteria(structureInode, velVarfieldsMap, (ComplexCriteria)criteria, bob, params); bob.append(") "); } first = false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildComplexCriteria File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
buildComplexCriteria
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "2.2M1") public String getName() { return getDocumentReference().getName(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName 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
getName
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
private RepairFrontier getRepairFrontier(final Element element, final String attribute, final boolean mustFind) throws GameParseException { return getValidatedObject(element, attribute, mustFind, data.getRepairFrontierList()::getRepairFrontier, "repair frontier"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRepairFrontier File: game-core/src/main/java/games/strategy/engine/data/GameParser.java Repository: triplea-game/triplea The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000546
MEDIUM
6.8
triplea-game/triplea
getRepairFrontier
game-core/src/main/java/games/strategy/engine/data/GameParser.java
0f23875a4c6e166218859a63c884995f15c53895
0
Analyze the following code function for security vulnerabilities
@Override protected void onFullPongMessage(final WebSocketChannel webSocketChannel, BufferedBinaryMessage bufferedBinaryMessage) { if(session.isSessionClosed()) { //to bad, the channel has already been closed //we just ignore messages that are received after we have closed, as the endpoint is no longer in a valid state to deal with them //this this should only happen if a message was on the wire when we called close() bufferedBinaryMessage.getData().free(); return; } final HandlerWrapper handler = getHandler(FrameType.PONG); if (handler != null) { final Pooled<ByteBuffer[]> pooled = bufferedBinaryMessage.getData(); final PongMessage message = DefaultPongMessage.create(toBuffer(pooled.getResource())); session.getContainer().invokeEndpointMethod(executor, new Runnable() { @Override public void run() { try { ((MessageHandler.Whole) handler.getHandler()).onMessage(message); } catch (Exception e) { invokeOnError(e); } finally { pooled.close(); } } }); } }
Vulnerability Classification: - CWE: CWE-401 - CVE: CVE-2021-3690 - Severity: HIGH - CVSS Score: 7.5 Description: [UNDERTOW-1935] - buffer leak on incoming websocket PONG message Function: onFullPongMessage File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java Repository: undertow-io/undertow Fixed Code: @Override protected void onFullPongMessage(final WebSocketChannel webSocketChannel, BufferedBinaryMessage bufferedBinaryMessage) { if(session.isSessionClosed()) { //to bad, the channel has already been closed //we just ignore messages that are received after we have closed, as the endpoint is no longer in a valid state to deal with them //this this should only happen if a message was on the wire when we called close() bufferedBinaryMessage.getData().free(); return; } final HandlerWrapper handler = getHandler(FrameType.PONG); if (handler != null) { final Pooled<ByteBuffer[]> pooled = bufferedBinaryMessage.getData(); final PongMessage message = DefaultPongMessage.create(toBuffer(pooled.getResource())); session.getContainer().invokeEndpointMethod(executor, new Runnable() { @Override public void run() { try { ((MessageHandler.Whole) handler.getHandler()).onMessage(message); } catch (Exception e) { invokeOnError(e); } finally { pooled.close(); } } }); } else { bufferedBinaryMessage.getData().free(); } }
[ "CWE-401" ]
CVE-2021-3690
HIGH
7.5
undertow-io/undertow
onFullPongMessage
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
c7e84a0b7efced38506d7d1dfea5902366973877
1
Analyze the following code function for security vulnerabilities
public boolean isPreferentialNetworkServiceEnabled() { throwIfParentInstance("isPreferentialNetworkServiceEnabled"); return getPreferentialNetworkServiceConfigs().stream().anyMatch(c -> c.isEnabled()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPreferentialNetworkServiceEnabled 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
isPreferentialNetworkServiceEnabled
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public Object substituteValueInInput(int index, String binding, String value, Object input, List<Map.Entry<String, String>> insertedParams, Object... args) { String jsonBody = (String) input; return DataTypeStringUtils.jsonSmartReplacementPlaceholderWithValue(jsonBody, value, null, insertedParams, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: substituteValueInInput File: app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java Repository: appsmithorg/appsmith The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-38298
HIGH
8.8
appsmithorg/appsmith
substituteValueInInput
app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
c59351ef94f9780c2a1ffc991e29b9272ab9fe64
0
Analyze the following code function for security vulnerabilities
public int convertToPixels(int dipCount, boolean horizontal) { DisplayMetrics dm = getContext().getResources().getDisplayMetrics(); float ppi = dm.density * 160f; return (int) (((float) dipCount) / 25.4f * ppi); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertToPixels 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
convertToPixels
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private Integer[] getAllowEntities(ID user, boolean inQuery) { List<Integer> allows = new ArrayList<>(); // 动态 allows.add(EntityHelper.Feeds); if (inQuery) allows.add(EntityHelper.FeedsComment); // 项目 if (ProjectManager.instance.getAvailable(user).length > 0) { allows.add(EntityHelper.ProjectTask); if (inQuery) allows.add(EntityHelper.ProjectTaskComment); } for (Entity e : MetadataSorter.sortEntities(user, false, false)) { // 有附件字段的实体才显示 if (hasAttachmentFields(e)) { allows.add(e.getEntityCode()); } if (e.getDetailEntity() != null && hasAttachmentFields(e.getDetailEntity())) { allows.add(e.getDetailEntity().getEntityCode()); } } return allows.toArray(new Integer[0]); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllowEntities File: src/main/java/com/rebuild/web/files/FileListController.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
getAllowEntities
src/main/java/com/rebuild/web/files/FileListController.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
private void enforceCanCallLockTaskLocked(CallerIdentity caller) { Preconditions.checkCallAuthorization(isProfileOwner(caller) || isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller)); final int userId = caller.getUserId(); if (!canUserUseLockTaskLocked(userId)) { throw new SecurityException("User " + userId + " is not allowed to use lock task"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforceCanCallLockTaskLocked File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
enforceCanCallLockTaskLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected <A> Map<String, Http.MultipartFormData.FilePart<?>> resolveDuplicateFilePartKeys( final List<Http.MultipartFormData.FilePart<A>> fileParts) { final Map<String, List<Http.MultipartFormData.FilePart<?>>> resolvedDuplicateKeys = fileParts.stream() .collect( Collectors.toMap( Http.MultipartFormData.FilePart::getKey, filePart -> new ArrayList<>(Collections.singletonList(filePart)), (a, b) -> { a.addAll(b); return a; })); final Map<String, Http.MultipartFormData.FilePart<?>> data = new HashMap<>(); resolvedDuplicateKeys.forEach( (key, values) -> fillDataWith(key, data, values.size(), i -> values.get(i))); return data; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveDuplicateFilePartKeys File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
resolveDuplicateFilePartKeys
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
@Override public Response processMessageAck(MessageAck ack) throws Exception { ConsumerBrokerExchange consumerExchange = getConsumerBrokerExchange(ack.getConsumerId()); if (consumerExchange != null) { broker.acknowledge(consumerExchange, ack); } else if (ack.isInTransaction()) { LOG.warn("no matching consumer, ignoring ack {}", consumerExchange, ack); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processMessageAck 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
processMessageAck
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@Override public String getPermissionControllerPackageName() { synchronized (mPackages) { return mRequiredInstallerPackage; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPermissionControllerPackageName 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
getPermissionControllerPackageName
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("javadoc") public void onConfigurationChanged(Configuration newConfig) { try { TraceEvent.begin("ContentViewCore.onConfigurationChanged"); if (newConfig.keyboard != Configuration.KEYBOARD_NOKEYS) { if (mNativeContentViewCore != 0) { mImeAdapter.attach(nativeGetNativeImeAdapter(mNativeContentViewCore), TextInputType.NONE, 0 /* no flags */); } mInputMethodManagerWrapper.restartInput(mContainerView); } mContainerViewInternals.super_onConfigurationChanged(newConfig); // To request layout has side effect, but it seems OK as it only happen in // onConfigurationChange and layout has to be changed in most case. mContainerView.requestLayout(); } finally { TraceEvent.end("ContentViewCore.onConfigurationChanged"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onConfigurationChanged 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
onConfigurationChanged
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
public void deleteSyncKey(String projectId) { stringRedisTemplate.delete(SYNC_THIRD_PARTY_ISSUES_KEY + ":" + projectId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteSyncKey File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
deleteSyncKey
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
public Userview createUserview(String json, String menuId, boolean preview, String contextPath, Map requestParameters, String key, Boolean embed) { AppDefinition appDef = AppUtil.getCurrentAppDefinition(); return createUserview(appDef, json, menuId, preview, contextPath, requestParameters, key, embed); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createUserview File: wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java Repository: jogetworkflow/jw-community The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4560
MEDIUM
6.1
jogetworkflow/jw-community
createUserview
wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
0
Analyze the following code function for security vulnerabilities
public void setKeyPassword(final String keyPassword) { this.keyPassword = keyPassword; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setKeyPassword File: src/main/java/org/cryptacular/bean/AbstractCipherBean.java Repository: vt-middleware/cryptacular The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-7226
MEDIUM
5
vt-middleware/cryptacular
setKeyPassword
src/main/java/org/cryptacular/bean/AbstractCipherBean.java
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
0
Analyze the following code function for security vulnerabilities
void startSipService(Context context, String sipProfileName, boolean enableProfile) { startSipProfilesAsync(context, sipProfileName, enableProfile); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startSipService File: sip/src/com/android/services/telephony/sip/SipAccountRegistry.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0847
HIGH
7.2
android
startSipService
sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
a294ae5342410431a568126183efe86261668b5d
0
Analyze the following code function for security vulnerabilities
public static final String toXMLName(final String name) { final StringBuilder builder = new StringBuilder(); boolean firstWord = true; for (int i = 0; i < name.length(); i++) { final char c = name.charAt(i); if (i == 0) { builder.append(Character.toLowerCase(c)); } else { if (firstWord) { if (i + 2 < name.length() && Character.isLowerCase(name.charAt(i + 2))) { firstWord = false; } builder.append(Character.toLowerCase(c)); } else { builder.append(c); } } } return builder.toString(); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2018-1000651 - Severity: HIGH - CVSS Score: 7.5 Description: gh-813 Turn on secure processing feature for XML parsers etc Function: toXMLName File: stroom-core-server/src/main/java/stroom/entity/server/util/XMLUtil.java Repository: gchq/stroom Fixed Code: public static String toXMLName(final String name) { final StringBuilder builder = new StringBuilder(); boolean firstWord = true; for (int i = 0; i < name.length(); i++) { final char c = name.charAt(i); if (i == 0) { builder.append(Character.toLowerCase(c)); } else { if (firstWord) { if (i + 2 < name.length() && Character.isLowerCase(name.charAt(i + 2))) { firstWord = false; } builder.append(Character.toLowerCase(c)); } else { builder.append(c); } } } return builder.toString(); }
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
toXMLName
stroom-core-server/src/main/java/stroom/entity/server/util/XMLUtil.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
1
Analyze the following code function for security vulnerabilities
public static final File createTempDir() throws IOException { File dir = File.createTempFile("mpxj", "tmp"); delete(dir); mkdirs(dir); return dir; }
Vulnerability Classification: - CWE: CWE-377, CWE-200 - CVE: CVE-2022-41954 - Severity: LOW - CVSS Score: 3.3 Description: vuln-fix: Temporary File Information Disclosure This fixes temporary file information disclosure vulnerability due to the use of the vulnerable `File.createTempFile()` method. The vulnerability is fixed by using the `Files.createTempFile()` method which sets the correct posix permissions. Weakness: CWE-377: Insecure Temporary File Severity: Medium CVSSS: 5.5 Detection: CodeQL & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.SecureTempFileCreation) Reported-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com> Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/18 Co-authored-by: Moderne <team@moderne.io> Function: createTempDir File: src/main/java/net/sf/mpxj/common/FileHelper.java Repository: joniles/mpxj Fixed Code: public static final File createTempDir() throws IOException { File dir = Files.createTempFile("mpxj", "tmp").toFile(); delete(dir); mkdirs(dir); return dir; }
[ "CWE-377", "CWE-200" ]
CVE-2022-41954
LOW
3.3
joniles/mpxj
createTempDir
src/main/java/net/sf/mpxj/common/FileHelper.java
ae0af24345d79ad45705265d9927fe55e94a5721
1
Analyze the following code function for security vulnerabilities
private Set search(String attributeName, String attributeValue, String[] attrs) throws CertStoreException { String filter = attributeName + "=" + attributeValue; if (attributeName == null) { filter = null; } DirContext ctx = null; Set set = new HashSet(); try { ctx = connectLDAP(); SearchControls constraints = new SearchControls(); constraints.setSearchScope(SearchControls.SUBTREE_SCOPE); constraints.setCountLimit(0); for (int i = 0; i < attrs.length; i++) { String temp[] = new String[1]; temp[0] = attrs[i]; constraints.setReturningAttributes(temp); String filter2 = "(&(" + filter + ")(" + temp[0] + "=*))"; if (filter == null) { filter2 = "(" + temp[0] + "=*)"; } NamingEnumeration results = ctx.search(params.getBaseDN(), filter2, constraints); while (results.hasMoreElements()) { SearchResult sr = (SearchResult)results.next(); // should only be one attribute in the attribute set with // one // attribute value as byte array NamingEnumeration enumeration = ((Attribute)(sr .getAttributes().getAll().next())).getAll(); while (enumeration.hasMore()) { Object o = enumeration.next(); set.add(o); } } } } catch (Exception e) { throw new CertStoreException( "Error getting results from LDAP directory " + e); } finally { try { if (null != ctx) { ctx.close(); } } catch (Exception e) { } } return set; }
Vulnerability Classification: - CWE: CWE-295 - CVE: CVE-2023-33201 - Severity: MEDIUM - CVSS Score: 5.3 Description: added filter encode to search Function: search File: prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java Repository: bcgit/bc-java Fixed Code: private Set search(String attributeName, String attributeValue, String[] attrs) throws CertStoreException { String filter = attributeName + "=" + filterEncode(attributeValue); System.out.println(filter); if (attributeName == null) { filter = null; } DirContext ctx = null; Set set = new HashSet(); try { ctx = connectLDAP(); SearchControls constraints = new SearchControls(); constraints.setSearchScope(SearchControls.SUBTREE_SCOPE); constraints.setCountLimit(0); for (int i = 0; i < attrs.length; i++) { String temp[] = new String[1]; temp[0] = attrs[i]; constraints.setReturningAttributes(temp); String filter2 = "(&(" + filter + ")(" + temp[0] + "=*))"; if (filter == null) { filter2 = "(" + temp[0] + "=*)"; } NamingEnumeration results = ctx.search(params.getBaseDN(), filter2, constraints); while (results.hasMoreElements()) { SearchResult sr = (SearchResult)results.next(); // should only be one attribute in the attribute set with // one // attribute value as byte array NamingEnumeration enumeration = ((Attribute)(sr .getAttributes().getAll().next())).getAll(); while (enumeration.hasMore()) { Object o = enumeration.next(); set.add(o); } } } } catch (Exception e) { throw new CertStoreException( "Error getting results from LDAP directory " + e); } finally { try { if (null != ctx) { ctx.close(); } } catch (Exception e) { } } return set; }
[ "CWE-295" ]
CVE-2023-33201
MEDIUM
5.3
bcgit/bc-java
search
prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java
e8c409a8389c815ea3fda5e8b94c92fdfe583bcc
1
Analyze the following code function for security vulnerabilities
public void addDatatransferProgressListener( OnDatatransferProgressListener listener, OCUpload ocUpload ) { if (ocUpload == null || listener == null) { return; } String targetKey = buildRemoteName(ocUpload.getAccountName(), ocUpload.getRemotePath()); mBoundListeners.put(targetKey, listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDatatransferProgressListener File: src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
addDatatransferProgressListener
src/main/java/com/owncloud/android/files/services/FileUploader.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
public void addConverter(Class<?> targetClass, String converterClass) { notNull("targetClass", targetClass); notNull("converterClass", converterClass); String converterId = STANDARD_TYPE_TO_CONV_ID_MAP.get(targetClass); if (converterId != null) { addConverter(converterId, converterClass); } else { if (LOGGER.isLoggable(FINE) && converterTypeMap.containsKey(targetClass)) { LOGGER.log(FINE, "converter target class {0} has already been registered. Replacing existing converter class type {1} with {2}.", new Object[] { targetClass.getName(), converterTypeMap.get(targetClass), converterClass }); } converterTypeMap.put(targetClass, converterClass); addPropertyEditorIfNecessary(targetClass); } if (LOGGER.isLoggable(FINE)) { LOGGER.fine(format("added converter of class type ''{0}''", converterClass)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addConverter File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-14371
MEDIUM
5
eclipse-ee4j/mojarra
addConverter
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
1b434748d9239f42eae8aa7d37d7a0930c061e24
0
Analyze the following code function for security vulnerabilities
public void useAttributeFor(Class type) { if (attributeMapper == null) { throw new com.thoughtworks.xstream.InitializationException("No " + AttributeMapper.class.getName() + " available"); } attributeMapper.addAttributeFor(type); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: useAttributeFor 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
useAttributeFor
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
public String getBridgeTag() { return mBridgeTag; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBridgeTag File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getBridgeTag
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override protected Object filterToLabel(PackageParser.ProviderIntentInfo filter) { return filter.provider; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: filterToLabel 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
filterToLabel
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Deprecated public WearableExtender setInProgressLabel(CharSequence label) { mInProgressLabel = label; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInProgressLabel File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setInProgressLabel
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
protected abstract void sendSms(SmsTracker tracker);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendSms 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
sendSms
src/java/com/android/internal/telephony/SMSDispatcher.java
df31d37d285dde9911b699837c351aed2320b586
0
Analyze the following code function for security vulnerabilities
protected void updateRoamingState() { /** * Since the roaming state of gsm service (from +CREG) and * data service (from +CGREG) could be different, the new SS * is set to roaming when either is true. * * There are exceptions for the above rule. * The new SS is not set as roaming while gsm service reports * roaming but indeed it is same operator. * And the operator is considered non roaming. * * The test for the operators is to handle special roaming * agreements and MVNO's. */ boolean roaming = (mGsmRoaming || mDataRoaming); if (mGsmRoaming && !isOperatorConsideredRoaming(mNewSS) && (isSameNamedOperators(mNewSS) || isOperatorConsideredNonRoaming(mNewSS))) { roaming = false; } // Save the roaming state before carrier config possibly overrides it. mNewSS.setDataRoamingFromRegistration(roaming); ICarrierConfigLoader configLoader = (ICarrierConfigLoader) ServiceManager.getService(Context.CARRIER_CONFIG_SERVICE); if (configLoader != null) { try { PersistableBundle b = configLoader.getConfigForSubId(mPhone.getSubId()); if (alwaysOnHomeNetwork(b)) { log("updateRoamingState: carrier config override always on home network"); roaming = false; } else if (isNonRoamingInGsmNetwork(b, mNewSS.getOperatorNumeric())) { log("updateRoamingState: carrier config override set non roaming:" + mNewSS.getOperatorNumeric()); roaming = false; } else if (isRoamingInGsmNetwork(b, mNewSS.getOperatorNumeric())) { log("updateRoamingState: carrier config override set roaming:" + mNewSS.getOperatorNumeric()); roaming = true; } } catch (RemoteException e) { loge("updateRoamingState: unable to access carrier config service"); } } else { log("updateRoamingState: no carrier config service available"); } mNewSS.setVoiceRoaming(roaming); mNewSS.setDataRoaming(roaming); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateRoamingState File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
updateRoamingState
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
@CalledByNative public void onLoadStopped() { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onLoadStopped File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
onLoadStopped
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public boolean hasCompletedProgress() { // not a progress notification; can't be complete if (!extras.containsKey(EXTRA_PROGRESS) || !extras.containsKey(EXTRA_PROGRESS_MAX)) { return false; } // many apps use max 0 for 'indeterminate'; not complete if (extras.getInt(EXTRA_PROGRESS_MAX) == 0) { return false; } return extras.getInt(EXTRA_PROGRESS) == extras.getInt(EXTRA_PROGRESS_MAX); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasCompletedProgress File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
hasCompletedProgress
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public void updateClassProperty(EntityReference reference, Object... queryParameters) { gotoPage(reference, "propupdate", queryParameters); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateClassProperty File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
updateClassProperty
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
private void startWatchingUserRestrictionChanges() { // TODO: The current design of settings looking different based on user restrictions // should be reworked to keep them separate and system code should check the setting // first followed by checking the user restriction before performing an operation. IUserRestrictionsListener listener = new IUserRestrictionsListener.Stub() { @Override public void onUserRestrictionsChanged(int userId, Bundle newRestrictions, Bundle prevRestrictions) { Set<String> changedRestrictions = getRestrictionDiff(prevRestrictions, newRestrictions); // We are changing the settings affected by restrictions to their current // value with a forced update to ensure that all cross profile dependencies // are taken into account. Also make sure the settings update to.. the same // value passes the security checks, so clear binder calling id. if (changedRestrictions.contains(UserManager.DISALLOW_SHARE_LOCATION)) { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { Setting setting = getSecureSetting( Settings.Secure.LOCATION_MODE, userId); updateSecureSetting(Settings.Secure.LOCATION_MODE, setting != null ? setting.getValue() : null, null, true, userId, true); } } finally { Binder.restoreCallingIdentity(identity); } } if (changedRestrictions.contains(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES) || changedRestrictions.contains( UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES_GLOBALLY)) { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { Setting setting = getGlobalSetting( Settings.Global.INSTALL_NON_MARKET_APPS); String value = setting != null ? setting.getValue() : null; updateGlobalSetting(Settings.Global.INSTALL_NON_MARKET_APPS, value, null, true, userId, true); } } finally { Binder.restoreCallingIdentity(identity); } } if (changedRestrictions.contains(UserManager.DISALLOW_DEBUGGING_FEATURES)) { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { Setting setting = getGlobalSetting(Settings.Global.ADB_ENABLED); String value = setting != null ? setting.getValue() : null; updateGlobalSetting(Settings.Global.ADB_ENABLED, value, null, true, userId, true); setting = getGlobalSetting(Settings.Global.ADB_WIFI_ENABLED); value = setting != null ? setting.getValue() : null; updateGlobalSetting(Settings.Global.ADB_WIFI_ENABLED, value, null, true, userId, true); } } finally { Binder.restoreCallingIdentity(identity); } } if (changedRestrictions.contains(UserManager.ENSURE_VERIFY_APPS)) { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { Setting include = getGlobalSetting( Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB); String includeValue = include != null ? include.getValue() : null; updateGlobalSetting(Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, includeValue, null, true, userId, true); } } finally { Binder.restoreCallingIdentity(identity); } } if (changedRestrictions.contains(UserManager.DISALLOW_CONFIG_MOBILE_NETWORKS)) { final long identity = Binder.clearCallingIdentity(); try { synchronized (mLock) { Setting setting = getGlobalSetting( Settings.Global.PREFERRED_NETWORK_MODE); String value = setting != null ? setting.getValue() : null; updateGlobalSetting(Settings.Global.PREFERRED_NETWORK_MODE, value, null, true, userId, true); } } finally { Binder.restoreCallingIdentity(identity); } } } }; mUserManager.addUserRestrictionsListener(listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startWatchingUserRestrictionChanges File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
startWatchingUserRestrictionChanges
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
@Override public boolean isBackgroundLocationSupported() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isBackgroundLocationSupported File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
isBackgroundLocationSupported
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
boolean isCurrentProfileLocked(int userId) { if (userId == mCurrentUserId) return true; for (int i = 0; i < mCurrentProfileIds.length; i++) { if (mCurrentProfileIds[i] == userId) return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCurrentProfileLocked 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
isCurrentProfileLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public Form<T> bindFromRequest(Http.Request request, String... allowedFields) { return bind( this.messagesApi.preferred(request).lang(), request.attrs(), requestData(request), requestFileData(request), allowedFields); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bindFromRequest File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
bindFromRequest
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
public boolean isInCreateMode() { return getDriver().getCurrentUrl().contains("/create/"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInCreateMode File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
isInCreateMode
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
public boolean hasFavtags() { return !getFavtags().isEmpty(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasFavtags File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
hasFavtags
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public Set<String> getUniqueLinkedPages(XWikiContext context) { // Only return document references. Set<EntityReference> references = getUniqueLinkedEntityReferences(context, Map.of( EntityType.DOCUMENT, Set.of( ResourceType.SPACE, ResourceType.DOCUMENT, ResourceType.ATTACHMENT), EntityType.PAGE, Set.of( ResourceType.PAGE, ResourceType.PAGE_ATTACHMENT) )); Set<String> documentNames = new LinkedHashSet<>(references.size()); XWikiDocument contextDoc = context.getDoc(); String contextWiki = context.getWikiId(); EntityReferenceSerializer<String> serializer; try { // Specify the right context information for using the compact wiki serializer properly // Make sure the right document is used as context document context.setDoc(this); // Make sure the right wiki is used as context document context.setWikiId(getDocumentReference().getWikiReference().getName()); // for retro-compatibility reason we don't use the same serializer for 1.0 syntax. if (is10Syntax()) { serializer = getCompactEntityReferenceSerializer(); } else { serializer = getCompactWikiEntityReferenceSerializer(); } for (EntityReference reference : references) { // Get the reference of the document DocumentReference linkDocumentReference = context.getWiki().getDocumentReference(reference, context); // Serialize the reference documentNames.add(serializer.serialize(linkDocumentReference)); } } finally { context.setDoc(contextDoc); context.setWikiId(contextWiki); } return documentNames; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUniqueLinkedPages 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
getUniqueLinkedPages
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 String getTitle() { return mWebContents == null ? null : mWebContents.getTitle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTitle File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
getTitle
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
@Override public ServerBuilder tls(PrivateKey key, @Nullable String keyPassword, Iterable<? extends X509Certificate> keyCertChain) { virtualHostTemplate.tls(key, keyPassword, keyCertChain); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tls File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
tls
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
@Override public void setTestPhoneAcctSuggestionComponent(String flattenedComponentName) { try { Log.startSession("TSI.sPASA"); enforceModifyPermission(); if (Binder.getCallingUid() != Process.SHELL_UID && Binder.getCallingUid() != Process.ROOT_UID) { throw new SecurityException("Shell-only API."); } synchronized (mLock) { PhoneAccountSuggestionHelper.setOverrideServiceName(flattenedComponentName); } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTestPhoneAcctSuggestionComponent File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
setTestPhoneAcctSuggestionComponent
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public void quiescingTransmit(Method m) throws IOException { synchronized (_channelMutex) { quiescingTransmit(new AMQCommand(m)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: quiescingTransmit 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
quiescingTransmit
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public void setSessionTimeout( final Integer sessionTimeout ) { this.sessionTimeout = sessionTimeout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSessionTimeout File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java Repository: enonic/xp The code follows secure coding practices.
[ "CWE-384" ]
CVE-2024-23679
CRITICAL
9.8
enonic/xp
setSessionTimeout
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
0189975691e9e6407a9fee87006f730e84f734ff
0
Analyze the following code function for security vulnerabilities
@GetMapping("/is/super/{userid}") public boolean isSuperUser(@PathVariable String userid) { return baseUserService.isSuperUser(userid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSuperUser File: framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java Repository: metersphere The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-38494
HIGH
7.5
metersphere
isSuperUser
framework/sdk-parent/sdk/src/main/java/io/metersphere/controller/BaseUserController.java
a23f75d93b666901fd148d834df9384f6f24cf28
0