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
boolean matches(String abi) { return abiList.contains(abi); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: matches File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
matches
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
@Override public void onChange(boolean selfChange, Uri uri, int userId) { mConstants = loadConstants(); invalidateBinderCaches(); mInjector.binderWithCleanCallingIdentity(() -> { final Intent intent = new Intent( DevicePolicyManager.ACTION_DEVICE_POLICY_CONSTANTS_CHANGED); intent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); final List<UserInfo> users = mUserManager.getAliveUsers(); for (int i = 0; i < users.size(); i++) { mContext.sendBroadcastAsUser(intent, UserHandle.of(users.get(i).id)); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onChange 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
onChange
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void onChange(boolean selfChange) { update(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onChange File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
onChange
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public void setUserIP(String userIP) { delegatedUserIPHolder.set(userIP); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUserIP File: modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2020-5206
MEDIUM
6.4
opencast
setUserIP
modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java
b157e1fb3b35991ca7bf59f0730329fbe7ce82e8
0
Analyze the following code function for security vulnerabilities
private void onUserStopped(int userId) { synchronized (mLock) { boolean providersChanged = false; boolean crossProfileWidgetsChanged = false; // Remove widgets that have both host and provider in the user. final int widgetCount = mWidgets.size(); for (int i = widgetCount - 1; i >= 0; i--) { Widget widget = mWidgets.get(i); final boolean hostInUser = widget.host.getUserId() == userId; final boolean hasProvider = widget.provider != null; final boolean providerInUser = hasProvider && widget.provider.getUserId() == userId; // If both host and provider are in the user, just drop the widgets // as we do not want to make host callbacks and provider broadcasts // as the host and the provider will be killed. if (hostInUser && (!hasProvider || providerInUser)) { mWidgets.remove(i); widget.host.widgets.remove(widget); widget.host = null; if (hasProvider) { widget.provider.widgets.remove(widget); widget.provider = null; } } } // Remove hosts and notify providers in other profiles. final int hostCount = mHosts.size(); for (int i = hostCount - 1; i >= 0; i--) { Host host = mHosts.get(i); if (host.getUserId() == userId) { crossProfileWidgetsChanged |= !host.widgets.isEmpty(); deleteHostLocked(host); } } // Remove the providers and notify hosts in other profiles. final int providerCount = mProviders.size(); for (int i = providerCount - 1; i >= 0; i--) { Provider provider = mProviders.get(i); if (provider.getUserId() == userId) { crossProfileWidgetsChanged |= !provider.widgets.isEmpty(); providersChanged = true; deleteProviderLocked(provider); } } // Remove grants for this user. final int grantCount = mPackagesWithBindWidgetPermission.size(); for (int i = grantCount - 1; i >= 0; i--) { Pair<Integer, String> packageId = mPackagesWithBindWidgetPermission.valueAt(i); if (packageId.first == userId) { mPackagesWithBindWidgetPermission.removeAt(i); } } // Take a note we no longer have state for this user. final int userIndex = mLoadedUserIds.indexOfKey(userId); if (userIndex >= 0) { mLoadedUserIds.removeAt(userIndex); } // Remove the widget id counter. final int nextIdIndex = mNextAppWidgetIds.indexOfKey(userId); if (nextIdIndex >= 0) { mNextAppWidgetIds.removeAt(nextIdIndex); } // Announce removed provider changes to all hosts in the group. if (providersChanged) { scheduleNotifyGroupHostsForProvidersChangedLocked(userId); } // Save state if removing a profile changed the group state. // Nothing will be saved if the group parent was removed. if (crossProfileWidgetsChanged) { saveGroupStateAsync(userId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUserStopped 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
onUserStopped
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
public int handleIncomingUser(int callingPid, int callingUid, int userId, boolean allowAll, boolean requireFull, String name, String callerPackage) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(callingPid); data.writeInt(callingUid); data.writeInt(userId); data.writeInt(allowAll ? 1 : 0); data.writeInt(requireFull ? 1 : 0); data.writeString(name); data.writeString(callerPackage); mRemote.transact(HANDLE_INCOMING_USER_TRANSACTION, data, reply, 0); reply.readException(); int res = reply.readInt(); data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleIncomingUser File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
handleIncomingUser
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private Bundle getTransferOwnershipAdminExtras(PersistableBundle bundle) { Bundle extras = new Bundle(); if (bundle != null) { extras.putParcelable(EXTRA_TRANSFER_OWNERSHIP_ADMIN_EXTRAS_BUNDLE, bundle); } return extras; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTransferOwnershipAdminExtras 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
getTransferOwnershipAdminExtras
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private static int addressSize0() { if (!hasUnsafe()) { return -1; } return PlatformDependent0.addressSize(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addressSize0 File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
addressSize0
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public boolean needUpgrade(int newVersion) { return newVersion > getVersion(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: needUpgrade File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
needUpgrade
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
@Deprecated public @Nullable Set<String> getCrossProfileCalendarPackages(@NonNull ComponentName admin) { throwIfParentInstance("getCrossProfileCalendarPackages"); if (mService != null) { try { final List<String> packageNames = mService.getCrossProfileCalendarPackages(admin); return packageNames == null ? null : new ArraySet<>(packageNames); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return Collections.emptySet(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrossProfileCalendarPackages 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
getCrossProfileCalendarPackages
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private static BitmapWorkerTask getBitmapWorkerTask(ImageView imageView) { if (imageView != null) { final Drawable drawable = imageView.getDrawable(); if (drawable instanceof AsyncDrawable) { final AsyncDrawable asyncDrawable = (AsyncDrawable) drawable; return asyncDrawable.getBitmapWorkerTask(); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBitmapWorkerTask File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
getBitmapWorkerTask
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@Override @Transactional( readOnly = true ) public Program getProgram( String uid ) { return programStore.getByUid( uid ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProgram File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java Repository: dhis2/dhis2-core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24848
MEDIUM
6.5
dhis2/dhis2-core
getProgram
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
ef04483a9b177d62e48dcf4e498b302a11f95e7d
0
Analyze the following code function for security vulnerabilities
private @Nullable Task handleStartResult(@NonNull ActivityRecord started, ActivityOptions options, int result, Transition newTransition, RemoteTransition remoteTransition) { mSupervisor.mUserLeaving = false; final Task currentRootTask = started.getRootTask(); final Task startedActivityRootTask = currentRootTask != null ? currentRootTask : mTargetRootTask; if (!ActivityManager.isStartResultSuccessful(result) || startedActivityRootTask == null) { // If we are not able to proceed, disassociate the activity from the task. Leaving an // activity in an incomplete state can lead to issues, such as performing operations // without a window container. if (mStartActivity.getTask() != null) { mStartActivity.finishIfPossible("startActivity", true /* oomAdj */); } else if (mStartActivity.getParent() != null) { mStartActivity.getParent().removeChild(mStartActivity); } // Root task should also be detached from display and be removed if it's empty. if (startedActivityRootTask != null && startedActivityRootTask.isAttached() && !startedActivityRootTask.hasActivity() && !startedActivityRootTask.isActivityTypeHome()) { startedActivityRootTask.removeIfPossible("handleStartResult"); } if (newTransition != null) { newTransition.abort(); } return null; } // Apply setAlwaysOnTop when starting an activity is successful regardless of creating // a new Activity or reusing the existing activity. if (options != null && options.getTaskAlwaysOnTop()) { startedActivityRootTask.setAlwaysOnTop(true); } // If there is no state change (e.g. a resumed activity is reparented to top of // another display) to trigger a visibility/configuration checking, we have to // update the configuration for changing to different display. final ActivityRecord currentTop = startedActivityRootTask.topRunningActivity(); if (currentTop != null && currentTop.shouldUpdateConfigForDisplayChanged()) { mRootWindowContainer.ensureVisibilityAndConfig( currentTop, currentTop.getDisplayId(), true /* markFrozenIfConfigChanged */, false /* deferResume */); } if (!mAvoidMoveToFront && mDoResume && mRootWindowContainer .hasVisibleWindowAboveButDoesNotOwnNotificationShade(started.launchedFromUid)) { // If the UID launching the activity has a visible window on top of the notification // shade and it's launching an activity that's going to be at the front, we should move // the shade out of the way so the user can see it. We want to avoid the case where the // activity is launched on top of a background task which is not moved to the front. final StatusBarManagerInternal statusBar = mService.getStatusBarManagerInternal(); if (statusBar != null) { // This results in a async call since the interface is one-way. statusBar.collapsePanels(); } } // Transition housekeeping. final TransitionController transitionController = started.mTransitionController; final boolean isStarted = result == START_SUCCESS || result == START_TASK_TO_FRONT; if (isStarted) { // The activity is started new rather than just brought forward, so record it as an // existence change. transitionController.collectExistenceChange(started); } else if (result == START_DELIVERED_TO_TOP && newTransition != null) { // We just delivered to top, so there isn't an actual transition here. newTransition.abort(); newTransition = null; } if (options != null && options.getTransientLaunch()) { // `started` isn't guaranteed to be the actual relevant activity, so we must wait // until after we launched to identify the relevant activity. transitionController.setTransientLaunch(mLastStartActivityRecord, mPriorAboveTask); } if (newTransition != null) { transitionController.requestStartTransition(newTransition, mTargetTask == null ? started.getTask() : mTargetTask, remoteTransition, null /* displayChange */); } else if (isStarted) { // Make the collecting transition wait until this request is ready. transitionController.setReady(started, false); } return startedActivityRootTask; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleStartResult File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
handleStartResult
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
static ValueConverter<CharSequence> valueConverter(boolean validate) { return validate ? HeaderValueConverterAndValidator.INSTANCE : HeaderValueConverter.INSTANCE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: valueConverter File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
valueConverter
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
final void ensureBootCompleted() { boolean booting; boolean enableScreen; synchronized (this) { booting = mBooting; mBooting = false; enableScreen = !mBooted; mBooted = true; } if (booting) { Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "FinishBooting"); finishBooting(); Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } if (enableScreen) { enableScreenAfterBoot(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureBootCompleted File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
ensureBootCompleted
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public void calculateHasIncompatibleAccounts() { if (calculateHasIncompatibleAccountsExecutor.getQueue().size() > 1) { return; } new CalculateHasIncompatibleAccountsTask().executeOnExecutor( calculateHasIncompatibleAccountsExecutor, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: calculateHasIncompatibleAccounts File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
calculateHasIncompatibleAccounts
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public abstract void onUploaded(AjaxRequestTarget target);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUploaded File: server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/ArtifactUploadPanel.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-38301
HIGH
8.8
theonedev/onedev
onUploaded
server-core/src/main/java/io/onedev/server/web/page/project/builds/detail/artifacts/ArtifactUploadPanel.java
5b6a19c1f7fe9c271acc4268bcd261a9a1cbb3ea
0
Analyze the following code function for security vulnerabilities
public void addItemToContainer(Node container, String tagname, String value) { Element node = mDoc.createElement(tagname); Text text = mDoc.createTextNode(value); node.appendChild(text); container.appendChild(node); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addItemToContainer File: base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
addItemToContainer
base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public Form<T> withGlobalError(final String error) { return withGlobalError(error, new ArrayList<>()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withGlobalError 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
withGlobalError
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
protected ClientSessionContext getClientSessionContext() { return clientSessionContext; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getClientSessionContext File: src/main/java/org/conscrypt/SSLParametersImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3840
HIGH
10
android
getClientSessionContext
src/main/java/org/conscrypt/SSLParametersImpl.java
5af5e93463f4333187e7e35f3bd2b846654aa214
0
Analyze the following code function for security vulnerabilities
public TaskFilter getSearchFilter() { if (this.searchFilter == null) { final Object filter = getParentPage().getUserPrefEntry(TaskListForm.class.getName() + ":Filter"); if (filter != null) { try { this.searchFilter = (TaskFilter) filter; } catch (final ClassCastException ex) { // Probably a new software release results in an incompability of old and new filter format. log.info("Could not restore filter from user prefs: (old) filter type " + filter.getClass().getName() + " is not assignable to (new) filter type TaskFilter (OK, probably new software release)."); } } } if (this.searchFilter == null) { this.searchFilter = new TaskFilter(); getParentPage().putUserPrefEntry(TaskListForm.class.getName() + ":Filter", this.searchFilter, true); } return this.searchFilter; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSearchFilter File: src/main/java/org/projectforge/web/task/TaskTreeForm.java Repository: micromata/projectforge-webapp The code follows secure coding practices.
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
getSearchFilter
src/main/java/org/projectforge/web/task/TaskTreeForm.java
422de35e3c3141e418a73bfb39b430d5fd74077e
0
Analyze the following code function for security vulnerabilities
public ClientID getClientID() { String clientId = getProperty(PROP_CLIENTID, String.class); // Fallback on instance id return new ClientID(clientId != null ? clientId : this.instance.getInstanceId().getInstanceId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getClientID File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java Repository: xwiki-contrib/oidc The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39387
HIGH
7.5
xwiki-contrib/oidc
getClientID
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
@Override protected int getDragAutoActivationThreshold() { return 1000000; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDragAutoActivationThreshold 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
getDragAutoActivationThreshold
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public ConfigurationInfo getDeviceConfigurationInfo() { ConfigurationInfo config = new ConfigurationInfo(); synchronized (this) { config.reqTouchScreen = mConfiguration.touchscreen; config.reqKeyboardType = mConfiguration.keyboard; config.reqNavigation = mConfiguration.navigation; if (mConfiguration.navigation == Configuration.NAVIGATION_DPAD || mConfiguration.navigation == Configuration.NAVIGATION_TRACKBALL) { config.reqInputFeatures |= ConfigurationInfo.INPUT_FEATURE_FIVE_WAY_NAV; } if (mConfiguration.keyboard != Configuration.KEYBOARD_UNDEFINED && mConfiguration.keyboard != Configuration.KEYBOARD_NOKEYS) { config.reqInputFeatures |= ConfigurationInfo.INPUT_FEATURE_HARD_KEYBOARD; } config.reqGlEsVersion = GL_ES_VERSION; } return config; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeviceConfigurationInfo File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
getDeviceConfigurationInfo
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public boolean incrementNetworkNoInternetAccessReports(int networkId) { WifiConfiguration config = getInternalConfiguredNetwork(networkId); if (config == null) { return false; } config.numNoInternetAccessReports++; config.validatedInternetAccess = false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: incrementNetworkNoInternetAccessReports File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
incrementNetworkNoInternetAccessReports
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public void killUidForPermissionChange(int appId, int userId, String reason) { enforceCallingPermission(Manifest.permission.KILL_UID, "killUid"); synchronized (this) { final long identity = Binder.clearCallingIdentity(); try { synchronized (mProcLock) { mProcessList.killPackageProcessesLSP(null /* packageName */, appId, userId, ProcessList.PERSISTENT_PROC_ADJ, false /* callerWillRestart */, true /* callerWillRestart */, true /* doit */, true /* evenPersistent */, false /* setRemoved */, false /* uninstalling */, ApplicationExitInfo.REASON_PERMISSION_CHANGE, ApplicationExitInfo.SUBREASON_UNKNOWN, reason != null ? reason : "kill uid"); } } finally { Binder.restoreCallingIdentity(identity); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killUidForPermissionChange 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
killUidForPermissionChange
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public boolean getIgnorePendingIntentCreatorForegroundState() { return mIgnorePendingIntentCreatorForegroundState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIgnorePendingIntentCreatorForegroundState File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
getIgnorePendingIntentCreatorForegroundState
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Override public void enqueueNotification(String pkg, String opPkg, int callingUid, int callingPid, String tag, int id, Notification notification, int[] idReceived, int userId) { enqueueNotificationInternal(pkg, opPkg, callingUid, callingPid, tag, id, notification, idReceived, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enqueueNotification 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
enqueueNotification
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
private void adjustEdgeSizeOfDrawer() { try { // increase the size of the drag margin to prevent starting a star swipe when // trying to open the drawer. Field mDragger = Objects.requireNonNull(binding.drawerLayout).getClass().getDeclaredField("mLeftDragger"); mDragger.setAccessible(true); ViewDragHelper draggerObj = (ViewDragHelper) mDragger.get(binding.drawerLayout); Field mEdgeSize = Objects.requireNonNull(draggerObj).getClass().getDeclaredField("mEdgeSize"); mEdgeSize.setAccessible(true); int edge = mEdgeSize.getInt(draggerObj); mEdgeSize.setInt(draggerObj, edge * 3); } catch (Exception e) { Log.e(TAG, "Setting edge width of drawer failed..", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: adjustEdgeSizeOfDrawer File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
adjustEdgeSizeOfDrawer
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
@Override @Transactional( readOnly = true ) public List<Program> getAllPrograms() { return programStore.getAll(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllPrograms File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java Repository: dhis2/dhis2-core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24848
MEDIUM
6.5
dhis2/dhis2-core
getAllPrograms
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
ef04483a9b177d62e48dcf4e498b302a11f95e7d
0
Analyze the following code function for security vulnerabilities
private static void resolveSortOrder(@NonNull Bundle queryArgs, @NonNull Consumer<String> honored, @NonNull Function<String, String> collatorFactory) { final String[] columns = queryArgs.getStringArray(QUERY_ARG_SORT_COLUMNS); if (columns != null && columns.length != 0) { String sortOrder = TextUtils.join(", ", columns); honored.accept(QUERY_ARG_SORT_COLUMNS); if (queryArgs.containsKey(QUERY_ARG_SORT_LOCALE)) { final String collatorName = collatorFactory.apply( queryArgs.getString(QUERY_ARG_SORT_LOCALE)); sortOrder += " COLLATE " + collatorName; honored.accept(QUERY_ARG_SORT_LOCALE); } else { // Interpret PRIMARY and SECONDARY collation strength as no-case collation based // on their javadoc descriptions. final int collation = queryArgs.getInt( QUERY_ARG_SORT_COLLATION, java.text.Collator.IDENTICAL); switch (collation) { case java.text.Collator.IDENTICAL: honored.accept(QUERY_ARG_SORT_COLLATION); break; case java.text.Collator.PRIMARY: case java.text.Collator.SECONDARY: sortOrder += " COLLATE NOCASE"; honored.accept(QUERY_ARG_SORT_COLLATION); break; } } final int sortDir = queryArgs.getInt(QUERY_ARG_SORT_DIRECTION, Integer.MIN_VALUE); switch (sortDir) { case QUERY_SORT_DIRECTION_ASCENDING: sortOrder += " ASC"; honored.accept(QUERY_ARG_SORT_DIRECTION); break; case QUERY_SORT_DIRECTION_DESCENDING: sortOrder += " DESC"; honored.accept(QUERY_ARG_SORT_DIRECTION); break; } queryArgs.putString(QUERY_ARG_SQL_SORT_ORDER, sortOrder); } else { honored.accept(QUERY_ARG_SQL_SORT_ORDER); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveSortOrder File: src/com/android/providers/media/util/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-35683
MEDIUM
5.5
android
resolveSortOrder
src/com/android/providers/media/util/DatabaseUtils.java
23d156ed1bed6d2c2b325f0be540d0afca510c49
0
Analyze the following code function for security vulnerabilities
private void updateSortable() { boolean inMemory = getGrid().getDataProvider().isInMemory(); boolean hasSortOrder = getSortOrder(SortDirection.ASCENDING) .count() != 0; getState().sortable = this.sortable && (inMemory || hasSortOrder); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateSortable 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
updateSortable
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
@Override public ChunkHolder create(boolean isFull) { return ChunkHolder.newInstance(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
create
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
public String getPagerEmail(final User user) throws IOException { return getContactInfo(user, ContactType.pagerEmail.toString()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPagerEmail File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-352" ]
CVE-2021-25931
MEDIUM
6.8
OpenNMS/opennms
getPagerEmail
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
607151ea8f90212a3fb37c977fa57c7d58d26a84
0
Analyze the following code function for security vulnerabilities
public void setScope(final String scope) { this.scope = scope; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setScope File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
setScope
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
@NonNull @Override public String[] getAppOpPermissionPackages(@NonNull String permissionName) { return mPermissionManagerServiceImpl.getAppOpPermissionPackages(permissionName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAppOpPermissionPackages File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
getAppOpPermissionPackages
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
@Override public boolean needsAntiFalsing() { return mStatusBarState == StatusBarState.KEYGUARD; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: needsAntiFalsing 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
needsAntiFalsing
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public <T> void streamGet( String table, Class<T> clazz, String fieldName, String where, boolean returnIdField, boolean setId, String distinctOn, Handler<T> streamHandler, Handler<AsyncResult<Void>> replyHandler ) { streamGet(table, clazz, fieldName, where, returnIdField, setId, null, distinctOn, streamHandler, replyHandler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: streamGet File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
streamGet
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private DeliverRegistrationCodeResult deliverRegistrationCode(String userDN) throws WebApplicationException { try { DeliverSingleUseTokenExtendedRequest deliverSingleUseTokenRequest = new DeliverSingleUseTokenExtendedRequest( userDN, TOKEN_ID, null, settings.getMessageSubject(), settings.getFullTextBeforeToken(), settings.getFullTextAfterToken(), settings.getCompactTextBeforeToken(), settings.getCompactTextAfterToken(), null, true, true, true, true ); DeliverSingleUseTokenExtendedResult result = (DeliverSingleUseTokenExtendedResult) pool.processExtendedOperation(deliverSingleUseTokenRequest); ResultCode resultCode = result.getResultCode(); if(resultCode == ResultCode.SUCCESS) { return new DeliverRegistrationCodeResult(result); } else { throw new WebApplicationException(HttpStatus.BAD_REQUEST, resultCode + " - " + result.getDiagnosticMessage()); } } catch(LDAPException e) { log.error("Could not deliver registration code for user with userDN '" + userDN + "'", e); throw new WebApplicationException(HttpStatus.INTERNAL_SERVER_ERROR, e.getMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deliverRegistrationCode File: src/main/java/com/unboundid/webapp/ssam/SSAMController.java Repository: pingidentity/ssam The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-25084
MEDIUM
4
pingidentity/ssam
deliverRegistrationCode
src/main/java/com/unboundid/webapp/ssam/SSAMController.java
f64b10d63bb19ca2228b0c2d561a1a6e5a3bf251
0
Analyze the following code function for security vulnerabilities
@Pure @Override public boolean getBoolean(String columnName) throws SQLException { return getBoolean(findColumn(columnName)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBoolean File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getBoolean
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public Properties getSystemEnvVars() throws Exception { return CommandLineUtils.getSystemEnvVars(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSystemEnvVars File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
getSystemEnvVars
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
@Override public void fillRoundRect(Object graphics, int x, int y, int width, int height, int arcWidth, int arcHeight) { ((AndroidGraphics) graphics).fillRoundRect(x, y, width, height, arcWidth, arcHeight); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fillRoundRect 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
fillRoundRect
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private static int findNonWhitespace(AppendableCharSequence sb, int offset) { for (int result = offset; result < sb.length(); ++result) { if (!Character.isWhitespace(sb.charAtUnsafe(result))) { return result; } } return sb.length(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findNonWhitespace File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2019-16869
MEDIUM
5
netty
findNonWhitespace
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
0
Analyze the following code function for security vulnerabilities
@Override public void deleteAllHosts() { final int userId = UserHandle.getCallingUserId(); if (DEBUG) { Slog.i(TAG, "deleteAllHosts() " + userId); } synchronized (mLock) { ensureGroupStateLoadedLocked(userId); boolean changed = false; final int N = mHosts.size(); for (int i = N - 1; i >= 0; i--) { Host host = mHosts.get(i); // Delete only hosts in the calling uid. if (host.id.uid == Binder.getCallingUid()) { deleteHostLocked(host); changed = true; if (DEBUG) { Slog.i(TAG, "Deleted host " + host.id); } } } if (changed) { saveGroupStateAsync(userId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteAllHosts 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
deleteAllHosts
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
@JsonProperty("RevokedOn") public Date getRevokedOn() { return revokedOn; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRevokedOn File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getRevokedOn
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public void setInMemorySorting(Comparator<T> comparator, boolean immediateReset) { inMemorySorting = comparator; if (immediateReset) { reset(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInMemorySorting File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-20" ]
CVE-2021-33609
MEDIUM
4
vaadin/framework
setInMemorySorting
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
0
Analyze the following code function for security vulnerabilities
public int read() throws IOException { if (DEBUG_PLAYBACK) { System.out.println("(read"); } if (fPushbackOffset < fPushbackLength) { return fByteBuffer[fPushbackOffset++]; } if (fCleared) { return in.read(); } if (fPlayback) { int c = fByteBuffer[fByteOffset++]; if (fByteOffset == fByteLength) { fCleared = true; fByteBuffer = null; } if (DEBUG_PLAYBACK) { System.out.println(")read -> "+(char)c); } return c; } int c = in.read(); if (c != -1) { if (fByteLength == fByteBuffer.length) { byte[] newarray = new byte[fByteLength + 1024]; System.arraycopy(fByteBuffer, 0, newarray, 0, fByteLength); fByteBuffer = newarray; } fByteBuffer[fByteLength++] = (byte)c; } if (DEBUG_PLAYBACK) { System.out.println(")read -> "+(char)c); } return c; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read 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
read
src/org/cyberneko/html/HTMLScanner.java
a800fce3b079def130ed42a408ff1d09f89e773d
0
Analyze the following code function for security vulnerabilities
private void _importCreate(List<ApiScenarioWithBLOBs> sameRequest, ApiScenarioMapper batchMapper, ApiScenarioWithBLOBs scenarioWithBLOBs, ApiTestImportRequest apiTestImportRequest) { if (CollectionUtils.isEmpty(sameRequest)) { scenarioWithBLOBs.setId(UUID.randomUUID().toString()); List<ApiMethodUrlDTO> useUrl = this.parseUrl(scenarioWithBLOBs); scenarioWithBLOBs.setUseUrl(JSONArray.toJSONString(useUrl)); scenarioWithBLOBs.setOrder(getImportNextOrder(apiTestImportRequest.getProjectId())); batchMapper.insert(scenarioWithBLOBs); apiScenarioReferenceIdService.saveByApiScenario(scenarioWithBLOBs); } else { //如果存在则修改 scenarioWithBLOBs.setId(sameRequest.get(0).getId()); scenarioWithBLOBs.setNum(sameRequest.get(0).getNum()); List<ApiMethodUrlDTO> useUrl = this.parseUrl(scenarioWithBLOBs); scenarioWithBLOBs.setUseUrl(JSONArray.toJSONString(useUrl)); batchMapper.updateByPrimaryKeyWithBLOBs(scenarioWithBLOBs); apiScenarioReferenceIdService.saveByApiScenario(scenarioWithBLOBs); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _importCreate File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
_importCreate
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
public String getTitlePic() { return titlePic; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTitlePic File: src/main/java/cn/luischen/model/ContentDomain.java Repository: WinterChenS/my-site The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29638
MEDIUM
5.4
WinterChenS/my-site
getTitlePic
src/main/java/cn/luischen/model/ContentDomain.java
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
0
Analyze the following code function for security vulnerabilities
public void setSerialFrom(String serialFrom) { this.serialFrom = serialFrom; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSerialFrom 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
setSerialFrom
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
private void onSplashScreenAttachComplete() { removeTransferSplashScreenTimeout(); // Client has draw the splash screen, so we can remove the starting window. if (mStartingWindow != null) { mStartingWindow.cancelAnimation(); mStartingWindow.hide(false, false); } // no matter what, remove the starting window. mTransferringSplashScreenState = TRANSFER_SPLASH_SCREEN_FINISH; removeStartingWindowAnimation(false /* prepareAnimation */); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSplashScreenAttachComplete 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
onSplashScreenAttachComplete
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public static float safeParseFloat(String dirty) throws NumberFormatException { String clean = ILLEGAL_IN_FLOAT.matcher(dirty).replaceAll(""); return Float.parseFloat(clean); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: safeParseFloat File: core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-79" ]
CVE-2016-6555
MEDIUM
4.3
OpenNMS/opennms
safeParseFloat
core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java
29007e7aeeb792aa73d45fafb16ae9ef19e78a18
0
Analyze the following code function for security vulnerabilities
@Override public void setContentType(String type) { this.response.setContentType(type); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setContentType File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-601" ]
CVE-2022-23618
MEDIUM
5.8
xwiki/xwiki-platform
setContentType
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
5251c02080466bf9fb55288f04a37671108f8096
0
Analyze the following code function for security vulnerabilities
@Override public boolean isRunning(boolean traceError) { if (serverSocket == null) { return false; } try { Socket s = NetUtils.createLoopbackSocket(port, ssl); s.close(); return true; } catch (Exception e) { if (traceError) { traceError(e); } return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRunning File: h2/src/main/org/h2/server/web/WebServer.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
isRunning
h2/src/main/org/h2/server/web/WebServer.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public boolean isMinInfoReady() { return mIsMinInfoReady; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isMinInfoReady File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
isMinInfoReady
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
public void readFully(byte[] dst, int offset, int byteCount) throws IOException { primitiveTypes.readFully(dst, offset, byteCount); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFully File: luni/src/main/java/java/io/ObjectInputStream.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
readFully
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Override public float readFloat() throws JMSException { return (Float)this.readPrimitiveType(Float.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFloat File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
readFloat
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
public static Vanilla instance(boolean nonMerging) { if (nonMerging) { return new Vanilla(true); } return std; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: instance File: src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-787" ]
CVE-2020-36518
MEDIUM
5
FasterXML/jackson-databind
instance
src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
8238ab41d0350fb915797c89d46777b4496b74fd
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProfileInput other = (ProfileInput) obj; if (attrs == null) { if (other.attrs != null) return false; } else if (!attrs.equals(other.attrs)) return false; if (classId == null) { if (other.classId != null) return false; } else if (!classId.equals(other.classId)) return false; if (configAttrs == null) { if (other.configAttrs != null) return false; } else if (!configAttrs.equals(other.configAttrs)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (text == null) { if (other.text != null) return false; } else if (!text.equals(other.text)) return false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
equals
base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
private JsonValue readTfnns() throws IOException { // Hjson strings can be quoteless // returns string, true, false, or null. StringBuilder value=new StringBuilder(); int first=current; if (JsonValue.isPunctuatorChar(first)) throw error("Found a punctuator character '" + (char)first + "' when expecting a quoteless string (check your syntax)"); value.append((char)current); for (;;) { read(); boolean isEol=current<0 || current=='\r' || current=='\n'; if (isEol || current==',' || current=='}' || current==']' || current=='#' || current=='/' && (peek()=='/' || peek()=='*') ) { switch (first) { case 'f': case 'n': case 't': String svalue=value.toString().trim(); if (svalue.equals("false")) return JsonValue.FALSE; else if (svalue.equals("null")) return JsonValue.NULL; else if (svalue.equals("true")) return JsonValue.TRUE; break; default: if (first=='-' || first>='0' && first<='9') { JsonValue n=tryParseNumber(value, false); if (n!=null) return n; } } if (isEol) { // remove any whitespace at the end (ignored in quoteless strings) return HjsonDsf.parse(dsfProviders, value.toString().trim()); } } value.append((char)current); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readTfnns File: src/main/org/hjson/HjsonParser.java Repository: hjson/hjson-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
readTfnns
src/main/org/hjson/HjsonParser.java
00e3b1325cb6c2b80b347dbec9181fd17ce0a599
0
Analyze the following code function for security vulnerabilities
public CompletableFuture<HttpResponse> sendAsync() { return CompletableFuture.supplyAsync(this::send); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendAsync File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
sendAsync
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
@Test public void executeTransParamNullConnection(TestContext context) throws Exception { Async async = context.async(); postgresClient = postgresClient(); postgresClient.startTx(asyncAssertTx(context, trans -> { setRootLevel(Level.FATAL); postgresClient.execute(null, "SELECT 1", new JsonArray(), context.asyncAssertFailure(execute -> { postgresClient.rollbackTx(trans, rollback -> async.complete()); })); // TODO: When updated to vertx 3.6.1 with this fix // https://github.com/vert-x3/vertx-mysql-postgresql-client/pull/132 // change "rollback -> async.complete()" to "context.asyncAssertSuccess()" })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeTransParamNullConnection File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
executeTransParamNullConnection
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public void resetSettingsLocked(int type, int userId, String packageName, int mode, String tag) { resetSettingsLocked(type, userId, packageName, mode, tag, /*prefix=*/ null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetSettingsLocked 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
resetSettingsLocked
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
protected void setOrigin(String origin, MutableHttpResponse response) { response.header(ACCESS_CONTROL_ALLOW_ORIGIN, origin); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOrigin File: http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
setOrigin
http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
Uri getUri() { return mUri; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUri File: src/com/android/settings/network/apn/ApnEditor.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40125
HIGH
7.8
android
getUri
src/com/android/settings/network/apn/ApnEditor.java
63d464c3fa5c7b9900448fef3844790756e557eb
0
Analyze the following code function for security vulnerabilities
private String getDocumentVersion(DocumentReference documentReference, XWikiContext context) { try { return context.getWiki().getDocument(documentReference, context).getVersion(); } catch (XWikiException e) { LOGGER.error("Failed to load document [{}].", documentReference, e); } return ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDocumentVersion File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29206
MEDIUM
5.4
xwiki/xwiki-platform
getDocumentVersion
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
0
Analyze the following code function for security vulnerabilities
private static void parseUser(final XmlPullParser parser, final HostAuth hostAuth) throws XmlPullParserException, IOException { while (true) { int type = parser.next(); if (type == XmlPullParser.END_TAG && parser.getName().equals(ELEMENT_NAME_USER)) { break; } else if (type == XmlPullParser.START_TAG) { String name = parser.getName(); if (name.equals(ELEMENT_NAME_EMAIL_ADDRESS)) { final String addr = parser.nextText(); LogUtils.d(TAG, "Autodiscover, email: %s", addr); } else if (name.equals(ELEMENT_NAME_DISPLAY_NAME)) { final String dn = parser.nextText(); LogUtils.d(TAG, "Autodiscover, user: %s", dn); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseUser File: src/com/android/exchange/eas/EasAutoDiscover.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2415
HIGH
7.1
android
parseUser
src/com/android/exchange/eas/EasAutoDiscover.java
0d1a38b1755efe7ed4e8d7302a24186616bba9b2
0
Analyze the following code function for security vulnerabilities
boolean isPackageMatch(String packageName) { if (mPackagePatterns.size() == 0) { return true; } for (int i = 0; i < mPackagePatterns.size(); i++) { if (mPackagePatterns.get(i).matcher(packageName).find()) { return true; } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPackageMatch 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
isPackageMatch
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection patch(final String path1, final String path2, final Route.ZeroArgHandler handler) { return new Route.Collection( new Route.Definition[]{patch(path1, handler), patch(path2, handler)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: patch File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
patch
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
@Deprecated public BaseObject addObjectFromRequest(String className, String prefix, XWikiContext context) throws XWikiException { return addObjectFromRequest(className, prefix, 0, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addObjectFromRequest 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
addObjectFromRequest
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
public int getDelay(StaplerRequest req) throws ServletException { String delay = req.getParameter("delay"); if (delay==null) return getQuietPeriod(); try { // TODO: more unit handling if(delay.endsWith("sec")) delay=delay.substring(0,delay.length()-3); if(delay.endsWith("secs")) delay=delay.substring(0,delay.length()-4); return Integer.parseInt(delay); } catch (NumberFormatException e) { throw new ServletException("Invalid delay parameter value: "+delay); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDelay File: core/src/main/java/hudson/model/AbstractProject.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getDelay
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public HomeSp getHomeSp() { return mHomeSp; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHomeSp File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
getHomeSp
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public int dumpToFiles(final String basepath) throws IOException { int npoints = 0; final int nseries = datapoints.size(); final String datafiles[] = nseries > 0 ? new String[nseries] : null; FileSystem.checkDirectory(new File(basepath).getParent(), Const.MUST_BE_WRITEABLE, Const.CREATE_IF_NEEDED); for (int i = 0; i < nseries; i++) { datafiles[i] = basepath + "_" + i + ".dat"; final PrintWriter datafile = new PrintWriter(datafiles[i]); try { for (final DataPoint d : datapoints.get(i)) { final long ts = d.timestamp() / 1000; if (d.isInteger()) { datafile.print(ts + utc_offset); datafile.print(' '); datafile.print(d.longValue()); } else { final double value = d.doubleValue(); if (Double.isInfinite(value)) { // Infinity is invalid. throw new IllegalStateException("Infinity found in" + " datapoints #" + i + ": " + value + " d=" + d); } else if (Double.isNaN(value)) { // NaNs should be skipped. continue; } datafile.print(ts + utc_offset); datafile.print(' '); datafile.print(value); } datafile.print('\n'); if (ts >= (start_time & UNSIGNED) && ts <= (end_time & UNSIGNED)) { npoints++; } } } finally { datafile.close(); } } if (npoints == 0) { // Gnuplot doesn't like empty graphs when xrange and yrange aren't // entirely defined, because it can't decide on good ranges with no // data. We always set the xrange, but the yrange is supplied by the // user. Let's make sure it defines a min and a max. params.put("yrange", "[0:10]"); // Doesn't matter what values we use. } writeGnuplotScript(basepath, datafiles); return npoints; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpToFiles File: src/graph/Plot.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2020-35476
HIGH
7.5
OpenTSDB/opentsdb
dumpToFiles
src/graph/Plot.java
b762338664c3ee6e3f773bc04da2a8af24a5c486
0
Analyze the following code function for security vulnerabilities
public Bundle popAppVerificationBundle() { Bundle out = mAppVerificationBundle; mAppVerificationBundle = null; return out; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: popAppVerificationBundle File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
popAppVerificationBundle
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Override public void stopRtt(String callId, Session.Info sessionInfo) throws RemoteException { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stopRtt File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
stopRtt
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public IndexPattern addPerm(Set<String> perms) { if (perms != null) { this.perms.addAll(perms); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPerm File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java Repository: opensearch-project/security The code follows secure coding practices.
[ "CWE-612", "CWE-863" ]
CVE-2022-41918
MEDIUM
6.3
opensearch-project/security
addPerm
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
0
Analyze the following code function for security vulnerabilities
private static int generateNextId() { return sIdCounter.getAndIncrement(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateNextId File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
generateNextId
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private static int getLoggingFingerprint(int statusBarState, boolean keyguardShowing, boolean keyguardOccluded, boolean bouncerShowing, boolean secure, boolean currentlyInsecure) { // Reserve 8 bits for statusBarState. We'll never go higher than // that, right? Riiiight. return (statusBarState & 0xFF) | ((keyguardShowing ? 1 : 0) << 8) | ((keyguardOccluded ? 1 : 0) << 9) | ((bouncerShowing ? 1 : 0) << 10) | ((secure ? 1 : 0) << 11) | ((currentlyInsecure ? 1 : 0) << 12); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLoggingFingerprint 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
getLoggingFingerprint
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private void showSendConfirmDialog(final int messageId, final boolean showToast, final ArrayList<String> recipients) { final DialogFragment frag = SendConfirmDialogFragment.newInstance( messageId, showToast, recipients); frag.show(getFragmentManager(), "send confirm"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showSendConfirmDialog File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
showSendConfirmDialog
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public static String getConfigFilePath(){ if(configPath == null){ configPath = POSTGRES_LOCALHOST_CONFIG; } return configPath; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConfigFilePath File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
getConfigFilePath
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private CompletableFuture<Void> buildPutFutures(String[] cacheNames, Object result, Object key) { List<CompletableFuture<Boolean>> futures = new ArrayList<>(); for (String cacheName : cacheNames) { AsyncCache<?> asyncCache = cacheManager.getCache(cacheName).async(); futures.add(asyncCache.put(key, result)); } CompletableFuture[] futureArray = futures.toArray(new CompletableFuture[0]); return CompletableFuture.allOf(futureArray); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildPutFutures File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
buildPutFutures
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
@Override public CharSequence getQueueTitle() { return mQueueTitle; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getQueueTitle File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
getQueueTitle
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
private void insert(int pos, char ch) { replace(pos, pos, ch); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insert File: src/main/java/com/google/json/JsonSanitizer.java Repository: OWASP/json-sanitizer The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-13973
MEDIUM
4.3
OWASP/json-sanitizer
insert
src/main/java/com/google/json/JsonSanitizer.java
53ceaac3e0a10e86d512ce96a0056578f2d1978f
0
Analyze the following code function for security vulnerabilities
public void onTrackingStopped(boolean expand) { if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) { if (!expand && !mUnlockMethodCache.canSkipBouncer()) { showBouncerIfKeyguard(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTrackingStopped 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
onTrackingStopped
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public List<ApplicationInfo> getRunningExternalApplications() throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRunningExternalApplications File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getRunningExternalApplications
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private int calcConnectionCount(long totalLength) { if (isMultiConnectionAvailable()) { if (isResumeAvailableOnDB) { return model.getConnectionCount(); } else { return CustomComponentHolder.getImpl() .determineConnectionCount(model.getId(), model.getUrl(), model.getPath(), totalLength); } } else { return 1; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: calcConnectionCount File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java Repository: lingochamp/FileDownloader The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-11248
HIGH
7.5
lingochamp/FileDownloader
calcConnectionCount
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
0
Analyze the following code function for security vulnerabilities
protected void engineSetParameter( AlgorithmParameterSpec params) { throw new UnsupportedOperationException("engineSetParameter unsupported"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineSetParameter File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-347" ]
CVE-2016-1000338
MEDIUM
5
bcgit/bc-java
engineSetParameter
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
b0c3ce99d43d73a096268831d0d120ffc89eac7f
0
Analyze the following code function for security vulnerabilities
public boolean useDefaultAction(XWikiContext context) { String bl = getXWikiPreference("usedefaultaction", "", context); if ("1".equals(bl)) { return true; } if ("0".equals(bl)) { return false; } return "1".equals(getConfiguration().getProperty("xwiki.usedefaultaction", "0")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: useDefaultAction File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
useDefaultAction
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@Override public void onFinishedGoingToSleep(int why) { mLockIcon.setDeviceInteractive(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onFinishedGoingToSleep File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onFinishedGoingToSleep
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public static <T extends BaseWxPayResult> T fromXML(String xmlString, Class<T> clz) { XStream xstream = XStreamInitializer.getInstance(); xstream.processAnnotations(clz); T result = (T) xstream.fromXML(xmlString); result.setXmlString(xmlString); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromXML File: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/BaseWxPayResult.java Repository: Wechat-Group/WxJava The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20318
HIGH
7.5
Wechat-Group/WxJava
fromXML
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/BaseWxPayResult.java
6272639f02e397fed40828a2d0da66c30264bc0e
0
Analyze the following code function for security vulnerabilities
public void sort(String columnId, SortDirection direction) { sort(getColumnOrThrow(columnId), direction); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sort 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
sort
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
@Override public void saveTextEditingState() { stopEditing(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveTextEditingState 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
saveTextEditingState
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public @Nullable CharSequence getOrganizationNameForUser(int userHandle) { return mGetOrganizationNameForUserCache.query(userHandle); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrganizationNameForUser 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
getOrganizationNameForUser
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public boolean deleteSettingLocked(int type, int userId, String name, boolean forceNotify, Set<String> criticalSettings) { final int key = makeKey(type, userId); boolean success = false; SettingsState settingsState = peekSettingsStateLocked(key); if (settingsState != null) { success = settingsState.deleteSettingLocked(name); } if (success && criticalSettings != null && criticalSettings.contains(name)) { settingsState.persistSyncLocked(); } if (forceNotify || success) { notifyForSettingsChange(key, name); } return success; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteSettingLocked File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
deleteSettingLocked
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
private void removeExtensionComponent(Component c) { if (extensionComponents.remove(c)) { c.setParent(null); markAsDirty(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeExtensionComponent 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
removeExtensionComponent
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
default <T extends DataModel> T findData(UUID jobId, String key, Class<T> type) throws IOException { throw new UnsupportedOperationException(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findData File: portability-spi-cloud/src/main/java/org/datatransferproject/spi/cloud/storage/TemporaryPerJobDataStore.java Repository: google/data-transfer-project The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-22572
LOW
2.1
google/data-transfer-project
findData
portability-spi-cloud/src/main/java/org/datatransferproject/spi/cloud/storage/TemporaryPerJobDataStore.java
013edb6c2d5a4e472988ea29a7cb5b1fdaf9c635
0
Analyze the following code function for security vulnerabilities
private void updateBasePath() { if (serverIndex != null) { setBasePath(servers.get(serverIndex).URL(serverVariables)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateBasePath File: samples/client/petstore/java/jersey2-java8-localdatetime/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
updateBasePath
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(value = Manifest.permission.WHITELIST_RESTRICTED_PERMISSIONS, conditional = true) public boolean removeAllowlistedRestrictedPermission(@NonNull String packageName, @NonNull String permissionName, @PackageManager.PermissionWhitelistFlags int allowlistFlags) { try { return mPermissionManager.removeAllowlistedRestrictedPermission(packageName, permissionName, allowlistFlags, mContext.getUserId()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAllowlistedRestrictedPermission File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
removeAllowlistedRestrictedPermission
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
@BeforeAll static void beforeAll(TestUtils testUtils) { testUtils.loginAsSuperAdmin(); // The application creator needs script rights in order to execute the scripts generated by the wizard. testUtils.setGlobalRights("", "XWiki." + USER_NAME, "script", true); testUtils.createUser(USER_NAME, PASSWORD, ""); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beforeAll File: xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/WizardIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29515
MEDIUM
5.4
xwiki/xwiki-platform
beforeAll
xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/WizardIT.java
e73b890623efa604adc484ad82f37e31596fe1a6
0
Analyze the following code function for security vulnerabilities
void dumpAssociationsLocked(FileDescriptor fd, PrintWriter pw, String[] args, int opti, boolean dumpAll, boolean dumpClient, String dumpPackage) { pw.println("ACTIVITY MANAGER ASSOCIATIONS (dumpsys activity associations)"); int dumpUid = 0; if (dumpPackage != null) { IPackageManager pm = AppGlobals.getPackageManager(); try { dumpUid = pm.getPackageUid(dumpPackage, MATCH_ANY_USER, 0); } catch (RemoteException e) { } } boolean printedAnything = false; final long now = SystemClock.uptimeMillis(); for (int i1=0, N1=mAssociations.size(); i1<N1; i1++) { ArrayMap<ComponentName, SparseArray<ArrayMap<String, Association>>> targetComponents = mAssociations.valueAt(i1); for (int i2=0, N2=targetComponents.size(); i2<N2; i2++) { SparseArray<ArrayMap<String, Association>> sourceUids = targetComponents.valueAt(i2); for (int i3=0, N3=sourceUids.size(); i3<N3; i3++) { ArrayMap<String, Association> sourceProcesses = sourceUids.valueAt(i3); for (int i4=0, N4=sourceProcesses.size(); i4<N4; i4++) { Association ass = sourceProcesses.valueAt(i4); if (dumpPackage != null) { if (!ass.mTargetComponent.getPackageName().equals(dumpPackage) && UserHandle.getAppId(ass.mSourceUid) != dumpUid) { continue; } } printedAnything = true; pw.print(" "); pw.print(ass.mTargetProcess); pw.print("/"); UserHandle.formatUid(pw, ass.mTargetUid); pw.print(" <- "); pw.print(ass.mSourceProcess); pw.print("/"); UserHandle.formatUid(pw, ass.mSourceUid); pw.println(); pw.print(" via "); pw.print(ass.mTargetComponent.flattenToShortString()); pw.println(); pw.print(" "); long dur = ass.mTime; if (ass.mNesting > 0) { dur += now - ass.mStartTime; } TimeUtils.formatDuration(dur, pw); pw.print(" ("); pw.print(ass.mCount); pw.print(" times)"); pw.print(" "); for (int i=0; i<ass.mStateTimes.length; i++) { long amt = ass.mStateTimes[i]; if ((ass.mLastState-ActivityManager.MIN_PROCESS_STATE) == i) { amt += now - ass.mLastStateUptime; } if (amt != 0) { pw.print(" "); pw.print(ProcessList.makeProcStateString( i + ActivityManager.MIN_PROCESS_STATE)); pw.print("="); TimeUtils.formatDuration(amt, pw); if ((ass.mLastState-ActivityManager.MIN_PROCESS_STATE) == i) { pw.print("*"); } } } pw.println(); if (ass.mNesting > 0) { pw.print(" Currently active: "); TimeUtils.formatDuration(now - ass.mStartTime, pw); pw.println(); } } } } } if (!printedAnything) { pw.println(" (nothing)"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpAssociationsLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
dumpAssociationsLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0